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

Validate CPU and Memory Hot-Plug settings in reconfigure #12275

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Oct 28, 2016

This validates a number of cases related to reconfigure on powered-on VMs that would lead to sometimes cryptic VMware error messages.

The cases covered are:

  1. Adding CPUs to a running VM that doesn't have CPU hot-add enabled
    screenshot from 2016-10-28 11-27-26
  2. Removing CPUs from a running VM
    screenshot from 2016-10-28 11-29-30
  3. Changing the number of cores per sockets on a running VM
    screenshot from 2016-10-28 11-31-56
  4. Adding memory to a running VM that doesn't have memory hot-add enabled
    screenshot from 2016-10-28 11-33-27
  5. Removing memory from a running VM
    screenshot from 2016-10-28 11-34-41
  6. Adding more than the memory hot-add limit to a running VM
    screenshot from 2016-10-28 11-36-40

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

@agrare agrare force-pushed the vmware/infra/cpu_memory_hot_add_validation branch from 3dee296 to a5615f9 Compare October 28, 2016 20:19
@agrare agrare force-pushed the vmware/infra/cpu_memory_hot_add_validation branch from a5615f9 to dad3b89 Compare November 7, 2016 13:43
@agrare agrare force-pushed the vmware/infra/cpu_memory_hot_add_validation branch from dad3b89 to d81a8f0 Compare November 14, 2016 14:35
@agrare
Copy link
Member Author

agrare commented Nov 23, 2016

@gmcculloug is this a good place to do this type of validation?

@agrare agrare force-pushed the vmware/infra/cpu_memory_hot_add_validation branch from d81a8f0 to cd7b2a3 Compare November 28, 2016 19:27
@gmcculloug
Copy link
Member

Yes, I think this makes sense. @lfu Please review.

@gmcculloug gmcculloug self-assigned this Nov 28, 2016
@agrare agrare force-pushed the vmware/infra/cpu_memory_hot_add_validation branch from cd7b2a3 to a908c66 Compare November 28, 2016 21:02
@agrare
Copy link
Member Author

agrare commented Nov 28, 2016

Thanks @gmcculloug , added some spec tests and taking out of WIP

@agrare agrare removed the wip label Nov 28, 2016
@agrare agrare changed the title [WIP] Validate CPU and Memory Hot-Plug settings in reconfigure Validate CPU and Memory Hot-Plug settings in reconfigure Nov 28, 2016
@agrare
Copy link
Member Author

agrare commented Nov 28, 2016

Linking another BZ to this PR https://bugzilla.redhat.com/show_bug.cgi?id=1396631

@@ -5,7 +5,7 @@
:name => 'test_vm',
:raw_power_state => 'poweredOff',
:storage => FactoryGirl.create(:storage, :name => 'storage'),
:hardware => FactoryGirl.create(:hardware, :cpu2x2, :ram1GB, :virtual_hw_version => "07")
:hardware => FactoryGirl.create(:hardware, :cpu4x2, :ram1GB, :virtual_hw_version => "07")
Copy link
Member

Choose a reason for hiding this comment

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

@agrare What is this change for?

Copy link
Member Author

Choose a reason for hiding this comment

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

That was so I didn't have to override the default options when I wanted to test just memory or just cpu, I just set it to match https://github.com/agrare/manageiq/blob/a908c662e367e695a58e365550bce7f769b0058f/spec/models/manageiq/providers/vmware/infra_manager/vm/reconfigure_spec.rb#L65

If you look at the rest of the changes in that commit I was able to remove a bunch of code that set the options to the current value, for example a908c66#diff-fafec56c2822f5c78227a8a11313bc6fL124

@lfu
Copy link
Member

lfu commented Dec 7, 2016

LGTM other than the minor question

@agrare
Copy link
Member Author

agrare commented Dec 7, 2016

This depends on #12145 which had a sql migration so setting this to euwe/no

@agrare agrare added the euwe/no label Dec 7, 2016
@agrare agrare force-pushed the vmware/infra/cpu_memory_hot_add_validation branch from a908c66 to 0110761 Compare January 9, 2017 20:40
@miq-bot
Copy link
Member

miq-bot commented Jan 9, 2017

Checked commits agrare/manageiq@4783ce6~...0110761 with ruby 2.2.5, rubocop 0.37.2, and haml-lint 0.16.1
3 files checked, 10 offenses detected

app/models/manageiq/providers/vmware/infra_manager/vm/reconfigure.rb

spec/models/manageiq/providers/vmware/infra_manager/vm/reconfigure_spec.rb

@agrare
Copy link
Member Author

agrare commented Jan 10, 2017

@gmcculloug can this be merged?

@gmcculloug
Copy link
Member

It can! Thanks.

@gmcculloug gmcculloug merged commit 350e41f into ManageIQ:master Jan 10, 2017
@gmcculloug gmcculloug added this to the Sprint 52 Ending Jan 16, 2017 milestone Jan 10, 2017
@agrare agrare deleted the vmware/infra/cpu_memory_hot_add_validation branch February 2, 2017 15:25
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.

5 participants