mirror of
https://github.com/ceph/ceph
synced 2026-08-01 22:45:39 +00:00
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>
This commit is contained in:
parent
53960968e7
commit
a37b5b5bde
60
ceph.spec.in
60
ceph.spec.in
@ -912,28 +912,39 @@ Summary: Ceph Object Storage Daemon
|
||||
Group: System/Filesystems
|
||||
%endif
|
||||
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
|
||||
Requires: (ceph-osd-classic = %{_epoch_prefix}%{version}-%{release} or ceph-osd-crimson = %{_epoch_prefix}%{version}-%{release})
|
||||
Requires: sudo
|
||||
Requires: libstoragemgmt
|
||||
%if 0%{with crimson}
|
||||
Requires: protobuf
|
||||
%endif
|
||||
%if 0%{?weak_deps}
|
||||
Recommends: ceph-volume = %{_epoch_prefix}%{version}-%{release}
|
||||
%endif
|
||||
%description osd
|
||||
ceph-osd is the object storage daemon for the Ceph distributed file
|
||||
system. It provides components shared between classic and crimson OSD
|
||||
implementations. It requires either the classic or crimson OSD
|
||||
to provide the core OSD daemon.
|
||||
|
||||
%package osd-classic
|
||||
Summary: Ceph Object Storage Daemon (classic)
|
||||
%if 0%{?suse_version}
|
||||
Group: System/Filesystems
|
||||
%endif
|
||||
Requires: 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
|
||||
and providing access to them over the network.
|
||||
|
||||
%if 0%{with crimson}
|
||||
%package crimson-osd
|
||||
%package osd-crimson
|
||||
Summary: Ceph Object Storage Daemon (crimson)
|
||||
%if 0%{?suse_version}
|
||||
Group: System/Filesystems
|
||||
%endif
|
||||
Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
|
||||
Requires: binutils
|
||||
%description crimson-osd
|
||||
Requires: protobuf
|
||||
%description osd-crimson
|
||||
crimson-osd is the object storage daemon for the Ceph distributed file
|
||||
system. It is responsible for storing objects on a local file system
|
||||
and providing access to them over the network.
|
||||
@ -1563,10 +1574,9 @@ rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
|
||||
popd
|
||||
|
||||
%if 0%{with crimson}
|
||||
# package crimson-osd with the name of ceph-osd
|
||||
install -m 0755 %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd
|
||||
install -m 0755 %{buildroot}%{_bindir}/crimson-objectstore-tool %{buildroot}%{_bindir}/ceph-objectstore-tool
|
||||
mv %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd-crimson
|
||||
%endif
|
||||
mv %{buildroot}%{_bindir}/ceph-osd %{buildroot}%{_bindir}/ceph-osd-classic
|
||||
|
||||
install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
|
||||
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
|
||||
@ -2279,17 +2289,12 @@ fi
|
||||
|
||||
%files osd
|
||||
%{_bindir}/ceph-clsinfo
|
||||
%{_bindir}/ceph-bluestore-tool
|
||||
%{_bindir}/ceph-erasure-code-tool
|
||||
%{_bindir}/ceph-objectstore-tool
|
||||
%{_bindir}/ceph-osd
|
||||
%{_libexecdir}/ceph/ceph-osd-prestart.sh
|
||||
%{_mandir}/man8/ceph-clsinfo.8*
|
||||
%{_mandir}/man8/ceph-osd.8*
|
||||
%{_mandir}/man8/ceph-bluestore-tool.8*
|
||||
%{_unitdir}/ceph-osd@.service
|
||||
%{_unitdir}/ceph-osd.target
|
||||
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
|
||||
%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
|
||||
|
||||
%post osd
|
||||
@ -2328,12 +2333,37 @@ if [ $1 -ge 1 ] ; then
|
||||
fi
|
||||
fi
|
||||
|
||||
%files osd-classic
|
||||
%{_bindir}/ceph-bluestore-tool
|
||||
%{_bindir}/ceph-objectstore-tool
|
||||
%{_bindir}/ceph-osd-classic
|
||||
%{_mandir}/man8/ceph-bluestore-tool.8*
|
||||
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
|
||||
|
||||
%if 0%{with crimson}
|
||||
%files crimson-osd
|
||||
%{_bindir}/crimson-osd
|
||||
%files osd-crimson
|
||||
%{_bindir}/ceph-osd-crimson
|
||||
%{_bindir}/crimson-objectstore-tool
|
||||
|
||||
%post osd-crimson
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
|
||||
%{_bindir}/ceph-osd-crimson 50
|
||||
|
||||
%preun osd-crimson
|
||||
if [ $1 -eq 0 ]; then
|
||||
${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-crimson
|
||||
fi
|
||||
%endif
|
||||
|
||||
%post osd-classic
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
|
||||
%{_bindir}/ceph-osd-classic 100
|
||||
|
||||
%preun osd-classic
|
||||
if [ $1 -eq 0 ]; then
|
||||
${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-classic
|
||||
fi
|
||||
|
||||
%files volume
|
||||
%{_sbindir}/ceph-volume
|
||||
%{_sbindir}/ceph-volume-systemd
|
||||
|
||||
9
debian/ceph-osd-classic.install
vendored
Executable file
9
debian/ceph-osd-classic.install
vendored
Executable file
@ -0,0 +1,9 @@
|
||||
#! /usr/bin/dh-exec
|
||||
|
||||
usr/bin/ceph-bluestore-tool
|
||||
usr/bin/ceph-objectstore-tool
|
||||
usr/bin/ceph-osd => /usr/bin/ceph-osd-classic
|
||||
usr/bin/ceph_objectstore_bench
|
||||
usr/lib/libos_tp.so*
|
||||
usr/lib/libosd_tp.so*
|
||||
usr/share/man/man8/ceph-bluestore-tool.8
|
||||
13
debian/ceph-osd-classic.postinst
vendored
Normal file
13
debian/ceph-osd-classic.postinst
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
update-alternatives --install /usr/bin/ceph-osd ceph-osd \
|
||||
/usr/bin/ceph-osd-classic 100
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
12
debian/ceph-osd-classic.prerm
vendored
Normal file
12
debian/ceph-osd-classic.prerm
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
update-alternatives --remove ceph-osd /usr/bin/ceph-osd-classic
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
6
debian/ceph-osd-crimson.install
vendored
Executable file
6
debian/ceph-osd-crimson.install
vendored
Executable file
@ -0,0 +1,6 @@
|
||||
#! /usr/bin/dh-exec
|
||||
|
||||
usr/bin/crimson-objectstore-tool
|
||||
usr/bin/crimson-osd => /usr/bin/ceph-osd-crimson
|
||||
usr/bin/crimson-store-bench
|
||||
usr/bin/crimson-store-nbd
|
||||
13
debian/ceph-osd-crimson.postinst
vendored
Normal file
13
debian/ceph-osd-crimson.postinst
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
configure)
|
||||
update-alternatives --install /usr/bin/ceph-osd ceph-osd \
|
||||
/usr/bin/ceph-osd-crimson 50
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
12
debian/ceph-osd-crimson.prerm
vendored
Normal file
12
debian/ceph-osd-crimson.prerm
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
case "$1" in
|
||||
remove)
|
||||
update-alternatives --remove ceph-osd /usr/bin/ceph-osd-crimson
|
||||
;;
|
||||
esac
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
exit 0
|
||||
12
debian/ceph-osd.install
vendored
Executable file → Normal file
12
debian/ceph-osd.install
vendored
Executable file → Normal file
@ -1,19 +1,7 @@
|
||||
#! /usr/bin/dh-exec
|
||||
|
||||
{usr/,}lib/systemd/system/ceph-osd*
|
||||
usr/bin/ceph-bluestore-tool
|
||||
usr/bin/ceph-clsinfo
|
||||
usr/bin/ceph-erasure-code-tool
|
||||
usr/bin/ceph-objectstore-tool
|
||||
<pkg.ceph.crimson> usr/bin/crimson-store-nbd
|
||||
<pkg.ceph.crimson> usr/bin/crimson-objectstore-tool
|
||||
<pkg.ceph.crimson> usr/bin/crimson-store-bench
|
||||
usr/bin/${CEPH_OSD_BASENAME} => /usr/bin/ceph-osd
|
||||
usr/bin/ceph_objectstore_bench
|
||||
usr/libexec/ceph/ceph-osd-prestart.sh
|
||||
usr/lib/libos_tp.so*
|
||||
usr/lib/libosd_tp.so*
|
||||
usr/share/man/man8/ceph-clsinfo.8
|
||||
usr/share/man/man8/ceph-osd.8
|
||||
usr/share/man/man8/ceph-bluestore-tool.8
|
||||
etc/sysctl.d/30-ceph-osd.conf
|
||||
|
||||
99
debian/control
vendored
99
debian/control
vendored
@ -414,29 +414,22 @@ Description: debugging symbols for ceph-mon
|
||||
|
||||
Package: ceph-osd
|
||||
Architecture: linux-any
|
||||
Depends: ceph-base (= ${binary:Version}),
|
||||
Depends: ceph-osd-classic (= ${binary:Version}) | ceph-osd-crimson (= ${binary:Version}),
|
||||
sudo,
|
||||
${misc:Depends},
|
||||
${python3:Depends},
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
libprotobuf23 <pkg.ceph.crimson>,
|
||||
Replaces: ceph (<< 10),
|
||||
ceph-test (<< 12.2.2-14),
|
||||
ceph-osd (<< 17.0.0)
|
||||
Breaks: ceph (<< 10),
|
||||
ceph-test (<< 12.2.2-14),
|
||||
ceph-osd (<< 17.0.0)
|
||||
Recommends: ceph-volume (= ${binary:Version}),
|
||||
nvme-cli,
|
||||
smartmontools,
|
||||
Description: OSD server for the ceph storage system
|
||||
Recommends: ceph-osd-classic (= ${binary:Version})
|
||||
Description: OSD server for the ceph storage system - shared components
|
||||
Ceph is a massively scalable, open-source, distributed
|
||||
storage system that runs on commodity hardware and delivers object,
|
||||
block and file system storage.
|
||||
.
|
||||
This package contains the Object Storage Daemon for the Ceph storage system.
|
||||
It is responsible for storing objects on a local file system
|
||||
and providing access to them over the network.
|
||||
This package contains components shared between classic and crimson OSD implementations.
|
||||
It ensures a Ceph OSD implementation is installed. By default,
|
||||
it installs the classic OSD implementation (ceph-osd-classic). Users can
|
||||
substitute with the experimental Crimson implementation (ceph-osd-crimson)
|
||||
for improved performance and scalability.
|
||||
|
||||
Package: ceph-osd-dbg
|
||||
Architecture: linux-any
|
||||
@ -451,6 +444,80 @@ Description: debugging symbols for ceph-osd
|
||||
.
|
||||
This package contains the debugging symbols for ceph-osd.
|
||||
|
||||
Package: ceph-osd-classic
|
||||
Architecture: linux-any
|
||||
Depends: ceph-base (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
Replaces: ceph (<< 10),
|
||||
ceph-test (<< 12.2.2-14),
|
||||
ceph-osd (<< 20.1.1)
|
||||
Breaks: ceph (<< 10),
|
||||
ceph-test (<< 12.2.2-14),
|
||||
ceph-osd (<< 20.1.1)
|
||||
Recommends: ceph-volume (= ${binary:Version}),
|
||||
nvme-cli,
|
||||
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,
|
||||
block and file system storage.
|
||||
.
|
||||
This package contains the classic Object Storage Daemon and
|
||||
classic-specific components for the Ceph storage system. It is
|
||||
responsible for storing objects on a local file system and providing
|
||||
access to them over the network.
|
||||
|
||||
Package: ceph-osd-classic-dbg
|
||||
Architecture: linux-any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: ceph-osd-classic (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
Description: debugging symbols for ceph-osd-classic
|
||||
Ceph is a massively scalable, open-source, distributed
|
||||
storage system that runs on commodity hardware and delivers object,
|
||||
block and file system storage.
|
||||
.
|
||||
This package contains the debugging symbols for ceph-osd-classic.
|
||||
|
||||
Package: ceph-osd-crimson
|
||||
Build-Profiles: <pkg.ceph.crimson>
|
||||
Architecture: any
|
||||
Depends: ceph-base (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
${shlibs:Depends},
|
||||
libprotobuf23,
|
||||
Recommends: ceph-volume (= ${binary:Version}),
|
||||
nvme-cli,
|
||||
smartmontools,
|
||||
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,
|
||||
block and file system storage.
|
||||
.
|
||||
Crimson is the next generation of ceph-osd daemon featuring enhanced
|
||||
performance on fast network and storage devices.
|
||||
.
|
||||
This package contains the Crimson Object Storage Daemon and
|
||||
crimson-specific components for the Ceph storage system. It is
|
||||
responsible for storing objects on a local file system and providing
|
||||
access to them over the network.
|
||||
|
||||
Package: ceph-osd-crimson-dbg
|
||||
Build-Profiles: <pkg.ceph.crimson>
|
||||
Architecture: linux-any
|
||||
Section: debug
|
||||
Priority: extra
|
||||
Depends: ceph-osd-crimson (= ${binary:Version}),
|
||||
${misc:Depends},
|
||||
Description: debugging symbols for ceph-osd-crimson
|
||||
Ceph is a massively scalable, open-source, distributed
|
||||
storage system that runs on commodity hardware and delivers object,
|
||||
block and file system storage.
|
||||
.
|
||||
This package contains the debugging symbols for ceph-osd-crimson.
|
||||
|
||||
Package: ceph-volume
|
||||
Architecture: all
|
||||
Section: python
|
||||
|
||||
5
debian/rules
vendored
5
debian/rules
vendored
@ -12,11 +12,6 @@ ifneq (,$(findstring WITH_STATIC_LIBSTDCXX,$(CEPH_EXTRA_CMAKE_ARGS)))
|
||||
# see http://tracker.ceph.com/issues/25209
|
||||
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
|
||||
endif
|
||||
ifeq (,$(findstring WITH_CRIMSON,$(CEPH_EXTRA_CMAKE_ARGS)))
|
||||
export CEPH_OSD_BASENAME = ceph-osd
|
||||
else
|
||||
export CEPH_OSD_BASENAME = crimson-osd
|
||||
endif
|
||||
ifneq ($(filter pkg.ceph.arrow,$(DEB_BUILD_PROFILES)),)
|
||||
extraopts += -DWITH_SYSTEM_ARROW=ON
|
||||
endif
|
||||
|
||||
Loading…
Reference in New Issue
Block a user