-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use vm status provided by kubevirt #82
Conversation
This PR fixes #69 |
This PR requires fog/fog-kubevirt#12 to work. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR should be merged after fog-kubevirt-0.1.12 is released.
POWER_STATES = { | ||
'Running' => 'on', | ||
'Pending' => 'powering_up', | ||
'Scheduling' => 'powering_up', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rmohr Please check whether I added here all the statuses that are possible for VMs. I based my list on pod life cycle https://blog.openshift.com/kubernetes-pods-life/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right now we have these: https://github.com/kubevirt/kubevirt/blob/master/pkg/api/v1/types.go#L303. The only one you are missing is Scheduled
. That one does not exist on pods.
I also saw now that these fields are not reflected in the api-reference: http://www.kubevirt.io/api-reference/master/definitions.html#_v1_virtualmachinestatus. Will file an issue in kubevirt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And we should probably rethink our Scheduled
and Pending
and Scheduling
meaning. We slightly diverge here from Pods, with out necessarily for a good reason. But for now it works like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For reference: kubevirt/kubevirt#1085
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, I will update it with Scheduled
. Feel free to open an issue if anything changes with vm statuses.
We assumed about vm status based on part of the flow we were in. This PR uses vm status as collected from kubevirt.
Checked commit pkliczewski@db2d4dc with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0 |
We assumed about vm status based on part of the flow we were in.
This PR uses vm status as collected from kubevirt.