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
Implement SSA of network-mounted HyperV virtual disks #6945
Conversation
0224a0c
to
e18054a
Compare
(most) Rubocop issues addressed and re-pushed. |
e18054a
to
70b8215
Compare
Added the Gemfile changes for Rubyzip from #6938 otherwise dependencies cannot be met. |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
@Fryguy @roliveri @djberg96 I have two PRs in to the winrm-elevated gem (I split the original one). One in particular changes the gemspec file to allow us to use a winrm gem of 1.5 or greater - it is set to ~>1.3 right now which will not allow us to use the "executor" methods of winrm 1.5 to speed up our SSA on HyperV. |
f374397
to
591cf41
Compare
@Fryguy @roliveri winrm-elevated gem changes have been merged into the gem as version 0.2.0. I have changed our Gemfile to point to the new version in this PR and pushed them but we cannot merge this PR until the gem is deployed. Based on the speed with which the owners typically do so, it should be available within the next day or so. Til then the tests for this PR will fail since the gem won't be available. |
winrm-elevated 0.2.0 has been distributed with the changes required by this PR. |
@@ -281,7 +281,7 @@ def get_eligible_proxies_for_job(job) | |||
end | |||
|
|||
if @vm.storage.nil? | |||
unless ['Amazon', 'OpenStack'].include?(@vm.vendor) | |||
unless %w(Amazon OpenStack Microsoft).include?(@vm.vendor) |
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.
@roliveri would be good (in a future PR) to ask the @vm
object a question instead of having the knowledge here of which vendors are supported.
@chessbyte I'm looking into what that would take... |
@total_copy_from_remote_time += t2 - t1 | ||
@total_read_execution_time += Time.now.getlocal - t1 | ||
buffer | ||
until retries == BREAD_RETRIES |
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.
You could make this;
(0...BREAD_RETRIES).each do
Then, you wouldn't need to increment and compare the retries
variable.
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.
Will do.
@djberg96 or someone else on the @blomquisg team - if I can get your ok on the changes I've made in the ManageIQ::Providers::Microsoft::InfraManager space for this PR that would be helpful. Still looking into specs for this as well as comparison testing for performance. |
<pr_mergeability_checker />This pull request is not mergeable. Please rebase and repush. |
@djberg96 would still like sign-off on the minor (as I see it) changes made to the provider as mentioned previously. |
Rubocop spec complaints addressed as well. |
4f8808e
to
439a90e
Compare
Add changes to implement running SSA on HyperV virtual disks which are network mounted on the server. 1) in the MiqScvmmVm.init_disk_info determine whether a disk is network mounted. 2) in the Vhdx and Vhd disk modules pass the network attribute when instantiating a MiqHyperVDisk, and pass the attribute along when getting a parent disk (in the case of checkpoints/snapshots). 3) Add the winrm-elevated accessor to MiqWinRM, and make sure MiqHyperVDisk uses the correct accessor to run remote commands depending upon whether the virtual disk is remote-mounted or not. 4) Allow scanning of Microsoft VMs without storage in the DB (See Issue ManageIQ#5383)
Add changes to implement running SSA on HyperV virtual disks which are network mounted on the server. 1) in the MiqScvmmVm.init_disk_info determine whether a disk is network mounted. 2) in the Vhdx and Vhd disk modules pass the network attribute when instantiating a MiqHyperVDisk, and pass the attribute along when getting a parent disk (in the case of checkpoints/snapshots). 3) Add the winrm-elevated accessor to MiqWinRM, and make sure MiqHyperVDisk uses the correct accessor to run remote commands depending upon whether the virtual disk is remote-mounted or not. 4) Allow scanning of Microsoft VMs without storage in the DB (See Issue ManageIQ#5383)
Add rspec tests for various interfaces modified by this feature request, including: 1) Allow a network boolean argument to be passed to the MiqHyperVDisk object 2) Allow creation of the WinRM elevated runner 3) Validate interfaces added to the ManageIQ/Providers/Microsoft/InfraManager/Vm and Template objects. Also move winrm & winrm-elevated gems from the top-level Gemfile to that under gems/pending to allow gems/pending spec tests to succeed when run by Travis.
439a90e
to
a728b9b
Compare
<github_pr_commenter_batch />Some comments on commits jerryk55/manageiq@69eaa9e~...a728b9b |
Checked commits jerryk55/manageiq@69eaa9e~...a728b9b with ruby 2.2.3, rubocop 0.37.2, and haml-lint 0.16.1 app/models/manageiq/providers/microsoft/infra_manager/template.rb
app/models/manageiq/providers/microsoft/infra_manager/vm.rb
|
Looks good to me. I checked out this branch, added an Azure cloud provider instance, and an SCVMM infrastructure provider instance, and ran a refresh on each. Worked fine for both. |
@jerryk55 - just double checking before merge. All the updated GEM dependencies are available? |
@roliveri yes. However please hold off on the merge for one more check. I was testing on a Raleigh-based appliance that was cobbled together manually and ran into the 1500 operations limit on winrm - which should be fixed by the correct version of the gem. I need to re-confirm that fix. |
Implement SSA of network-mounted HyperV virtual disks
Add changes to implement running SSA on HyperV virtual disks which are
network mounted on the server.
a MiqHyperVDisk, and pass the attribute along when getting a parent disk (in the
case of checkpoints/snapshots).
accessor to run remote commands depending upon whether the virtual disk is remote-mounted
or not.
Prerequisites:
@Fryguy @jrafanie @chessbyte @roliveri Please review, comment, and merge when appropriate.
I will reach out to the winrm-elevated gem owner to see what we can expect from him.
Thanks.