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

add quick_stats support for RHEVM host #10505

Merged
merged 1 commit into from
Nov 2, 2016

Conversation

borod108
Copy link

@borod108 borod108 commented Aug 16, 2016

Add host quickStats support for RHEVM providers so the auto provisioning of a VM will consider which host has more free memory when deciding on a host for the new VM.
(Until now this was only supported for VMWare)

see: https://bugzilla.redhat.com/show_bug.cgi?id=1323145

@borod108
Copy link
Author

This change: https://bugzilla.redhat.com/show_bug.cgi?id=1331388 should be reverted before this will have any effect.

@borod108
Copy link
Author

@masayag can you please review?

@borod108 borod108 force-pushed the rfe/rhevm_quick_stats branch 2 times, most recently from e528d51 to 791aed9 Compare August 29, 2016 12:32
@masayag
Copy link
Contributor

masayag commented Aug 29, 2016

looks good to me

@borod108
Copy link
Author

@blomquisg, can this be merged?

@blomquisg blomquisg assigned blomquisg and unassigned oourfali Aug 30, 2016
def host_quick_stats(host)
qs = {}
with_provider_connection(:version => 4) do |connection|
l = connection.system_service.hosts_service.host_service(host.uid_ems)
Copy link
Member

@blomquisg blomquisg Sep 6, 2016

Choose a reason for hiding this comment

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

@borod108 I think it's likely that the meaning of l is going to get lost. Can you change this to stats_list, or something similar?

Also, below, the l almost looks like the numeral 1, and I was hugely confused as to what 1.detect meant. 😄

@blomquisg
Copy link
Member

@borod108 nice use of the Support Feature Mixin. Thanks for refactoring the hard coded vmware logic, as well 😄

@blomquisg blomquisg assigned borod108 and unassigned blomquisg Sep 8, 2016
@blomquisg
Copy link
Member

@borod108 just assign back to me when you've addressed my nitpick comments 😄

@miq-bot
Copy link
Member

miq-bot commented Sep 23, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@borod108
Copy link
Author

borod108 commented Oct 5, 2016

this is rebased over #11418

@miq-bot
Copy link
Member

miq-bot commented Oct 5, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Oct 5, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

1 similar comment
@miq-bot
Copy link
Member

miq-bot commented Oct 5, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@miq-bot
Copy link
Member

miq-bot commented Oct 12, 2016

<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush.

@@ -66,4 +66,8 @@ def reserve_next_available_vnc_port
port
end
end

def supports_quick_stats?
Copy link
Member

Choose a reason for hiding this comment

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

could you change this

@@ -211,7 +211,7 @@ def api3_supported_features
end

def api4_supported_features
[:snapshots]
[:snapshots, :quick_stats]
Copy link
Contributor

Choose a reason for hiding this comment

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

Let's keep this list sorted, perhaps even have a single feature per line

Copy link
Author

Choose a reason for hiding this comment

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

done

@miq-bot
Copy link
Member

miq-bot commented Oct 27, 2016

<github_pr_commenter_batch />Some comments on commit borod108@6789f44

spec/models/manageiq/providers/redhat/infra_manager/host_spec.rb

  • ⚠️ - 15 - Detected expect_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.
  • ⚠️ - 7 - Detected allow_any_instance_of. This RSpec method is highly discouraged, please only use when absolutely necessary.

@miq-bot
Copy link
Member

miq-bot commented Oct 27, 2016

Checked commit borod108@6789f44 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
8 files checked, 0 offenses detected
Everything looks good. 👍

@borod108
Copy link
Author

@durandom I made the changes you requested. can this be mereged
@miq-bot assign @durandom

@miq-bot miq-bot assigned durandom and unassigned blomquisg Oct 27, 2016
@borod108
Copy link
Author

@miq-bot add-label euwe/yes

Copy link
Member

@durandom durandom left a comment

Choose a reason for hiding this comment

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

🏆 from me @borod108 nice

@agrare can you have a look, because vmware is also concerned? And merge if ok

@agrare
Copy link
Member

agrare commented Oct 27, 2016

This isn't really related to your PR but do we actually use vm_quick_stats anywhere? We collect summary.quickStats.* for hosts but filter it out for VMs. I'm not even sure it would work since def quick_stats is only defined in gems/pending/VMwareWebService/MiqVimHost.rb

@agrare
Copy link
Member

agrare commented Oct 27, 2016

The VMware part looks good, euwe/yes is supposed to be bugs only now... @blomquisg ?

@oourfali
Copy link

@blomquisg this is a small and non risky one, as far as I see. what do you think?

@durandom
Copy link
Member

@miq-bot assign blomquisg

@blomquisg please merge and have a quick look at the last 2 comments about euwe/yes of this

@miq-bot miq-bot assigned blomquisg and unassigned durandom Oct 31, 2016
@blomquisg
Copy link
Member

I'll merge it to master and let @chessbyte make the call on whether this gets backported to Euwe.

@blomquisg blomquisg merged commit e44dbd2 into ManageIQ:master Nov 2, 2016
@blomquisg blomquisg added this to the Sprint 49 Ending Nov 14, 2016 milestone Nov 2, 2016
@chrispy1
Copy link

chrispy1 commented Nov 7, 2016

@miq-bot add_label blocker

@miq-bot miq-bot added the blocker label Nov 7, 2016
chessbyte pushed a commit that referenced this pull request Nov 7, 2016
@chessbyte
Copy link
Member

Euwe Backport details:

$ git log -1
commit 27afd0f94632d9042a797fe6fb3c78b7c8a44cae
Author: Greg Blomquist <blomquisg@gmail.com>
Date:   Wed Nov 2 17:44:05 2016 -0400

    Merge pull request #10505 from borod108/rfe/rhevm_quick_stats

    add quick_stats support for RHEVM host
    (cherry picked from commit e44dbd2693a4cd2a19a5aa3a87c05d6320ce9f4a)

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants