Project

General

Profile

Actions

Feature #56390

open

Running teuthology locally with loop device storage for OSDs

Added by Zack Cerza almost 2 years ago. Updated over 1 year ago.

Status:
In Progress
Priority:
Normal
Assignee:
Category:
-
% Done:

0%

Source:
Tags:
Backport:
Reviewed:
Affected Versions:

Description

Our previous work getting the full teuthology stack running locally has been successful, but has limitations. On machines without extra storage available to dedicate to a Ceph cluster, we're unable to run tests that need OSDs. This includes most laptops.

Separately, I've been doing work on a cephadm tool that can stand up a Ceph cluster using /dev/loopN as devices for OSDs. This work also depends on this ceph-volume PR. These devices have to be set up as 'raw' as opposed to using LVM because podman will not support device-mapper

We can adapt this to work with or inside of teuthology by taking the docker-compose work we've done and combining it with the above to create something new. I've created an outline of how this might go:

  1. Decide if this should be implemented as part of teuthology or as an external tool
    1. IMO it should be written in Python as opposed to bash; it needs to create containers, keep track of them, and destroy them later
  2. Convert docker-compose.yml to podman run commands (I did a version of this in the branch mentioned above). This is necessary because the only way unmask /sys/dev/block is via a CLI flag. It was implemented in this PR.
    1. Decide if loop devs should be created on the host itself or within the testnode containers
  3. Modify the cephadm task (if necessary) to work with our containerized testnodes
    1. Optionally, also allow it to use a cephadm container instead of downloading the Python module from a remote git repo
  4. Figure out how to start up new containers after we destroy the ones we've used

Once 1 is decided, 2, 3 and 4 could be worked on in parallel. I think it might be smart to start work in a new repo until we decide it should (or must) be part of teuthology.

Feedback welcome!

Actions #1

Updated by Zack Cerza almost 2 years ago

Re: 2, I made a tool to convert docker-compose files: podman-decompose

Actions #2

Updated by Zack Cerza almost 2 years ago

Pere's work, which this is partially conceptually based on, was merged. My ceph-volume work, which allows us to support actual OSDs, was merged as well. I'm working on updating my WIP branch which I'd been maintaining with draft versions of all of that, plus my own work to get OSDs working.

Pere's work did change substantially before it was merged; it now supports both podman and docker via podman-compose and docker-compose - though it of course doesn't support OSDs with podman. I need to decide if there's any reason to continue to support docker-compose, but unfortunately Pere is out until 7/25.

Actions #3

Updated by Zack Cerza over 1 year ago

  • Status changed from New to In Progress
  • Assignee set to Zack Cerza

Amazed I haven't updated this ticket in so long. In the meantime I've done a lot of work on all of the above.

ceph-devstack should be able to fully replace teuthology's docker-compose-based utility, and is nearly able to build ceph from source from inside a container. Creating container images based on that is not yet done. I've got to get some changes into both ceph and teuthology to fully enable this work, but ceph-devstack's README is written in that context, so people should be able to pick it up as-is.

Actions #4

Updated by Zack Cerza over 1 year ago

There will be a few ceph PRs:

  1. ☑︎ Task updates
  2. ☑︎ A fix for a dependency regression
  3. a cephadm task bugfix
  4. cephadm: Drop KillMode from systemd unit files
  5. ☑︎ mgr/dashboard: Fix broken Fedora image URL
  6. A new, very small cephadm suite
And at least two teuthology PRs:
  1. ☑︎ misc.get_scratch_devices(): Ignore devtmpfs
  2. the rest of this branch

(I am updating this comment as I file PRs, and as their status changes)

Actions #5

Updated by Zack Cerza over 1 year ago

Here's the WIP of ceph-devstack building ceph in a container

Actions #6

Updated by Zack Cerza over 1 year ago

A snag: while looking into converting our "integration" github action, which uses the docker-compose method, I noticed that the only Linux runners that github provides are Ubuntu. TravisCI, CircleCI, and CirrusCI only support Ubuntu as well.

Actions

Also available in: Atom PDF