-
Notifications
You must be signed in to change notification settings - Fork 43
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 Ceph multiple pools and tests #167
base: master
Are you sure you want to change the base?
Conversation
@@ -346,13 +346,13 @@ def to_xml | |||
|
|||
volumes.each_with_index do |volume, index| | |||
target_device = "vd#{('a'..'z').to_a[index]}" | |||
if ceph_args && volume.pool_name.include?(ceph_args["libvirt_ceph_pool"]) | |||
if ceph_args && ceph_args["libvirt_ceph_pool"]&.split(",")&.include?(volume.pool_name) |
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.
I'd prefer to fix this up in read_ceph_args
so you don't do this in a loop. Same below for the monitor. Perhaps also add in .map(&:strip)
so you can also use spaces between the values while you're at it.
Another thing is that libvirt_ceph_pools
suggests it's singular while so perhaps store the result of that as libvirt_ceph_pools
to indicate it's an array?
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.
Ok ! I have updated the branch to move the split and verify keys in the read_ceph_args.
@@ -363,7 +363,7 @@ def to_xml | |||
end | |||
end | |||
|
|||
xml.target(:dev => target_device, :bus => args["bus_type"] == "virtio" ? "virtio" : "scsi") | |||
xml.target(:dev => target_device, :bus => ceph_args["bus_type"] == "virtio" ? "virtio" : "scsi") |
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.
I merged this separate so it properly closed the issue. Doing 2 different things (fixing a bug and adding a new feature) in the same commit is something I prefer to avoid.
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.
Ok, I haven't seen the fix when I have started to work on it. I will rebase the merge on it.
51d0a00
to
cb6c1cb
Compare
Hello,
Following the issue #162, I have implemented the capability to handle multiple Ceph RBD Pool by using a comma-separated list on the ceph.conf file.
Regarding the Libvirt documentation, the host tag must be in the source tag and not after. I have fix them also.
I have also implemented the tests to handle the Ceph part by using a mock of the File object.
Feel free if you have questions