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
Don't send 'next_run=false' to oVirt 3.6 #13677
Don't send 'next_run=false' to oVirt 3.6 #13677
Conversation
@jhernand tests fails due to the change. |
In oVirt virtual machines have two sets of settings: the settings used by the current running virtual machine, and the settings that will be used the next time the virtual machine is started. To select which one to update it is necessary to use the 'next_run' parameter. For example, to update the memory that will be used the next time is started the API request should be like this: PUT /ovirt-engine/api/vms/{vm:id};next_run=true The value 'false' should tell the server to update the current running configuration. But in version 3.6 of oVirt it is just ignored, the mere presence of the 'next_run' parameter is interpreted as a request to modify the next start settings, regardless of its value. Currently the oVirt provider uses 'next_run=false' explicitly, and as a result it fails to update the current settings. This patch changes the provider so that it doesn't send the 'next_run' parameter when its value is 'false'. https://bugzilla.redhat.com/1356468
@masayag you are right, I forgot to update the tests. It should be fixed now. |
Checked commit https://github.com/jhernand/manageiq/commit/21d820eac6c929f8c552776649b072cbaadbe2f6 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
@durandom can you review/merge? |
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.
@@ -157,7 +157,7 @@ def update_vm_memory(vm, virtual) | |||
state = vm.attributes.fetch_path(:status, :state) | |||
if state == 'up' | |||
vm.update_memory(virtual, guaranteed, :next_run => true) | |||
vm.update_memory(virtual, nil, :next_run => false) | |||
vm.update_memory(virtual, nil) |
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.
@jhernand does it make sense to toggle on ovirt versions +3.6? Or are we assuming the absence of this will always be next_run => false
?
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.
next_run=false
is the default in all versions of oVirt, so there is no need to toggle.
…_ovirt Don't send 'next_run=false' to oVirt 3.6 (cherry picked from commit 7194f99) https://bugzilla.redhat.com/show_bug.cgi?id=1404316
Euwe backport details:
|
In oVirt virtual machines have two sets of settings: the settings used
by the current running virtual machine, and the settings that will be
used the next time the virtual machine is started. To select which one
to update it is necessary to use the 'next_run' parameter. For example,
to update the memory that will be used the next time is started the
API request should be like this:
PUT /ovirt-engine/api/vms/{vm:id};next_run=true
The value 'false' should tell the server to update the current running
configuration. But in version 3.6 of oVirt it is just ignored, the mere
presence of the 'next_run' parameter is interpreted as a request to
modify the next start settings, regardless of its value.
Currently the oVirt provider uses 'next_run=false' explicitly, and as a
result it fails to update the current settings. This patch changes the
provider so that it doesn't send the 'next_run' parameter when its value
is 'false'.
https://bugzilla.redhat.com/1356468