Skip to content

Commit f536da7

Browse files
authored
Merge pull request ceph#65782 from tchaikov/wip-build-crimson-osd-kefu
debian,ceph.spec: split ceph-osd into shared base and implementation packages Reviewed-by: Matan Breizman <[email protected]> Reviewed-by: John Mulligan <[email protected]> Reviewed-by: Thomas Lamprecht <[email protected]>
2 parents 0fb9ade + 4e0abfb commit f536da7

22 files changed

+221
-46
lines changed

ceph.spec.in

Lines changed: 45 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -912,28 +912,39 @@ Summary: Ceph Object Storage Daemon
912912
Group: System/Filesystems
913913
%endif
914914
Requires: ceph-base = %{_epoch_prefix}%{version}-%{release}
915+
Requires: (ceph-osd-classic = %{_epoch_prefix}%{version}-%{release} or ceph-osd-crimson = %{_epoch_prefix}%{version}-%{release})
915916
Requires: sudo
916917
Requires: libstoragemgmt
917-
%if 0%{with crimson}
918-
Requires: protobuf
919-
%endif
920918
%if 0%{?weak_deps}
921919
Recommends: ceph-volume = %{_epoch_prefix}%{version}-%{release}
922920
%endif
923921
%description osd
924922
ceph-osd is the object storage daemon for the Ceph distributed file
923+
system. It provides components shared between classic and crimson OSD
924+
implementations. It requires either the classic or crimson OSD
925+
to provide the core OSD daemon.
926+
927+
%package osd-classic
928+
Summary: Ceph Object Storage Daemon (classic)
929+
%if 0%{?suse_version}
930+
Group: System/Filesystems
931+
%endif
932+
Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
933+
%description osd-classic
934+
classic-osd is the object storage daemon for the Ceph distributed file
925935
system. It is responsible for storing objects on a local file system
926936
and providing access to them over the network.
927937

928938
%if 0%{with crimson}
929-
%package crimson-osd
939+
%package osd-crimson
930940
Summary: Ceph Object Storage Daemon (crimson)
931941
%if 0%{?suse_version}
932942
Group: System/Filesystems
933943
%endif
934944
Requires: ceph-osd = %{_epoch_prefix}%{version}-%{release}
935945
Requires: binutils
936-
%description crimson-osd
946+
Requires: protobuf
947+
%description osd-crimson
937948
crimson-osd is the object storage daemon for the Ceph distributed file
938949
system. It is responsible for storing objects on a local file system
939950
and providing access to them over the network.
@@ -1563,10 +1574,9 @@ rm -f %{buildroot}/%{_sysconfdir}/init.d/ceph
15631574
popd
15641575

15651576
%if 0%{with crimson}
1566-
# package crimson-osd with the name of ceph-osd
1567-
install -m 0755 %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd
1568-
install -m 0755 %{buildroot}%{_bindir}/crimson-objectstore-tool %{buildroot}%{_bindir}/ceph-objectstore-tool
1577+
mv %{buildroot}%{_bindir}/crimson-osd %{buildroot}%{_bindir}/ceph-osd-crimson
15691578
%endif
1579+
mv %{buildroot}%{_bindir}/ceph-osd %{buildroot}%{_bindir}/ceph-osd-classic
15701580

15711581
install -m 0644 -D src/etc-rbdmap %{buildroot}%{_sysconfdir}/ceph/rbdmap
15721582
%if 0%{?fedora} || 0%{?rhel} || 0%{?openEuler}
@@ -2279,17 +2289,12 @@ fi
22792289

22802290
%files osd
22812291
%{_bindir}/ceph-clsinfo
2282-
%{_bindir}/ceph-bluestore-tool
22832292
%{_bindir}/ceph-erasure-code-tool
2284-
%{_bindir}/ceph-objectstore-tool
2285-
%{_bindir}/ceph-osd
22862293
%{_libexecdir}/ceph/ceph-osd-prestart.sh
22872294
%{_mandir}/man8/ceph-clsinfo.8*
22882295
%{_mandir}/man8/ceph-osd.8*
2289-
%{_mandir}/man8/ceph-bluestore-tool.8*
22902296
%{_unitdir}/[email protected]
22912297
%{_unitdir}/ceph-osd.target
2292-
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
22932298
%config(noreplace) %{_sysctldir}/90-ceph-osd.conf
22942299

22952300
%post osd
@@ -2328,12 +2333,37 @@ if [ $1 -ge 1 ] ; then
23282333
fi
23292334
fi
23302335

2336+
%files osd-classic
2337+
%{_bindir}/ceph-bluestore-tool
2338+
%{_bindir}/ceph-objectstore-tool
2339+
%{_bindir}/ceph-osd-classic
2340+
%{_mandir}/man8/ceph-bluestore-tool.8*
2341+
%attr(750,ceph,ceph) %dir %{_localstatedir}/lib/ceph/osd
2342+
23312343
%if 0%{with crimson}
2332-
%files crimson-osd
2333-
%{_bindir}/crimson-osd
2344+
%files osd-crimson
2345+
%{_bindir}/ceph-osd-crimson
23342346
%{_bindir}/crimson-objectstore-tool
2347+
2348+
%post osd-crimson
2349+
%{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
2350+
%{_bindir}/ceph-osd-crimson 50
2351+
2352+
%preun osd-crimson
2353+
if [ $1 -eq 0 ]; then
2354+
${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-crimson
2355+
fi
23352356
%endif
23362357

2358+
%post osd-classic
2359+
%{_sbindir}/update-alternatives --install %{_bindir}/ceph-osd ceph-osd \
2360+
%{_bindir}/ceph-osd-classic 100
2361+
2362+
%preun osd-classic
2363+
if [ $1 -eq 0 ]; then
2364+
${_sbindir}/update-alternatives --remove ceph-osd %{_bindir}/ceph-osd-classic
2365+
fi
2366+
23372367
%files volume
23382368
%{_sbindir}/ceph-volume
23392369
%{_sbindir}/ceph-volume-systemd

debian/ceph-osd-classic.install

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#! /usr/bin/dh-exec
2+
3+
usr/bin/ceph-bluestore-tool
4+
usr/bin/ceph-objectstore-tool
5+
usr/bin/ceph-osd => /usr/bin/ceph-osd-classic
6+
usr/bin/ceph_objectstore_bench
7+
usr/lib/libos_tp.so*
8+
usr/lib/libosd_tp.so*
9+
usr/share/man/man8/ceph-bluestore-tool.8

debian/ceph-osd-classic.postinst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
set -e
3+
4+
case "$1" in
5+
configure)
6+
update-alternatives --install /usr/bin/ceph-osd ceph-osd \
7+
/usr/bin/ceph-osd-classic 100
8+
;;
9+
esac
10+
11+
#DEBHELPER#
12+
13+
exit 0

debian/ceph-osd-classic.prerm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
set -e
3+
4+
case "$1" in
5+
remove)
6+
update-alternatives --remove ceph-osd /usr/bin/ceph-osd-classic
7+
;;
8+
esac
9+
10+
#DEBHELPER#
11+
12+
exit 0

debian/ceph-osd-crimson.install

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#! /usr/bin/dh-exec
2+
3+
usr/bin/crimson-objectstore-tool
4+
usr/bin/crimson-osd => /usr/bin/ceph-osd-crimson
5+
usr/bin/crimson-store-bench
6+
usr/bin/crimson-store-nbd

debian/ceph-osd-crimson.postinst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/sh
2+
set -e
3+
4+
case "$1" in
5+
configure)
6+
update-alternatives --install /usr/bin/ceph-osd ceph-osd \
7+
/usr/bin/ceph-osd-crimson 50
8+
;;
9+
esac
10+
11+
#DEBHELPER#
12+
13+
exit 0

debian/ceph-osd-crimson.prerm

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/sh
2+
set -e
3+
4+
case "$1" in
5+
remove)
6+
update-alternatives --remove ceph-osd /usr/bin/ceph-osd-crimson
7+
;;
8+
esac
9+
10+
#DEBHELPER#
11+
12+
exit 0

debian/ceph-osd.install

100755100644
Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,7 @@
1-
#! /usr/bin/dh-exec
2-
31
{usr/,}lib/systemd/system/ceph-osd*
4-
usr/bin/ceph-bluestore-tool
52
usr/bin/ceph-clsinfo
63
usr/bin/ceph-erasure-code-tool
7-
usr/bin/ceph-objectstore-tool
8-
<pkg.ceph.crimson> usr/bin/crimson-store-nbd
9-
<pkg.ceph.crimson> usr/bin/crimson-objectstore-tool
10-
<pkg.ceph.crimson> usr/bin/crimson-store-bench
11-
usr/bin/${CEPH_OSD_BASENAME} => /usr/bin/ceph-osd
12-
usr/bin/ceph_objectstore_bench
134
usr/libexec/ceph/ceph-osd-prestart.sh
14-
usr/lib/libos_tp.so*
15-
usr/lib/libosd_tp.so*
165
usr/share/man/man8/ceph-clsinfo.8
176
usr/share/man/man8/ceph-osd.8
18-
usr/share/man/man8/ceph-bluestore-tool.8
197
etc/sysctl.d/30-ceph-osd.conf

debian/control

Lines changed: 80 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -414,42 +414,109 @@ Description: debugging symbols for ceph-mon
414414

415415
Package: ceph-osd
416416
Architecture: linux-any
417-
Depends: ceph-base (= ${binary:Version}),
417+
Depends: ceph-osd-classic (= ${binary:Version}) | ceph-osd-crimson (= ${binary:Version}),
418418
sudo,
419-
${misc:Depends},
420419
${python3:Depends},
420+
${misc:Depends},
421+
${shlibs:Depends},
422+
Recommends: ceph-osd-classic (= ${binary:Version})
423+
Description: OSD server for the ceph storage system - shared components
424+
Ceph is a massively scalable, open-source, distributed
425+
storage system that runs on commodity hardware and delivers object,
426+
block and file system storage.
427+
.
428+
This package contains components shared between classic and crimson OSD implementations.
429+
It ensures a Ceph OSD implementation is installed. By default,
430+
it installs the classic OSD implementation (ceph-osd-classic). Users can
431+
substitute with the experimental Crimson implementation (ceph-osd-crimson)
432+
for improved performance and scalability.
433+
434+
Package: ceph-osd-dbg
435+
Architecture: linux-any
436+
Section: debug
437+
Priority: extra
438+
Depends: ceph-osd (= ${binary:Version}),
439+
${misc:Depends},
440+
Description: debugging symbols for ceph-osd
441+
Ceph is a massively scalable, open-source, distributed
442+
storage system that runs on commodity hardware and delivers object,
443+
block and file system storage.
444+
.
445+
This package contains the debugging symbols for ceph-osd.
446+
447+
Package: ceph-osd-classic
448+
Architecture: linux-any
449+
Depends: ceph-base (= ${binary:Version}),
450+
${misc:Depends},
421451
${shlibs:Depends},
422-
libprotobuf23 <pkg.ceph.crimson>,
423452
Replaces: ceph (<< 10),
424453
ceph-test (<< 12.2.2-14),
425-
ceph-osd (<< 17.0.0)
454+
ceph-osd (<< 20.1.1)
426455
Breaks: ceph (<< 10),
427456
ceph-test (<< 12.2.2-14),
428-
ceph-osd (<< 17.0.0)
457+
ceph-osd (<< 20.1.1)
429458
Recommends: ceph-volume (= ${binary:Version}),
430459
nvme-cli,
431460
smartmontools,
432-
Description: OSD server for the ceph storage system
461+
Description: Classic OSD server for the ceph storage system
433462
Ceph is a massively scalable, open-source, distributed
434463
storage system that runs on commodity hardware and delivers object,
435464
block and file system storage.
436465
.
437-
This package contains the Object Storage Daemon for the Ceph storage system.
438-
It is responsible for storing objects on a local file system
439-
and providing access to them over the network.
466+
This package contains the classic Object Storage Daemon and
467+
classic-specific components for the Ceph storage system. It is
468+
responsible for storing objects on a local file system and providing
469+
access to them over the network.
440470

441-
Package: ceph-osd-dbg
471+
Package: ceph-osd-classic-dbg
442472
Architecture: linux-any
443473
Section: debug
444474
Priority: extra
445-
Depends: ceph-osd (= ${binary:Version}),
475+
Depends: ceph-osd-classic (= ${binary:Version}),
446476
${misc:Depends},
447-
Description: debugging symbols for ceph-osd
477+
Description: debugging symbols for ceph-osd-classic
448478
Ceph is a massively scalable, open-source, distributed
449479
storage system that runs on commodity hardware and delivers object,
450480
block and file system storage.
451481
.
452-
This package contains the debugging symbols for ceph-osd.
482+
This package contains the debugging symbols for ceph-osd-classic.
483+
484+
Package: ceph-osd-crimson
485+
Build-Profiles: <pkg.ceph.crimson>
486+
Architecture: any
487+
Depends: ceph-base (= ${binary:Version}),
488+
${misc:Depends},
489+
${shlibs:Depends},
490+
libprotobuf23,
491+
Recommends: ceph-volume (= ${binary:Version}),
492+
nvme-cli,
493+
smartmontools,
494+
Description: Crimson OSD server for the ceph storage system
495+
Ceph is a massively scalable, open-source, distributed
496+
storage system that runs on commodity hardware and delivers object,
497+
block and file system storage.
498+
.
499+
Crimson is the next generation of ceph-osd daemon featuring enhanced
500+
performance on fast network and storage devices.
501+
.
502+
This package contains the Crimson Object Storage Daemon and
503+
crimson-specific components for the Ceph storage system. It is
504+
responsible for storing objects on a local file system and providing
505+
access to them over the network.
506+
507+
Package: ceph-osd-crimson-dbg
508+
Build-Profiles: <pkg.ceph.crimson>
509+
Architecture: linux-any
510+
Section: debug
511+
Priority: extra
512+
Depends: ceph-osd-crimson (= ${binary:Version}),
513+
${misc:Depends},
514+
Description: debugging symbols for ceph-osd-crimson
515+
Ceph is a massively scalable, open-source, distributed
516+
storage system that runs on commodity hardware and delivers object,
517+
block and file system storage.
518+
.
519+
This package contains the debugging symbols for ceph-osd-crimson.
453520

454521
Package: ceph-volume
455522
Architecture: all

debian/rules

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@ ifneq (,$(findstring WITH_STATIC_LIBSTDCXX,$(CEPH_EXTRA_CMAKE_ARGS)))
1212
# see http://tracker.ceph.com/issues/25209
1313
export DEB_LDFLAGS_MAINT_STRIP = -Wl,-Bsymbolic-functions
1414
endif
15-
ifeq (,$(findstring WITH_CRIMSON,$(CEPH_EXTRA_CMAKE_ARGS)))
16-
export CEPH_OSD_BASENAME = ceph-osd
17-
else
18-
export CEPH_OSD_BASENAME = crimson-osd
19-
endif
2015
ifneq ($(filter pkg.ceph.arrow,$(DEB_BUILD_PROFILES)),)
2116
extraopts += -DWITH_SYSTEM_ARROW=ON
2217
endif
18+
ifneq ($(filter pkg.ceph.crimson,$(DEB_BUILD_PROFILES)),)
19+
extraopts += -DWITH_CRIMSON=ON
20+
endif
2321

2422
extraopts += -DWITH_JAEGER=ON
2523
extraopts += -DWITH_SYSTEM_UTF8PROC=ON

0 commit comments

Comments
 (0)