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

octopus: cephadm: run containers using --init #39914

Merged
merged 6 commits into from
Mar 26, 2021

Conversation

mgfritch
Copy link
Contributor

@mgfritch mgfritch commented Mar 8, 2021

backport of #37764 and #39739
Fixes: https://tracker.ceph.com/issues/49223

Signed-off-by: Michael Fritch mfritch@suse.com

Checklist

  • References tracker ticket
  • Updates documentation if necessary
  • Includes tests for new functionality or reproducer for bug

Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox

adopt command allows for the `--container-init` flag

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit d89fae5)
generally all ceph containers need an init process to both reap any
zombie pids and/or perform signal handling (e.g. coredumps, etc.)

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 9ac2ab8)
allow for the `--init` flag to be passed during `cephadm shell`

Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 5750589)
liewegas and others added 3 commits March 8, 2021 07:34
If we are in a container, then we do not have a unique pid, and need to
use a random nonce.  We normally detect this if our pid is 1, but that
doesn't work when we have a init process--we'll (probably?) have a small
pid (in my tests, the OSDs were getting pid 7).

To be safe, also check for an environment variable set by cephadm.

This avoids problems that arise when we don't have a unique address.

Fixes: https://tracker.ceph.com/issues/49534
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit d18f608)
This ensures that daemon messenger nonces don't collide by using PIDs that are
no longer unique for the IP address.

Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit 576823b)
octopus supports podman < 2.0 which does not have the `--init` flag

Signed-off-by: Michael Fritch <mfritch@suse.com>
@mgfritch mgfritch force-pushed the octopus-backport-37764-39739 branch from a39eae1 to 82d30af Compare March 8, 2021 14:34
@mgfritch mgfritch changed the title octopus: cephadm: run containers using --init by default octopus: cephadm: run containers using --init Mar 8, 2021
Copy link
Member

@ideepika ideepika left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@yuriw yuriw merged commit a99c049 into ceph:octopus Mar 26, 2021
@mgfritch mgfritch deleted the octopus-backport-37764-39739 branch April 12, 2021 16:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants