Skip to content
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

Merged
merged 1 commit into from
May 29, 2018
Merged

Conversation

pkliczewski
Copy link
Contributor

We assumed about vm status based on part of the flow we were in.
This PR uses vm status as collected from kubevirt.

@pkliczewski pkliczewski requested a review from masayag May 25, 2018 12:08
@pkliczewski
Copy link
Contributor Author

This PR fixes #69

@pkliczewski
Copy link
Contributor Author

This PR requires fog/fog-kubevirt#12 to work.

Copy link
Contributor

@masayag masayag left a 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',
Copy link
Contributor Author

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/

Copy link

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.

Copy link

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.

Copy link

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

Copy link
Contributor Author

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.
@miq-bot
Copy link
Member

miq-bot commented May 28, 2018

Checked commit pkliczewski@db2d4dc with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
4 files checked, 0 offenses detected
Everything looks fine. 🏆

@masayag masayag merged commit 232745b into ManageIQ:master May 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants