summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authoropenshift-ci[bot] <75433959+openshift-ci[bot]@users.noreply.github.com>2022-06-28 06:57:57 +0000
committerGitHub <noreply@github.com>2022-06-28 06:57:57 +0000
commita5750989752d03717676adc3e5ad52547afab421 (patch)
tree82970357a320ffabbda87766d4e2672890eb0d70 /pkg
parentd095053b9cda99b009d102c5b595e77b980ee1a0 (diff)
parent386ea49cf5a661b79b130371eca087c5df5e5411 (diff)
downloadpodman-a5750989752d03717676adc3e5ad52547afab421.tar.gz
podman-a5750989752d03717676adc3e5ad52547afab421.tar.bz2
podman-a5750989752d03717676adc3e5ad52547afab421.zip
Merge pull request #14742 from rhatdan/machine
Show starting state when machine is starting
Diffstat (limited to 'pkg')
-rw-r--r--pkg/machine/qemu/machine.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/pkg/machine/qemu/machine.go b/pkg/machine/qemu/machine.go
index 5094345ea..3a1495021 100644
--- a/pkg/machine/qemu/machine.go
+++ b/pkg/machine/qemu/machine.go
@@ -1074,6 +1074,7 @@ func getVMInfos() ([]*machine.ListResponse, error) {
listEntry.RemoteUsername = vm.RemoteUsername
listEntry.IdentityPath = vm.IdentityPath
listEntry.CreatedAt = vm.Created
+ listEntry.Starting = vm.Starting
if listEntry.CreatedAt.IsZero() {
listEntry.CreatedAt = time.Now()
@@ -1087,6 +1088,7 @@ func getVMInfos() ([]*machine.ListResponse, error) {
if err != nil {
return err
}
+ listEntry.Running = state == machine.Running
if !vm.LastUp.IsZero() { // this means we have already written a time to the config
listEntry.LastUp = vm.LastUp
@@ -1097,12 +1099,6 @@ func getVMInfos() ([]*machine.ListResponse, error) {
return err
}
}
- switch state {
- case machine.Running:
- listEntry.Running = true
- case machine.Starting:
- listEntry.Starting = true
- }
listed = append(listed, listEntry)
}