Re: cephadm for Ubuntu 24.04

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11-07-2024 14:20, John Mulligan wrote:
On Thursday, July 11, 2024 4:22:28 AM EDT Stefan Kooman wrote:
On 11-07-2024 09:55, Malte Stroem wrote:
Hello Stefan,

have a look:

https://docs.ceph.com/en/latest/cephadm/install/#curl-based-installation

Yeah, I have read that part.

Just download cephadm. It will work on any distro.

curl --silent --remote-name --location
https://download.ceph.com/rpm-18.2.1/el9/noarch/cephadm

./cephadm gather-facts
Traceback (most recent call last):
    File "<frozen runpy>", line 198, in _run_module_as_main
    File "<frozen runpy>", line 88, in _run_code
    File "/root/./cephadm/__main__.py", line 10700, in <module>
    File "/root/./cephadm/__main__.py", line 10688, in main
    File "/root/./cephadm/__main__.py", line 9772, in command_gather_facts
    File "/root/./cephadm/__main__.py", line 9762, in dump
    File "/root/./cephadm/__main__.py", line 9677, in kernel_security
    File "/root/./cephadm/__main__.py", line 9658, in _fetch_apparmor
ValueError: too many values to unpack (expected 2)

The version that works for 22.04 also doesn't work on 24.04 and fails in
a similar way.

It just isn't that simple I'm afraid. But it _should_ be that simple,
agreed.

You do not need any ceph package like ceph-common for example to run
cephadm.

Indeed, which is pretty neat. If cephadm works you can basically do all
ceph related stuff in a container. Getting cephadm to run on more
platforms is the last mile.

Gr. Stefan


Hi there,
The traceback you are hitting is a bug - there's a fix already applied to main:
https://github.com/ceph/ceph/pull/57955

Thanks, I hadn't found that one.

I'll ask to have backport PRs get generated. I'm personally pretty clueless as
to how to process backports.

Ah, yeah, that's on my todo list as well (work on backports). AFAIK you need to cherry pick from main branch when processing PRs.


The bug is independent of how cephadm is packaged FWIW. Even if you had a
package of just cephadm built for ubuntu 24.04 it would have still hit the
problem. The code simply didn't understand all the possible syntax that can
appear in the apparmor profiles and newer versions of ubuntu appear to use
apparmor profiles with spaces in the name more commonly than older versions.

Ah, that explains ...



The current cephadm build process creates a "zipapp" out of a few select
python packages and the cephadm source code. If you really want to you could
wrap that, and just that, in a system package what would not need many
dependencies. However, this would need to be a bespoke package as the packages
created by the ceph project include "everything" ceph builds. But the build
script for cephadm (./src/cephadm/build.py) doesn't need any of those other
binaries to be built to work. - In case you were still curious about that and
want to tinker.

You betcha. Okay, that worked perfectly. I backported the fixes from #57955 in cephadm.py (apparently there was a code refactor and cephadmlib does not exist in 18.2.1). This worked for me:

./src/cephadm/build.py --python /usr/bin/python3 /tmp/cephadm -SCEPH_GIT_VER=$(git rev-parse HEAD) -SCEPH_GIT_NICE_VER=$(git describe) -SCEPH_RELEASE_NAME=reef -SCEPH_RELEASE_TYPE=stable

This works fine on 24.04.

Getting this in a CI/CD pipeline whenever we need a new cephadm version and built a proper cephadm package we can install (instead of downloading a binary) would certainly be an option for us. Not sure if we are the only ones that want cephadm installed through packages though. Otherwise it would warrant an upstream cephadm package IMHO.

Thanks a lot!

Gr. Stefan
_______________________________________________
ceph-users mailing list -- ceph-users@xxxxxxx
To unsubscribe send an email to ceph-users-leave@xxxxxxx



[Index of Archives]     [Information on CEPH]     [Linux Filesystem Development]     [Ceph Development]     [Ceph Large]     [Ceph Dev]     [Linux USB Development]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [xfs]


  Powered by Linux