]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
cephadm/box: Rootless podman box implementation
authorPere Diaz Bou <pdiazbou@redhat.com>
Thu, 21 Apr 2022 09:12:14 +0000 (11:12 +0200)
committerPere Diaz Bou <pdiazbou@redhat.com>
Fri, 8 Jul 2022 08:02:53 +0000 (10:02 +0200)
commitd4e6763a19fb91cd0b25c835ed9f9ccbfe70c07f
tree407609db69901ab4526ba8e1f05a85834b0cd012
parentf6a70c0e8e6bfb544484a765e92a9a427cc041c9
cephadm/box: Rootless podman box implementation

Even though box is a rootless podman container, there are some
capabilities that are need like SYS_ADMIN, NET_ADMIN and SYS_TIME.

In rootless podman chronyd is not capabable of using adjtimex syscall
so we had to add -x flag to chronyd entrypoint which states it will
not try to call that function.

To test run `./box.py -v cluster start`.

To fix: There are some problems with /dev permissions so osds cannot be
deployed still. `./box.py cluster start --expanded` won't fully work.

Details:
- Dockerfile:
  - Fedora image instead of centos.
  - Tons of basic packages aren't installed, therefore, those are
  explicitly installed.
  - Some container folders are created. It isn't clear/tested whether
  those are needed.
  - .box_container is an empty file to identify if a command is ran on
  containers (see box.py for usage).
- box.py
  - podman-compose is missing some features but it compensates with args
  as --podman-run-args so you can add some extra commands whenever
  podman-compose calls podman run.
  - sudo ./box.py cluster start will exit since it can be dangerous.
  - Added some sed trickeroo to modify chronyd options. (I don't know
  how can I pass OPTIONS to it :P)
 - host.py
   - setup_ssh now is need on every box container.
- util.py
  - rice command printing :3.
  - run multiple commands with a multiline string.

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
doc/dev/cephadm/developing-cephadm.rst
src/cephadm/box/Dockerfile
src/cephadm/box/box.py
src/cephadm/box/docker-compose.yml
src/cephadm/box/host.py
src/cephadm/box/osd.py
src/cephadm/box/util.py