Skip to content
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

Merged
merged 15 commits into from Oct 10, 2018
Merged

ceph-osd: ceph-volume container support #2866

merged 15 commits into from Oct 10, 2018

Conversation

leseb
Copy link
Member

@leseb leseb commented Jul 9, 2018

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:

@leseb leseb added the DNM Do NOT merge label Jul 9, 2018
@@ -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"
Copy link
Contributor

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"?

Copy link
Member Author

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.

prepare_osd(module)
activate_osd(module)
elif action == "prepare":
activate_osd(module)
Copy link
Contributor

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)

@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 12, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 12, 2018
@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb force-pushed the ceph-volume-container branch 2 times, most recently from 3382967 to a0bbe4e Compare July 13, 2018 13:41
@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title [skip ci] ceph-osd: ceph-volume container support ceph-osd: ceph-volume container support Jul 13, 2018
@leseb leseb changed the title ceph-osd: ceph-volume container support [skip ci] ceph-osd: ceph-volume container support Jul 16, 2018
@leseb
Copy link
Member Author

leseb commented Oct 10, 2018

jenkins test luminous-lvm_batch_container

@leseb
Copy link
Member Author

leseb commented Oct 10, 2018

jenkins test luminous-lvm_osds_container

@leseb
Copy link
Member Author

leseb commented Oct 10, 2018

jenkins test luminous-bluestore_lvm_osds_container

@leseb
Copy link
Member Author

leseb commented Oct 10, 2018

jenkins test luminous-lvm_batch

@leseb leseb removed DNM Do NOT merge cafoutche labels Oct 10, 2018
leseb and others added 15 commits October 10, 2018 14:32
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>
@leseb
Copy link
Member Author

leseb commented Oct 10, 2018

jenkins test pipeline

@leseb
Copy link
Member Author

leseb commented Oct 10, 2018

Tests for docker_cluster and centos7 will be fixed in #3187

@guits
Copy link
Collaborator

guits commented Oct 10, 2018

failures are expected, merging anyway

@guits guits merged commit 31a0438 into master Oct 10, 2018
@guits guits deleted the ceph-volume-container branch October 10, 2018 20:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants