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 conflict with each other but both
depend on ceph-osd for shared resources.
Changes:
Debian packaging:
- Revert e5f00d2f
- Add ceph-crimson-osd package
- Add Recommends: ceph-classic-osd 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-classic-osd for upgrade preference
Upgrade behavior:
Users upgrading from older versions will automatically get
ceph-classic-osd due to the Recommends directive, maintaining
backward compatibility. Users can explicitly choose crimson by
installing ceph-osd-crimson, which will conflict out 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.
John Mulligan [Thu, 2 Oct 2025 17:56:28 +0000 (13:56 -0400)]
Dockerfile.build: improve docker compatibility
Try to fix:
```
Step 6/18 : COPY ceph.spec.in do_cmake.sh install-deps.sh run-make-check.sh src/script/buildcontainer-setup.sh ${CEPH_CTR_SRC}
When using COPY with more than one source file, the destination must be a directory and end with a /
```
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Theoretically, the "existed" bools in the test could have had junk in
them. Since the driver only writes to them when writing "true", this
could have had a false positive return. Initialize them all.
Fixes: https://tracker.ceph.com/issues/73327 Signed-off-by: Daniel Gryniewicz <dang@fprintf.net>
John Mulligan [Wed, 6 Mar 2024 17:13:21 +0000 (12:13 -0500)]
qa/tasks: update python.py to use template module
The file python.py was making use of subst_vip from vip.py. The more
generic template.py provides the same functionality as subst_vip plus a
better more general templating system. Replace subst_vip in this file
so that we can remove subst_vip in the future.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 6 Mar 2024 17:00:31 +0000 (12:00 -0500)]
qa/tasks: remove generic template stuff from cephadm.py
Remove the generic template stuff from cephadm.py now that the
template.py file is usable and various yamls have been updated to
use the new module now.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 6 Mar 2024 16:56:13 +0000 (11:56 -0500)]
qa/tasks: add template.py for generic templating needs
This change extracts a bunch of functionality that we added to
cephadm.py and has been "incubating" there for too long as it's not
particularly specific to cephadm.
Take the code from cephadm.py and fully generalize it and make it a
fairly simple module that can be reused elsewhere as needed.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Mon, 29 Sep 2025 18:55:26 +0000 (14:55 -0400)]
qa/suites: do not use cephadm.exec when it is not needed
Convert a uses of `cephadm.exec` to basic `exec`. When templates (with
the jinja2-style replacement pattern `{{}}`) are not present the
cephadm.exec and exec are essentially the same.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
John Mulligan [Wed, 6 Mar 2024 16:11:51 +0000 (11:11 -0500)]
qa/suites: do not use vip.exec when it is not needed
Convert a number of uses of `vip.exec` to basic `exec`. When the
replacement pattern `{{VIP<x>}}` is not present vip.exec and exec
are essentially the same. This means that the remaining uses of
`vip.exec` actually need vip variable substitution.
Signed-off-by: John Mulligan <jmulligan@redhat.com>
Adam C. Emerson [Mon, 29 Sep 2025 19:33:23 +0000 (15:33 -0400)]
rgw/datalog: Remove use of 'detached' in `rgw_log_backing` watch
Replace `asio::detached` with `async::use_blocked` in the notify
handler. This shouldn't be too much of a problem given that our notify
handlers elsewhere use blocking `notify_ack`.
At a later time I plan to do a larger refactor, but this should be a
backportable fix for the memory error.
https://tracker.ceph.com/issues/73313 Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
Xuehan Xu [Wed, 13 Aug 2025 03:49:23 +0000 (11:49 +0800)]
crimson/os/seastore: do "copy_on_write" if the to-be-modified object
needs it
At present, only clone objects may need COW, as HEAD objects won't be
sharing any direct lba mapping with other objects in non-recovery
scenarios.
Although the HEAD object may share its direct mappings with the temp
object that's going to be recovered and replace it, it won't be
accepting any modifications at that time.
Xuehan Xu [Tue, 12 Aug 2025 08:24:08 +0000 (16:24 +0800)]
crimson/os/seastore/object_data_handler: we don't have to maintain the
symmetric indirect lba relationship at the time of clone
OP_CLONE is done in the following way:
1. First, swap the layout of the head onode and the clone onode, so that
clone onode's object_data, omap_root, xattr_root and log_root all
point to the head onode's corresponding fields;
2. Do SeaStore::_clone() from the clone onode to the head onode, which
is exactly what rollback is done.
This makes the code of ObjectDataHandler::clone() and
ObjectDataHandler::copy_on_write() even simpler, and can facilitate the
clone/rollback scenarios when the "128-bit" lba key layout is involved.
Xuehan Xu [Tue, 12 Aug 2025 06:51:15 +0000 (14:51 +0800)]
crimson/os/seastore/onode: add the "need_cow" field to indicate whether
the onode's object data space needs to do clone before modification
At present, it's only when the onode's object data space is sharing its
own direct lba mappings with other onodes that the "need_cow" field
would be true.
For a remote link, try to open the dentry (this part of code
is copied from the mds path_traversal) which internally pushes
the dir_frag in the damage list if applicable.
Remove the code used to migrate Grafana self-signed certificates, as
it is no longer needed. The certmgr logic now handles generating new
certificates during the upgrade, eliminating the need for any migration
code or logic.
Remove the special-case code used for RGW service migration, as it is no
longer needed. The certmgr logic now handles populating the certstore
with the corresponding certificate and key entries by reading their values
directly from the spec. During RGW service redeployment as part of the
upgrade, certmgr will ensure the certstore is updated accordingly.
mgr/cephadm: Fix RGW spec validation for deprecated rgw cert field
Starting from Tentacle, the rgw_frontend_ssl_certificate field has been
deprecated in favor of the new ssl_cert and ssl_key fields. Update the
validation logic to run after this field is automatically transformed into
the new fields, ensuring proper validation of RGW specs.
mgr/cephadm: Include mgmt-gateway/oauth2-proxy in upgrade process
Add the new mgmt-gateway and oauth2-proxy services to the list of
services upgraded by cephadm, ensuring they are updated alongside the
rest of the cephadm-managed services.
John Mulligan [Mon, 22 Sep 2025 17:38:24 +0000 (13:38 -0400)]
mgr/smb: fix error handling for fundamental resource parsing
When an smb resource is input to the smb mgr module in YAML or JSON the
fundamental parsing/deserialization is handled by resourcelib. This
module tries to be largely independent of smb mgr module and defines a
few basic exception types. When these exception types were raised the
`ceph` command line would print out a long traceback. Avoid printing
a traceback by catching these errors with a new contextmanager
(decorator) that is automatically called when using the smb ceph
mgr command api.
Fixes: https://tracker.ceph.com/issues/71992 Signed-off-by: John Mulligan <jmulligan@redhat.com>