From: Matan Breizman Date: Tue, 9 Dec 2025 09:52:08 +0000 (+0000) Subject: debian,ceph.spec: fix ceph-osd upgrade conflicts X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9f1c8f9447026f5ef4965a96d1aaaae7ee59dad4;p=ceph-ci.git 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 --- diff --git a/ceph.spec.in b/ceph.spec.in index 66f2973b584..45435898907 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -933,6 +933,7 @@ Summary: Ceph Object Storage Daemon (classic) Group: System/Filesystems %endif Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} +Obsoletes: ceph-osd < %{_epoch_prefix}%{version}-%{release} %description osd-classic classic-osd is the object storage daemon for the Ceph distributed file system. It is responsible for storing objects on a local file system @@ -945,6 +946,7 @@ Summary: Ceph Object Storage Daemon (crimson) Group: System/Filesystems %endif Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release} +Obsoletes: ceph-osd < %{_epoch_prefix}%{version}-%{release} Requires: binutils Requires: protobuf %description osd-crimson @@ -2348,7 +2350,7 @@ fi %{_bindir}/ceph-osd-crimson %{_bindir}/crimson-objectstore-tool -%post osd-crimson +%posttrans osd-crimson %{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \ %{_bindir}/ceph-osd-crimson 50 @@ -2358,7 +2360,7 @@ if [ $1 -eq 0 ]; then fi %endif -%post osd-classic +%posttrans osd-classic %{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \ %{_bindir}/ceph-osd-classic 100 diff --git a/debian/control b/debian/control index 692e5eaa8b9..dc518bac36e 100644 --- a/debian/control +++ b/debian/control @@ -451,16 +451,16 @@ Package: ceph-osd-classic Architecture: linux-any Depends: ceph-base (= ${binary:Version}), ${misc:Depends}, - ${shlibs:Depends}, + ${shlibs:Depends} +Conflicts: ceph-osd (<< 20.3) Replaces: ceph (<< 10), ceph-test (<< 12.2.2-14), - ceph-osd (<< 20.1.1) + ceph-osd (<< 20.3) Breaks: ceph (<< 10), - ceph-test (<< 12.2.2-14), - ceph-osd (<< 20.1.1) + ceph-test (<< 12.2.2-14) Recommends: ceph-volume (= ${binary:Version}), nvme-cli, - smartmontools, + smartmontools Description: Classic OSD server for the ceph storage system Ceph is a massively scalable, open-source, distributed storage system that runs on commodity hardware and delivers object, @@ -494,6 +494,8 @@ Depends: ceph-base (= ${binary:Version}), Recommends: ceph-volume (= ${binary:Version}), nvme-cli, smartmontools, +Conflicts: ceph-osd (<< 20.3) +Replaces: ceph-osd (<< 20.3) Description: Crimson OSD server for the ceph storage system Ceph is a massively scalable, open-source, distributed storage system that runs on commodity hardware and delivers object,