-
Notifications
You must be signed in to change notification settings - Fork 40
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
Allow volumes to be updated #43
Conversation
ping? |
could you please approve this change and prepare a new rbovirt release? |
Mind dropping some integration tests? The code looks good. @abonas ? |
8ce6df2
to
553c4a3
Compare
I just updated this PR. Compared to the original PR only the desired volume attributes are updated (instead of some additional default fallback attributes) and a testcase was added to test this functionality. I can confirm that the tests succeed against a RHEV 3.4.1 environment (the commit from #44 is also needed to make the tests succeed). The tests fail against an oVirt 3.5 CentOS 6 Live environment (the updated volume size doesn't get shown after the resize), but I guess this is due to an oVirt bug as the new size also can't be seen in the oVirt administration portal itself after the resize. |
storage_domain_id = opts[:storage_domain] || storagedomains(:role => 'data', :search => search).first.id | ||
http_post("/vms/%s/disks" % vm_id, OVIRT::Volume.to_xml(storage_domain_id, opts)) | ||
opts[:storage_domain_id] = opts[:storage_domain] || storagedomains(:role => 'data', :search => search).first.id | ||
opts[:size] = 8589934592 unless opts[:size] |
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.
could you leave a comment regarding what 8589934592 means?
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.
Comment was added and a more readable form was applied in the updated commit
By supplying an opts hash containing a key named :size the size of a volume can be changed
553c4a3
to
0f29709
Compare
@jhernand can you please review? |
I'm ok with merging these changes if we agree that the |
By the way, I just tested this with the latest oVirt Engine master and the disk is resized correctly. @epienbroek, if you see this issue again please open an oVirt Engine bug. |
Okay, good to know that it works in oVirt master. I used the live iso from http://resources.ovirt.org/pub/ovirt-3.5/iso/ovirt-live-el6-3.5.0.iso which probably has a bug in this area |
This allows volumes to be resized