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

Suspended power_state is "suspended" #1524

Merged
merged 1 commit into from Feb 1, 2019
Merged

Conversation

AllenBW
Copy link
Member

@AllenBW AllenBW commented Feb 1, 2019

fixes https://bugzilla.redhat.com/show_bug.cgi?id=1670373

look now its all fixed n stuff, you can start a service that is of an unknown or suspended power state

screen shot 2019-02-01 at 8 29 38 am

@AllenBW AllenBW requested a review from himdel February 1, 2019 13:30
@AllenBW AllenBW added the bug label Feb 1, 2019
@AllenBW AllenBW added this to the Sprint 104 Ending Feb 4, 2019 milestone Feb 1, 2019
@miq-bot
Copy link
Member

miq-bot commented Feb 1, 2019

Checked commit AllenBW@ba366fd with ruby 2.3.3, rubocop 0.52.1, haml-lint 0.20.0, and yamllint 1.10.0
0 files checked, 0 offenses detected
Everything looks fine. 🍪

@himdel
Copy link
Contributor

himdel commented Feb 1, 2019

This changed in #430,

-      return item.power_state === "off" && item.power_status === "suspend_complete";
+      return getPowerState(item) === 'off';

and I'm not seeing any suspended in manageiq core.

Are you sure the state is really consistently suspended for all the providers, or should we check power_status as well?

EDIT: though, I am seeing...

  def vm_count_by_state(state)
    vms.inject(0) { |t, vm| vm.power_state == state ? t + 1 : t }
  end
...
  def total_vms_suspended; vm_count_by_state("suspended"); end

so looks like this should be fine :)

EDIT2: power_status is for services, not vms, and I do have 1 suspended VM with the right power state.

Copy link
Contributor

@himdel himdel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, works in the UI :)

@himdel himdel merged commit 89d8ebc into ManageIQ:master Feb 1, 2019
@AllenBW AllenBW deleted the bug/BZ#1670373 branch February 1, 2019 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants