mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
fix(host): upload container status when not created (#23666)
This commit is contained in:
@@ -341,7 +341,7 @@ func (s *sPodGuestInstance) getStatus(ctx context.Context, defaultStatus string)
|
||||
if s.IsRunning() {
|
||||
status = computeapi.VM_RUNNING
|
||||
}
|
||||
for _, c := range s.containers {
|
||||
for _, c := range s.GetContainers() {
|
||||
cStatus, cs, err := s.getContainerStatus(ctx, c.Id)
|
||||
if err != nil {
|
||||
log.Errorf("get container %s status of pod %s", c.Id, s.Id)
|
||||
@@ -372,7 +372,7 @@ func (s *sPodGuestInstance) GetUploadStatus(ctx context.Context, reason string)
|
||||
}*/
|
||||
// sync container's status
|
||||
cStatuss := make(map[string]*computeapi.ContainerPerformStatusInput)
|
||||
for _, c := range s.containers {
|
||||
for _, c := range s.GetContainers() {
|
||||
cStatus, cs, err := s.getContainerStatus(ctx, c.Id)
|
||||
if err != nil {
|
||||
log.Errorf("get container %s status of pod %s", c.Id, s.Id)
|
||||
|
||||
Reference in New Issue
Block a user