diff --git a/aci/backend.go b/aci/backend.go index 37ec9f0d5..ceabd7cf2 100644 --- a/aci/backend.go +++ b/aci/backend.go @@ -172,7 +172,15 @@ func getContainerGroups(ctx context.Context, subscriptionID string, resourceGrou return []containerinstance.ContainerGroup{}, err } } - return containerGroups, nil + var groups []containerinstance.ContainerGroup + for _, group := range containerGroups { + group, err := groupsClient.Get(ctx, resourceGroup, *group.Name) + if err != nil { + return []containerinstance.ContainerGroup{}, err + } + groups = append(groups, group) + } + return groups, nil } func getContainerID(group containerinstance.ContainerGroup, container containerinstance.Container) string { diff --git a/aci/convert/convert.go b/aci/convert/convert.go index f8da647f2..eb505b4c1 100644 --- a/aci/convert/convert.go +++ b/aci/convert/convert.go @@ -452,15 +452,6 @@ func ContainerGroupToContainer(containerID string, cg containerinstance.Containe // GetStatus returns status for the specified container func GetStatus(container containerinstance.Container, group containerinstance.ContainerGroup) string { status := compose.UNKNOWN - if group.ContainerGroupProperties != nil && group.ContainerGroupProperties.ProvisioningState != nil { - status = *group.ContainerGroupProperties.ProvisioningState - switch status { - case "Succeeded": - status = compose.RUNNING - case "Failed": - status = compose.FAILED - } - } if group.InstanceView != nil && group.InstanceView.State != nil { status = "Node " + *group.InstanceView.State }