Commit Graph

1496 Commits

Author SHA1 Message Date
Patrick Donnelly
a6245eec07 tools/cephfs: add new cephfs-tool
This patch introduces `cephfs-tool`, a new standalone C++ utility
designed to interact directly with `libcephfs`.

While the tool is architected to support various subcommands in the
future, the initial implementation focuses on a `bench` command to
measure library performance. This allows developers and administrators
to benchmark the userspace library isolated from FUSE or Kernel client
overheads.

Key features include:
* Multi-threaded Read/Write throughput benchmarking.
* Configurable block sizes, file counts, and fsync intervals.
* Detailed statistical reporting (Mean, Std Dev, Min/Max) for throughput and IOPS.
* Support for specific CephFS user/group impersonation (UID/GID) via `ceph_mount_perms_set`.

As an example test on a "trial" sepia machine against the new LRC, I
used a command like:

    pdonnell@trial154:~$ env CEPH_ARGS="--log-to-stderr=false --log-to-file=false --log-file=/tmp/bench.log" ./cephfs-tool -c ~/ceph.conf -k ~/keyring -i scratch --filesystem scratch  bench --root-path=/pdonnell --files 256 --size=$(( 128 * 2 ** 20 )) --threads=8 --iterations 3
    Benchmark Configuration:
      Threads: 8 | Iterations: 3
      Files: 256 | Size: 134217728
      Filesystem: scratch
      Root: /pdonnell
      Subdirectory: bench_run_d942
      UID: -1
      GID: -1

    --- Iteration 1 of 3 ---
    Starting Write Phase...
      Write: 2761.97 MB/s, 21.5779 files/s (11.864s)
    Starting Read Phase...
      Read:  2684.36 MB/s, 20.9716 files/s (12.207s)

    --- Iteration 2 of 3 ---
    Starting Write Phase...
      Write: 2698.51 MB/s, 21.0821 files/s (12.143s)
    Starting Read Phase...
      Read:  2682.16 MB/s, 20.9544 files/s (12.217s)

    --- Iteration 3 of 3 ---
    Starting Write Phase...
      Write: 2720.69 MB/s, 21.2554 files/s (12.044s)
    Starting Read Phase...
      Read:  2695.18 MB/s, 21.0561 files/s (12.158s)

    *** Final Report ***

    Write Throughput Statistics (3 runs):
      Mean:    2727.06 MB/s
      Std Dev: 26.2954 MB/s
      Min:     2698.51 MB/s
      Max:     2761.97 MB/s

    Read Throughput Statistics (3 runs):
      Mean:    2687.24 MB/s
      Std Dev: 5.68904 MB/s
      Min:     2682.16 MB/s
      Max:     2695.18 MB/s

    File Creates Statistics (3 runs):
      Mean:    21.3051 files/s
      Std Dev: 0.205433 files/s
      Min:     21.0821 files/s
      Max:     21.5779 files/s

    File Reads (Opens) Statistics (3 runs):
      Mean:    20.994 files/s
      Std Dev: 0.0444456 files/s
      Min:     20.9544 files/s
      Max:     21.0561 files/s

    Cleaning up...

For a 25Gb NIC, this is just about saturating the sticker bandwidth with
a single shared mount and 8 threads. For a per-thread mount:

    pdonnell@trial154:~$ env CEPH_ARGS="--log-to-stderr=false --log-to-file=false --log-file=/tmp/bench.log" ./cephfs-tool -c ~/ceph.conf -k ~/keyring -i scratch --filesystem scratch  bench --root-path=/pdonnell --files 256 --size=$(( 128 * 2 ** 20 )) --threads=8 --iterations 3 --per-thread-mount
    Benchmark Configuration:
      Threads: 8 | Iterations: 3
      Files: 256 | Size: 134217728
      Filesystem: scratch
      Root: /pdonnell
      Subdirectory: bench_run_9d1c
      UID: -1
      GID: -1

    --- Iteration 1 of 3 ---
    Starting Write Phase...
      Write: 2691.2 MB/s, 21.025 files/s (12.176s)
    Starting Read Phase...
      Read:  2486.76 MB/s, 19.4278 files/s (13.177s)

    --- Iteration 2 of 3 ---
    Starting Write Phase...
      Write: 2688.77 MB/s, 21.006 files/s (12.187s)
    Starting Read Phase...
      Read:  2496.42 MB/s, 19.5033 files/s (13.126s)

    --- Iteration 3 of 3 ---
    Starting Write Phase...
      Write: 2692.08 MB/s, 21.0319 files/s (12.172s)
    Starting Read Phase...
      Read:  2488.27 MB/s, 19.4396 files/s (13.169s)
    *** Final Report ***

    Write Throughput Statistics (3 runs):
      Mean:    2690.68 MB/s
      Std Dev: 1.40086 MB/s
      Min:     2688.77 MB/s
      Max:     2692.08 MB/s

    Read Throughput Statistics (3 runs):
      Mean:    2490.48 MB/s
      Std Dev: 4.24374 MB/s
      Min:     2486.76 MB/s
      Max:     2496.42 MB/s

    File Creates Statistics (3 runs):
      Mean:    21.0209 files/s
      Std Dev: 0.0109442 files/s
      Min:     21.006 files/s
      Max:     21.0319 files/s

    File Reads (Opens) Statistics (3 runs):
      Mean:    19.4569 files/s
      Std Dev: 0.0331542 files/s
      Min:     19.4278 files/s
      Max:     19.5033 files/s

    Cleaning up...

Or to measure file create performance:

    pdonnell@trial154:~$ env CEPH_ARGS="--log-to-stderr=false --log-to-file=false --log-file=/tmp/bench.log" ./cephfs-tool -c ~/ceph.conf -k ~/keyring -i scratch --filesystem scratch  bench --root-path=/pdonnell --files=$(( 2 ** 16 )) --size=$(( 0 * 2 ** 20 )) --threads=8 --iterations 3
    Benchmark Configuration:
      Threads: 8 | Iterations: 3
      Files: 65536 | Size: 0
      Filesystem: scratch
      Root: /pdonnell
      Subdirectory: bench_run_d435
      UID: -1
      GID: -1

    --- Iteration 1 of 3 ---
    Starting Write Phase...
      Write: 3974.77 files/s (16.488s)
    Starting Read Phase...
      Read:  14537.7 files/s (4.508s)
    Cleaning up for next iteration...

    --- Iteration 2 of 3 ---
    Starting Write Phase...
      Write: 4167.1 files/s (15.727s)
    Starting Read Phase...
      Read:  13636.3 files/s (4.806s)
    Cleaning up for next iteration...

    --- Iteration 3 of 3 ---
    Starting Write Phase...
      Write: 3863.7 files/s (16.962s)
    Starting Read Phase...
      Read:  14972.8 files/s (4.377s)

    *** Final Report ***

    File Creates Statistics (3 runs):
      Mean:    4001.86 files/s
      Std Dev: 125.337 files/s
      Min:     3863.7 files/s
      Max:     4167.1 files/s

    File Reads (Opens) Statistics (3 runs):
      Mean:    14382.3 files/s
      Std Dev: 556.594 files/s
      Min:     13636.3 files/s
      Max:     14972.8 files/s

    Cleaning up...

Here is the current help text:

    Usage: cephfs-bench [general-options] <command> [command-options]

    Commands:
      bench      Run IO benchmark

    Allowed options:

    General Options:
      -h [ --help ]                   Produce help message
      -c [ --conf ] arg               Ceph config file path
      -i [ --id ] arg (=admin)        Client ID
      -k [ --keyring ] arg            Path to keyring file
      --filesystem arg                CephFS filesystem name to mount
      --uid arg (=-1)                 User ID to mount as
      --gid arg (=-1)                 Group ID to mount as

    Benchmark Options (used with 'bench' command):
      --threads arg (=1)              Number of threads
      --iterations arg (=1)           Number of iterations
      --files arg (=100)              Total number of files
      --size arg (=4MB)               File size (e.g. 4MB, 0 for creates only)
      --block-size arg (=4MB)         IO block size (e.g. 1MB)
      --fsync-every arg (=0)          Call fsync every N bytes
      --prefix arg (=benchmark_)      Filename prefix
      --dir-prefix arg (=bench_run_)  Directory prefix
      --root-path arg (=/)            Root path in CephFS
      --per-thread-mount              Use separate mount per thread
      --no-cleanup                    Disable cleanup of files

AI-Assisted: significant portions of this code were AI-generated through a dozens of iterative prompts.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
2026-04-14 08:48:54 -04:00
Kefu Chai
d1d07a0542 debian: remove stale distutils override from py3dist-overrides
distutils was deprecated in Python 3.10 (PEP 632) and removed in
Python 3.12. The `python3-distutils` package no longer exists in
Debian Trixie (Python 3.13) or Ubuntu 24.04+ (Python 3.12).

The only runtime reference was in `debian/ceph-mgr.requires`, already
cleaned up by 3fb3f892aa. This override is now dead code, hence no
installed file declares a runtime dependency on `distutils`, so
`dh_python3` never resolves it. Removing it prevents a latent
uninstallable-dependency bug if `distutils` were accidentally
reintroduced in a `.requires` file.

Fixes: https://tracker.ceph.com/issues/75901
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-04-08 15:35:38 +08:00
Tomer Haskalovitch
c39d87e49b mgr/nvmeof: intergrate module into build and debian pkg
Fixes: https://tracker.ceph.com/issues/74702

Signed-off-by: Tomer Haskalovitch <tomer.haska@ibm.com>
(cherry picked from commit 901ec98b41)
2026-03-10 21:50:02 +02:00
Nizamudeen A
805aa0b1ae Merge pull request #67227 from rhcs-dashboard/isolate-cherrypy
mgr: isolated CherryPy to prevent global state sharing

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Redouane Kachach <rkachach@redhat.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Ankush Behl <cloudbehl@gmail.com>
2026-03-03 12:44:50 +05:30
Patrick Donnelly
df0028f0fe Revert "Merge pull request #67167 from Hezko/nvme-module-two"
This PR broke the ceph-mgr [1] and was not QA'd more broadly.

[1] https://github.com/ceph/ceph/pull/67167#issuecomment-3984274659

This reverts commit 884bbcfd38, reversing
changes made to 472e267f03.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
2026-03-02 08:52:43 -05:00
Tomer Haskalovitch
901ec98b41 mgr/nvmeof: intergrate module into build and debian pkg
Fixes: https://tracker.ceph.com/issues/74702

Signed-off-by: Tomer Haskalovitch <tomer.haska@ibm.com>
2026-02-26 09:32:47 +02:00
Nizamudeen A
1384ae37c7 mgr: isolated CherryPy to prevent global state sharing
as the modules are now being loaded onto the main interpreter (see
https://github.com/ceph/ceph/pull/66244), the
cherrypy is getting hit with an issue where its global state is being
affecting all the modules updating the cherrypy config simultaneously in
the same tree.

So i am adding a CherryPyMgr which manages all the independent servers
that will be created across all modules. This CherryPyMgr will create
its own server instances by utilizing cherrypy's WSGI Server and
eliminates the global state sharing. Each module or app can create their
own tree and start an adapter which will open an independent server for
that app.

- also added a method to update the config in place so CORS urls can be
  configured without restarting servers.

Fixes: https://tracker.ceph.com/issues/74643, https://tracker.ceph.com/issues/74543, https://tracker.ceph.com/issues/74980
Signed-off-by: Nizamudeen A <nia@redhat.com>
2026-02-26 08:40:39 +05:30
SrinivasaBharathKanta
40d8bc0560 Merge pull request #66352 from tchaikov/debian-invoke-rc.d
debian: remove invoke-rc.d calls from postrm scripts
2026-02-13 07:26:43 +05:30
Roland Sommer
57f54aeb77 debian: package mgr/smb in ceph-mgr-modules-core
The `BaseController` auto-imports the packaged `mgr/dashboard/controllers/smb.py`
file, which in turn wants to import `smb.enums` etc. which is part of the `smb`
package which is missing from `debian/ceph-mgr-modules-core.install`, thus
missing in the package. The missing module causes an exception
`ModuleNotFoundError: No module named 'smb'` on mgr instances when running a
ceph tentacle cluster installed from debian packages.

See: https://tracker.ceph.com/issues/74268
Signed-off-by: Roland Sommer <rol@ndsommer.de>
2026-01-30 08:54:49 +01:00
Kefu Chai
91de0e1933 cmake: migrate Python module installation from setup.py to pip
Replace 'setup.py install' with 'pip install --use-pep517' to fix
Cython compilation failures and eliminate deprecation warnings.

Problem Statement:
The build process for Cython modules involves preprocessing .pyx files
(e.g., generating rbd_processed.pyx from rbd.pyx) and then cythonizing
with specific compiler_directives. The previous approach using separate
'setup.py build' and 'setup.py install' commands caused this failure:

```
Error compiling Cython file:
------------------------------------------------------------
...
        """
        name = cstr(name, 'name')
        cdef:
            rados_ioctx_t _ioctx = convert_ioctx(ioctx)
            char *_name = name
            librbd_progress_fn_t _prog_cb = &no_op_progress_callback
                                            ^
------------------------------------------------------------

rbd_processed.pyx:781:44: Cannot assign type 'int (*)(uint64_t, uint64_t, void *) except? -1' to 'librbd_progress_fn_t'. Exception values are incompatible. Suggest adding 'noexcept' to type 'int (uint64_t, uint64_t, void *) except? -1'.
```

This occurs because:
1. 'setup.py build build_ext' successfully preprocesses and cythonizes
   with compiler_directives from setup.py's cythonize() call
2. 'setup.py install' internally triggers a rebuild that:
   - Regenerates the preprocessed .pyx files
   - Re-runs cythonize() through Cython.Distutils.build_ext
   - Does NOT apply the compiler_directives from setup.py
   - Fails on the regenerated files missing required directives

New Options Explained:

`--use-pep517`:
  Addresses deprecation warning:
  ```
    DEPRECATION: Building 'rados' using the legacy setup.py bdist_wheel
    mechanism, which will be removed in a future version. pip 25.3 will
    enforce this behaviour change.
  ```
  Uses the modern PEP 517 build backend which:
  - Performs a single build pass with all compiler_directives applied
  - Prevents the implicit rebuild that caused CompileError
  - Future-proofs against pip 25.3+ which will require this

`--no-build-isolation`:
  Ensures that environment variables set by CMake are respected:
  - CC, LDSHARED (compiler toolchain)
  - CPPFLAGS, LDFLAGS (compilation flags)
  - CYTHON_BUILD_DIR, CEPH_LIBDIR (build paths)

  Without this flag, pip would create an isolated build environment
  that ignores these critical build settings.

`--no-deps`:
  Prevents pip from attempting to install Python dependencies listed
  in setup.py's install_requires. All dependencies are managed by
  CMake and the distribution's package manager, not pip.

`--ignore-installed`:
  Addresses installation error when DESTDIR is set:
  ```
    ERROR: Could not install packages due to an OSError: [Errno 13]
    Permission denied: '/usr/lib/python3/dist-packages/rados-2.0.0.egg-info'

    OSError: [Errno 18] Invalid cross-device link:
    '/usr/lib/python3/dist-packages/rados-2.0.0.egg-info' -> '/tmp/pip-uninstall-...'
  ```
  This error occurs because pip detects an existing system installation
  and tries to uninstall it before installing to DESTDIR. With
  --ignore-installed, pip skips the uninstall step and directly installs
  to the DESTDIR staging directory, which is the correct behavior for
  packaging.

Removed Options:

`--install-layout=deb`:
  This Debian-specific patch to 'setup.py install' is no longer needed.
  Modern pip automatically detects the distribution and uses the correct
  layout (dist-packages on Debian, site-packages on RPM distros).

`--single-version-externally-managed`:
  This option was specific to 'setup.py install' to prevent egg
  installation. With pip, this is handled automatically.

`--record /dev/null`:
  No longer needed as pip manages installation records internally.

`egg_info --egg-base`:
  Not needed with pip as metadata is generated automatically during
  the build process.

Not added option:
`--root-user-action=ignore`: not added
  In this change, we installing a python module using pip with
  `fakeroot` before packaging it. But pip warned:
  ```
  Error: WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behavior with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
  ```
  But we use fakeroot on purpose, this option could have been added  to
  silence this warning. But it is not available in all supported pip
  versions. see
  2e1112a814

New environmental variable:
`DEB_PYTHON_INSTALL_LAYOUT=deb` is conditionally applied when packaging
for debian-derivative distributions. As pip does not support
`--install-layout` option. Since debian patches pip so it installs Python
modules into /usr/local/lib instead of /usr/lib where debian dh_install
helper looks for the content to be packaged, so we have to enforce the
debian layout using the environmental variable.

Working Directory Change:

Changed from `CMAKE_CURRENT_SOURCE_DIR` to `CMAKE_CURRENT_BINARY_DIR` to
keep pip's temporary files and logs in the build directory rather than
polluting the source tree.

Additional Dependencies:

Since the build process uses pip and creates a wheel distribution,
we need to add `pip` and `wheel` Python modules as build dependencies.

Python moduels packaging:

- with `--use-pep517`, pip creates .dist-info directoires as per PEP-517
instead of .egg-info, so we need to package the new metadata directory.

Future Improvements

We considered implementing a custom `build_templates` command or using
setuptools' `sub_commands` mechanism to avoid regenerating `*_processed.pyx`
files on every build (tracking dependencies via file modification times or
hash-based checks). However, to keep `setup.py` simple and maintainable,
we've deferred this optimization for future work. The current solution
using `pip install --use-pep517` ensures correct builds without additional
complexity.

This solution works correctly for both Debian and RPM packaging workflows,
both of which use DESTDIR-based staged installations.

Fixes: 719b749846
Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2026-01-29 08:45:50 +08:00
Kefu Chai
599922aa58 debian/control: add iproute2 to build dependencies
Test scripts like qa/tasks/cephfs/mount.py expect the ip command to be
available in the container environment. Without it, tests fail with:

```
  /bin/bash: line 1: ip: command not found

  File "/ceph/qa/tasks/cephfs/mount.py", line 96, in cleanup_stale_netnses_and_bridge
    p = remote.run(args=['ip', 'netns', 'list'],
  ...
  teuthology.exceptions.CommandFailedError: Command failed with status 127: 'ip netns list'
```

Add iproute2 to the debian package build dependencies when the
<pkg.ceph.check> build profile is enabled. This ensures the package is
available during container-based builds, since buildcontainer-setup.sh
→ script/run-make.sh → install-deps.sh → debian/control → generated
dependency package chain respects build profiles configured via
`FOR_MAKE_CHECK` and `WITH_CRIMSON` environment variables set in
Dockerfile.build.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-12-24 14:17:24 +08:00
Kefu Chai
3eac3d9f71 Merge pull request #66568 from Matan-B/wip-matanb-crimson-obselte
debian,ceph.spec: fix ceph-osd upgrade conflicts

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Kefu Chai <k.chai@proxmox.com>
2025-12-12 09:01:20 +08:00
Matan Breizman
9f1c8f9447 debian,ceph.spec: fix ceph-osd upgrade conflicts
With https://github.com/ceph/ceph/pull/65782 merged, upgrading ceph-osd
would need to replace the previous ceph-osd existing on the machine.
Otherwise, we won't be able to symlink the newly installed package:
```
2025-12-05T21:09:20.472 INFO:teuthology.orchestra.run.smithi077.stdout:
Installing       : ceph-osd-classic-2:20.3.0-4434.g8611241d.el9.x86_6
24/87
2025-12-05T21:09:20.478 INFO:teuthology.orchestra.run.smithi077.stdout:
Running scriptlet: ceph-osd-classic-2:20.3.0-4434.g8611241d.el9.x86_6
24/87
2025-12-05T21:09:20.479
INFO:teuthology.orchestra.run.smithi077.stdout:failed to link
/usr/bin/ceph-osd -> /etc/alternatives/ceph-osd: /usr/bin/ceph-osd
exists and it is not a symlink
```

Note: debian/control ceph-osd-classic already had Replace and Breaks:
      - Breaks is replaced with Conflicts to not allow coexistence.
      - Release version is bumped up to be relevant for latest main

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-12-11 11:56:46 +00:00
Elliot Courant
65e2a33ee7 deb/cephadm: Don't assume a home directory is configured
cephadm.postinst can fail if cephadm was originally installed using a
version that didn't configure a home directory for the user at all.
Newer versions do configure a home directory (as either `/home/cephadm`
or `/var/lib/cephadm`) so if that is configured then nothing needs to be
done. But if the user was created with no home directory then one needs
to be added for the configure step to succeed.

Fixes: https://tracker.ceph.com/issues/72083

commit 90bc036924 added home directories
for new cephadm users created, but didn't add home directories to
cephadm users that already existed.

Signed-off-by: Elliot Courant <me@elliotcourant.dev>
2025-12-10 14:35:29 -06:00
Thomas Lamprecht
a6ab6c6385 debian/control: record python3-packaging dependency for ceph-volume
Commit 0985e201 added `from packaging import version` to
ceph_volume/util/encryption.py. On Debian and its derivatives, the
packaging module is provided by the python3-packaging package.

Add python3-packaging to ceph-volume's runtime dependencies to ensure
this import is satisfied.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Max R. Carrara <m.carrara@proxmox.com>
2025-12-05 12:17:33 +08:00
Kefu Chai
43ba15293e Merge pull request #65739 from tchaikov/rgw-gap-list-manpage
debian: include rgw-gap-list manpage and rgw-policy-check in ceph-common

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
Reviewed-by: Matan Breizman <mbreizma@ibm.com>
2025-11-27 12:12:08 +08:00
Kefu Chai
4f48af0d01 debian: remove invoke-rc.d calls from postrm scripts
Previously, we called "invoke-rc.d ceph stop" in postrm scripts to
support sysvinit-based installations. However, this fails on systemd-
based systems, which are now the default on modern Debian distributions.

When invoke-rc.d detects systemd as the init system, it delegates to
systemctl, converting "invoke-rc.d ceph stop" to "systemctl stop
ceph.service". Since Ceph provides ceph.target and template units
(ceph-osd@.service, ceph-mon@.service, etc.) rather than a monolithic
ceph.service, this command always fails with exit code 5
(LSB EXIT_NOTINSTALLED).

This failure prevents the auto-generated cleanup sections added by
debhelper from executing properly, which can leave the system in an
inconsistent state during package removal.

Changes:

- Remove the invoke-rc.d call entirely. Systemd will handle service
  cleanup through its own mechanisms when the package is removed.
- Remove redundant "exit 0" statement (the script exits successfully
  by default, and "set -e" is no longer needed without commands that
  might fail).
- Remove vim modeline comment, as it's unnecessary for a 3-line script.
- Eventually remove this 3-line script stanza, as this is exactly what
  debhelper provides us.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-11-22 22:26:38 +08:00
Matan Breizman
b891223a0f debian,ceph.spec: add ceph-osd-crimson as dependency
a37b5b5bde added ceph-osd-crimson as dependency using OR requirement.
Once ceph-osd-classic dependency is satisfied, ceph-osd-crimson package must be added manually.
In order to not add crimson packages manually (See "Containerfile"
removed lines) - mark osd-crimson as dependency if with_crimson is
enabled for rpm and if pkg.ceph.crimson build profile is enabled for debian.

With this change, users won't be required to obtain ceph-osd-crimson
package manually when relevant. Similarly to ceph-osd-classic being
a dependency for ceph-osd.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-11-19 13:14:09 +00:00
Kefu Chai
2aa9727b63 Merge pull request #65936 from tchaikov/wip-build-cephadm-with-deb
cephadm, debian/rules: Use system packages for cephadm bundled dependencies

Reviewed-by: John Mulligan <jmulligan@redhat.com>
2025-11-14 21:17:55 +08:00
Kefu Chai
ceb3272fda debian/rules: enable WITH_CRIMSON when pkg.ceph.crimson profile is set
Since commit 9b1d524839 ("debian: mark "crimson" specific deps with
"pkg.ceph.crimson""), crimson-specific build dependencies have been
gated by the Build-Profiles: <pkg.ceph.crimson> tag. However,
debian/rules was never updated to pass -DWITH_CRIMSON=ON when this
build profile is active.

This causes builds with the crimson profile enabled to fail during
dh_install, as the crimson-osd binary is never built but the install
file tries to package it:

  Failed to copy 'usr/bin/crimson-osd': No such file or directory
  dh_install: error: debian/ceph-crimson-osd.install returned exit code 127

Fix this by checking for pkg.ceph.crimson in DEB_BUILD_PROFILES and
enabling the CMake option accordingly, following the same pattern used
for pkg.ceph.arrow.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-11-12 18:11:49 +00:00
Kefu Chai
a37b5b5bde debian,ceph.spec: split ceph-osd into shared base and implementation packages
Previously, ceph-osd packaging had two mutually exclusive flavors that
could only be built one at a time: one with classic OSD and another
with crimson OSD. Both provided /usr/bin/ceph-osd, making them
impossible to coexist and confusing from a user perspective.
This commit restructures the packaging to enable both implementations
to coexist on the same system:

- ceph-osd: Contains shared components (systemd units, sysctl configs,
  common executables like ceph-erasure-code-tool) and depends on exactly
  one OSD implementation
- ceph-osd-classic: Contains the classic OSD implementation binary and
  classic-specific tools
- ceph-osd-crimson: Contains the crimson OSD implementation binary and
  crimson-specific tools

The two implementation packages install different sets of file, so they
don't conflict with each other anymore, and both depend on ceph-osd for
shared resources.

Changes:

Debian packaging:

- Revert e5f00d2f
- Add ceph-osd-crimson package
- Add Recommends: ceph-osd-classic to prefer classic on upgrades
- Add Replaces/Breaks for smooth upgrades from old monolithic package
- Create separate .install files for crimson and classic osd packages
  Enforce exact version matching using ${binary:Version}

RPM packaging:

- Use rich dependencies for OR requirement (classic or crimson)
- Add Recommends: ceph-osd-classic for upgrade preference

Upgrade behavior:

Users upgrading from older versions will automatically get
ceph-osd-classic due to the Recommends directive, maintaining
backward compatibility. Users can explicitly choose crimson by
installing ceph-osd-crimson, which will coexist with classic.
Switching between implementations is supported via standard package
operations, with the alternatives system ensuring /usr/bin/ceph-osd
always points to the active implementation.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-11-12 18:07:29 +00:00
Kefu Chai
25680021ee debian: Use system packages for cephadm bundled dependencies
Configure the Debian build to use CEPHADM_BUNDLED_DEPENDENCIES=deb,
which instructs the cephadm build script to bundle dependencies from
system-installed Debian packages instead of downloading from PyPI.

This change addresses build failures in restricted network environments
where Debian build tools do not permit internet access. By leveraging
the Debian package support added in commit 9378a2988e1, the build now
uses python3-markupsafe, python3-jinja2, and python3-yaml packages
that are already installed as build dependencies.

This approach mirrors the existing RPM packaging workflow, ensuring
consistent behavior across different distribution package formats.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-11-12 11:59:14 +08:00
Kefu Chai
929b47f838 debian/control: Add libxsimd-dev build dependency for vendored Arrow
In commit e8460cbd, we introduced the "pkg.ceph.arrow" build profile to
support building with system Arrow packages. However, neither Debian nor
Ubuntu currently ships Arrow packages.

Since WITH_RADOSGW_SELECT_PARQUET is always enabled in debian/rules,
Arrow support is required for all builds. When the pkg.ceph.arrow profile
is not selected, the build uses vendored Arrow. With the recent change to
use AUTO mode for xsimd detection, Arrow will attempt to find system xsimd
>= 9.0.1. Adding libxsimd-dev as a build dependency ensures it's available
for Arrow to detect and use, reducing build time on supported distributions.

On distributions with insufficient xsimd versions (< 9.0.1), Arrow will
automatically fall back to its bundled version.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-10-15 15:49:09 +08:00
Kefu Chai
804274e5b9 debian: package rgw-policy-check in ceph-common
The rgw-policy-check tool was added to RPM packaging in commit 28864311
but was not included in Debian packaging, creating an inconsistency
between the two package formats.

Include rgw-policy-check in the ceph-common Debian package to match the
RPM packaging and ensure feature parity across distribution formats.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-10-02 22:40:44 +08:00
Kefu Chai
6c0992e1bd debian: include rgw-gap-list manpage in ceph-common
The rgw-gap-list manpage was added to RPM packaging in commit 8d0ec766
but was omitted from the Debian package. Add it to ceph-common to align
with the RPM packaging, where both the executable and manpage are
included together.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
2025-10-01 08:52:04 +08:00
Dan Mick
fa6c38c1d0 debian/control: install libnuma-dev unconditionally
The arm64-only module uadk needs numa.h to build; nothing else
ensures it's available.  Make it an unconditional ceph build
dependency on behalf of the arm64 build.

Fixes: https://tracker.ceph.com/issues/72594
Signed-off-by: Dan Mick <dan.mick@redhat.com>
2025-08-18 15:22:02 -05:00
Samuel Just
ab26edd603 debian/ceph-osd.install: add packaging for crimson-store-bench
Signed-off-by: Samuel Just <sjust@redhat.com>
2025-08-07 14:27:42 -07:00
Venky Shankar
bde5ae91ad Merge pull request #62948 from MaxKellermann/cephfs_includes
cephfs: include cleanup

Reviewed-by: Venky Shankar <vshankar@redhat.com>
2025-08-04 11:22:11 +05:30
Matan Breizman
c892f3b401 Merge pull request #63604 from guojidan/kv-tool
crimson: Add objectstore tool with partial functionality

Reviewed-by: Aishwarya Mathuria <amathuri@redhat.com>
2025-07-30 10:25:47 +03:00
Matan Breizman
47a15af8dd ceph.spec.in: install crimson-objectstore-tool
Include the tool when packaging for deb/rpm.

Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-07-23 13:18:29 +00:00
Venky Shankar
3679175b16 cephfs: add untracked files to ceph.spec.in and debian installs
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2025-07-22 10:41:00 +05:30
Casey Bodley
6fddc83e26 deb/cephadm: add explicit --home for cephadm user
cephadm.postinst fails on ubuntu 24.04, because the cephadm user it
creates ends up with a `/nonexistent` home directory:

> mkdir: cannot create directory '/nonexistent/.ssh': No such file or directory

on ubuntu 22.04, this user's home directory is `/home/cephadm`

the `adduser` man page for 24.04 includes this new text:
> If no home directory is specified, the default home directory for a new system user is /nonexistent. This directory should never exist on any Debian system, and adduser will never create it automatically.

commit 90bc036924 had previously added
`--home /home/cephadm`, but that was later removed by commit
c5a316cfd5 to support non-default home
directories. the latter commit's author recommends use of
`--home /var/lib/cephadm` instead

Fixes: https://tracker.ceph.com/issues/72083

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-07-16 11:19:18 -04:00
Casey Bodley
a52d6a9b9b Merge pull request #64386 from cbodley/wip-72020
deb/mgr: remove deprecated distutils from ceph-mgr.requires

Reviewed-by: John Mulligan <jmulligan@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
2025-07-11 09:37:41 -04:00
Casey Bodley
3fb3f892aa deb/mgr: remove deprecated distutils from ceph-mgr.requires
distutils was deprecated in python 3.10 and removed in 3.12 which we
need to support for ubuntu 24.04

Fixes: https://tracker.ceph.com/issues/72020

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2025-07-08 10:32:05 -04:00
Connor Fawcett
7d5f66e458 erasure-code: Add ceph_ec_consistency_checker into ceph_test_package
Signed-off-by: Connor Fawcett <connorfa@uk.ibm.com>
2025-07-08 14:21:08 +01:00
Nizamudeen A
8acf8f7e4f mgr/dashboard: disable saml2 tests when the dep is not there
Signed-off-by: Nizamudeen A <nia@redhat.com>
2025-07-01 13:29:43 +05:30
Kefu Chai
04324fa1ac deb: use variable expansion to support systemd unit dir changes
Ubuntu changed the systemd unit directory location between releases:
- Jammy (22.04): /lib/systemd/system
- Noble (24.04): /usr/lib/systemd/system

To maintain compatibility across both versions, update .install files
to use brace expansion pattern {usr/,}lib/systemd/system/<service>.

This pattern works because dh_install uses bsd_glob() with GLOB_CSH
flags, which expands braces and matches files in both locations
depending on where CMakeLists.txt actually installed them.

Fixes installation issues when building packages on Noble while
maintaining backward compatibility with Jammy builds.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2025-06-18 17:23:28 +08:00
Thomas Lamprecht
03a93dbb18 debian: radosgw: add media-types packages as alternative for mime-support
Back in 2020 the '/etc/mime.types' file was split out into it's own
leaner 'media-types' Debian package [0], the previous 'mime-support'
was kept as transitional package to handle upgrades, but it did its
job and isn't included in Debian Trixie repos anymore.

So accept both, the new 'media-types' package or the legacy
'mime-support' one as valid dependency for radosgw, this ensures one
can install radosgw on newer Debian based releases while keeping it
also working for older ones.

[0]: 4d6ff19de5

Fixes: https://tracker.ceph.com/issues/71545
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
2025-06-03 22:43:59 +02:00
Dan Mick
d9c429f2c8 Merge pull request #62507 from NVShawn/main
[Packaging]: Use system-defined location for home directories
2025-05-20 18:20:04 -07:00
Zack Cerza
4cfdbcfee0 debian/rules: Optionally enable sccache
Signed-off-by: Zack Cerza <zack@cerza.org>
2025-04-10 13:08:57 -06:00
Zack Cerza
2b4044e9e9 debian/rules: Disable dh_dwz if DWZ=false
Signed-off-by: Zack Cerza <zack@cerza.org>
2025-04-10 13:08:57 -06:00
Radoslaw Zarzynski
8256578110 tools: drop ceph-osdomap-tool
Please don't confuse with osdmaptool.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2025-04-04 18:21:54 +00:00
Matan Breizman
23c33f69ff src: sed -i 's/WITH_SEASTAR/WITH_CRIMSON/'
Signed-off-by: Matan Breizman <mbreizma@redhat.com>
2025-04-03 07:53:15 +00:00
Shawn Edwards
c5a316cfd5 Use system-defined location for home directories
This patch removes the assumption that user home directories always live under /home. If the user has set home directories to live under a different directory by changing /etc/adduser.conf, this will honor that setting.

Signed-off-by: Shawn Edwards <shedwards@nvidia.com>
2025-03-25 19:44:40 +00:00
Pedro Gonzalez Gomez
567c9e7667 mgr/dashboard: add xlmtodict import and fix lifecycle get request
Fixes: https://tracker.ceph.com/issues/70128
Signed-off-by: Pedro Gonzalez Gomez <pegonzal@redhat.com>
2025-03-13 21:50:18 +01:00
Afreen Misbah
f65b00ea8a mgr/dashboard: Improve sso role mapping
Fixes https://tracker.ceph.com/issues/70366

- adds support for ISV
- using jmespath expression for fetching roles from payload
- added roles_path parameter in sso enable command as optional argument
- modified roles mapper for sso login

Signed-off-by: Afreen Misbah <afreen@ibm.com>
2025-03-10 16:42:03 +05:30
Yuval Lifshitz
e443d75b4f test/rgw/lua: install luarocks
since it is only a suggestion for debian.
this is a regression from: https://github.com/ceph/ceph/pull/60666

Fixes: https://tracker.ceph.com/issues/69473

Signed-off-by: Yuval Lifshitz <ylifshit@ibm.com>
2025-01-16 14:57:09 +00:00
Kefu Chai
29f31e67c6 Merge pull request #60666 from ThomasLamprecht/debian-fix-librgw2-lua-dependencies
debian/control: fix overly broad lua dependency declaration for librgw2 package

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2025-01-07 22:19:43 +08:00
Anoop C S
3069d94663 deb: Add cephfs.pc to libcephfs-dev
Signed-off-by: Anoop C S <anoopcs@cryptolab.net>
2024-12-16 12:58:50 +05:30
Venky Shankar
955bf28fe4 Merge PR #58376 into main
* refs/pull/58376/head:
	Temporarily change the libcephfs dependencies
	proxy: Add the design document
	proxy: Add the proxy to the deb builds
	proxy: Add the proxy to the rpm builds
	Initial version of the libcephfs proxy

Reviewed-by: Sachin Prabhu <sp@spui.uk>
Reviewed-by: Venky Shankar <vshankar@redhat.com>
2024-12-13 13:24:05 +05:30