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
ceph-osd: ceph-volume container support #2866
Conversation
library/ceph_volume.py
Outdated
@@ -153,16 +177,12 @@ def create_osd(module): | |||
wal_vg = module.params.get('wal_vg', None) | |||
crush_device_class = module.params.get('crush_device_class', None) | |||
dmcrypt = module.params['dmcrypt'] | |||
containerized = module.params.get('containerized') | |||
subcommand = "create" |
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.
Shouldn't this be subcommand = "prepare"
?
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.
@andrewschoen thanks for the review even though this wasn't ready for review :), will address your comments soon.
library/ceph_volume.py
Outdated
prepare_osd(module) | ||
activate_osd(module) | ||
elif action == "prepare": | ||
activate_osd(module) |
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.
This should beprepare_osd(module)
c9bca7d
to
e6a0838
Compare
4445ea8
to
9b75bd7
Compare
9b75bd7
to
3a026b5
Compare
3382967
to
a0bbe4e
Compare
a0bbe4e
to
a12fdaa
Compare
a12fdaa
to
0a3c31b
Compare
0a3c31b
to
90fd0e5
Compare
90fd0e5
to
0b6f2dd
Compare
0b6f2dd
to
43f1ba7
Compare
43f1ba7
to
bb61beb
Compare
jenkins test luminous-lvm_batch_container |
d29a1ec
to
52de7a6
Compare
jenkins test luminous-lvm_osds_container |
jenkins test luminous-bluestore_lvm_osds_container |
jenkins test luminous-lvm_batch |
Signed-off-by: Sébastien Han <seb@redhat.com>
If we run on a containerized deployment we pass an env variable which contains the container image. Signed-off-by: Sébastien Han <seb@redhat.com>
The batch option got recently added, while rebasing this patch it was necessary to implement it. So now, the batch option can work on containerized environments. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1630977 Signed-off-by: Sébastien Han <seb@redhat.com>
expose_partitions is only needed on ceph-disk OSDs so we don't need to activate this code when running lvm prepared OSDs. Signed-off-by: Sébastien Han <seb@redhat.com>
We don't need to pass the hostname on the container name but we can keep it simple and just call it ceph-osd-$id. Signed-off-by: Sébastien Han <seb@redhat.com>
We don't need to pass the device and discover the OSD ID. We have a task that gathers all the OSD ID present on that machine, so we simply re-use them and activate them. This also handles the situation when you have multiple OSDs running on the same device. Signed-off-by: Sébastien Han <seb@redhat.com>
ceph-disk will be removed in 3.3 and we encourage to start using ceph-volume as of 3.2. Signed-off-by: Sébastien Han <seb@redhat.com>
Now we use id of the OSD instead of the device name. Signed-off-by: Sébastien Han <seb@redhat.com>
Now that the container is named ceph-osd@<id> looking for something that contains a host is not necessary. This is also backward compatible as it will continue to match container names with hostname in them. Signed-off-by: Sébastien Han <seb@redhat.com>
The restart script wasn't working with the current new addition of ceph-volume in container where now OSDs have the OSD id name in the container name. Signed-off-by: Sébastien Han <seb@redhat.com>
This task was created for ceph-disk based deployments so it's not needed when osd are prepared with ceph-volume. Signed-off-by: Sébastien Han <seb@redhat.com>
Simply add that all the scenarios support the containerized deployment option. Signed-off-by: Sébastien Han <seb@redhat.com>
Signed-off-by: Sébastien Han <seb@redhat.com>
we need to detect whether we are running on atomic host to not try to install lvm2 package. Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
This commit does a couple of things: * Avoid code duplication * Clarify the code * add more unit tests * add myself to the author of the module Signed-off-by: Sébastien Han <seb@redhat.com>
52de7a6
to
82d80aa
Compare
jenkins test pipeline |
Tests for docker_cluster and centos7 will be fixed in #3187 |
failures are expected, merging anyway |
Signed-off-by: Sébastien Han seb@redhat.com
Closes: #2717
todo:
add code to support ceph-volume in container on the ceph_volume module
add code to support ceph-volume in container in the playbook
implement batch command in container
add doc
add warning flag explaining as of 3.2 ceph-disk won't be supported anymore (code will remain though), the ceph-disk code will go away on 3.3
add new functionnal tests for ceph-volume container
Remaining TODO in another PR:
add support in shrink-osd.yml container for ceph-volume
add support in purge-docker-cluster.yml ceph-osd: ceph-volume container support #2866