From: Yuan Zhou Date: Sat, 29 Dec 2018 08:50:44 +0000 (+0800) Subject: build/ops: adding build spec for immutable object cache daemon X-Git-Tag: v15.0.0~136^2~45 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=9466d7098573dafcfede5e9c852374fbbd99f9e7;p=ceph.git build/ops: adding build spec for immutable object cache daemon Signed-off-by: Yuan Zhou --- diff --git a/ceph.spec.in b/ceph.spec.in index 84a8127d7209..c8ffc585b4c1 100644 --- a/ceph.spec.in +++ b/ceph.spec.in @@ -580,6 +580,16 @@ Requires: librbd1 = %{_epoch_prefix}%{version}-%{release} Daemon for mirroring RBD images between Ceph clusters, streaming changes asynchronously. +%package -n ceph-immutable-object-cache +Summary: Ceph daemon for immutable object cache +%if 0%{?suse_version} +Group: System/Filesystems +%endif +Requires: ceph-common = %{_epoch_prefix}%{version}-%{release} +Requires: libradospp1 = %{_epoch_prefix}%{version}-%{release} +%description -n ceph-immutable-object-cache +Daemon for immutable object cache. + %package -n rbd-nbd Summary: Ceph RBD client base on NBD %if 0%{?suse_version} @@ -1736,6 +1746,54 @@ if [ $1 -ge 1 ] ; then fi fi +%files -n ceph-immutable-object-cache +%{_bindir}/ceph-immutable-object-cache +%{_mandir}/man8/ceph-immutable-object-cache.8* +%{_unitdir}/ceph-immutable-object-cache@.service +%{_unitdir}/ceph-immutable-object-cache.target + +%post -n ceph-immutable-object-cache +%if 0%{?suse_version} +if [ $1 -eq 1 ] ; then + /usr/bin/systemctl preset ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target >/dev/null 2>&1 || : +fi +%endif +%if 0%{?fedora} || 0%{?rhel} +%systemd_post ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target +%endif +if [ $1 -eq 1 ] ; then +/usr/bin/systemctl start ceph-immutable-object-cache.target >/dev/null 2>&1 || : +fi + +%preun -n ceph-immutable-object-cache +%if 0%{?suse_version} +%service_del_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target +%endif +%if 0%{?fedora} || 0%{?rhel} +%systemd_preun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target +%endif + +%postun -n ceph-immutable-object-cache +test -n "$FIRST_ARG" || FIRST_ARG=$1 +%if 0%{?suse_version} +DISABLE_RESTART_ON_UPDATE="yes" +%service_del_postun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target +%endif +%if 0%{?fedora} || 0%{?rhel} +%systemd_postun ceph-immutable-object-cache@\*.service ceph-immutable-object-cache.target +%endif +if [ $FIRST_ARG -ge 1 ] ; then + # Restart on upgrade, but only if "CEPH_AUTO_RESTART_ON_UPGRADE" is set to + # "yes". In any case: if units are not running, do not touch them. + SYSCONF_CEPH=%{_sysconfdir}/sysconfig/ceph + if [ -f $SYSCONF_CEPH -a -r $SYSCONF_CEPH ] ; then + source $SYSCONF_CEPH + fi + if [ "X$CEPH_AUTO_RESTART_ON_UPGRADE" = "Xyes" ] ; then + /usr/bin/systemctl try-restart ceph-immutable-object-cache@\*.service > /dev/null 2>&1 || : + fi +fi + %files -n rbd-nbd %{_bindir}/rbd-nbd %{_mandir}/man8/rbd-nbd.8* diff --git a/debian/ceph-immutable-object-cache.install b/debian/ceph-immutable-object-cache.install new file mode 100644 index 000000000000..76daf1928c3a --- /dev/null +++ b/debian/ceph-immutable-object-cache.install @@ -0,0 +1,3 @@ +lib/systemd/system/ceph-immutable-object-cache* +usr/bin/ceph-immutable-object-cache +usr/share/man/man8/ceph-immutable-object-cache.8 diff --git a/debian/control b/debian/control index e7a01c6ff88f..ac61a87164ec 100644 --- a/debian/control +++ b/debian/control @@ -438,6 +438,21 @@ Description: Ceph daemon for mirroring RBD images daemon for mirroring RBD images between Ceph clusters, streaming changes asynchronously. +Package: ceph-immutable-object-cache +Architecture: linux-any +Depends: ceph-common (= ${binary:Version}), + librados3 (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Ceph daemon for mirroring RBD images + Ceph is a massively scalable, open-source, distributed + storage system that runs on commodity hardware and delivers object, + block and file system storage. This is a + daemon for mirroring RBD images between Ceph clusters, streaming + changes asynchronously. + + + Package: rbd-mirror-dbg Architecture: linux-any Section: debug diff --git a/debian/rules b/debian/rules index 8579f42613f3..33b5f28ff701 100755 --- a/debian/rules +++ b/debian/rules @@ -96,6 +96,7 @@ override_dh_strip: dh_strip -pceph-fuse --dbg-package=ceph-fuse-dbg dh_strip -prbd-fuse --dbg-package=rbd-fuse-dbg dh_strip -prbd-mirror --dbg-package=rbd-mirror-dbg + dh_strip -pceph-immutable-object-cache --dbg-package=ceph-immutable-object-cache-dbg dh_strip -prbd-nbd --dbg-package=rbd-nbd-dbg dh_strip -pceph-common --dbg-package=ceph-common-dbg dh_strip -plibrados2 --dbg-package=librados2-dbg diff --git a/doc/man/8/CMakeLists.txt b/doc/man/8/CMakeLists.txt index dd3f8af3f3b2..1fb6465ae3ff 100644 --- a/doc/man/8/CMakeLists.txt +++ b/doc/man/8/CMakeLists.txt @@ -68,6 +68,7 @@ if(WITH_RBD) endif() endif() +list(APPEND man_srcs ceph-immutable-object-cache.rst) foreach(man ${man_srcs}) list(APPEND sphinx_input ${CMAKE_CURRENT_SOURCE_DIR}/${man}) # mount.ceph.rst => mount if we use diff --git a/doc/man/8/ceph-immutable-object-cache.rst b/doc/man/8/ceph-immutable-object-cache.rst new file mode 100644 index 000000000000..4efbf965c0c0 --- /dev/null +++ b/doc/man/8/ceph-immutable-object-cache.rst @@ -0,0 +1,76 @@ +:orphan: + +====================================================================== + ceph-immutable-object-cache -- Ceph daemon for immutable object cache +====================================================================== + +.. program:: ceph-immutable-object-cache + +Synopsis +======== + +| **ceph-immutable-object-cache** + + +Description +=========== + +:program:`ceph-immutable-object-cache` is a daemon for object cache of RADOS +objects among Ceph clusters. It will promote the objects to a local directory +upon promote requests and future reads will be serviced from these cached +objects. + +It connects to remote clusters via the RADOS protocol, relying on +default search paths to find ceph.conf files, monitor addresses and +authentication information for them, i.e. ``/etc/ceph/$cluster.conf``, +``/etc/ceph/$cluster.keyring``, and +``/etc/ceph/$cluster.$name.keyring``, where ``$cluster`` is the +human-friendly name of the cluster, and ``$name`` is the rados user to +connect as, e.g. ``client.ceph-immutable-object-cache``. + + +Options +======= + +.. option:: -c ceph.conf, --conf=ceph.conf + + Use ``ceph.conf`` configuration file instead of the default + ``/etc/ceph/ceph.conf`` to determine monitor addresses during startup. + +.. option:: -m monaddress[:port] + + Connect to specified monitor (instead of looking through ``ceph.conf``). + +.. option:: -i ID, --id ID + + Set the ID portion of name for ceph-immutable-object-cache + +.. option:: -n TYPE.ID, --name TYPE.ID + + Set the rados user name for the gateway (eg. client.ceph-immutable-object-cache) + +.. option:: --cluster NAME + + Set the cluster name (default: ceph) + +.. option:: -d + + Run in foreground, log to stderr + +.. option:: -f + + Run in foreground, log to usual location + + +Availability +============ + +:program:`ceph-immutable-object-cache` is part of Ceph, a massively scalable, open-source, distributed +storage system. Please refer to the Ceph documentation at http://ceph.com/docs for +more information. + + +See also +======== + +:doc:`rbd `\(8) diff --git a/doc/man_index.rst b/doc/man_index.rst index d32fd2fe2a58..0c54f32fb6c9 100644 --- a/doc/man_index.rst +++ b/doc/man_index.rst @@ -40,3 +40,4 @@ man/8/rbd-replay man/8/rbd man/8/rbdmap + man/8/ceph-immutable-object-cache diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt index 56be619d44ca..43adf7be142c 100644 --- a/systemd/CMakeLists.txt +++ b/systemd/CMakeLists.txt @@ -12,6 +12,7 @@ foreach(service ceph-osd@ ceph-radosgw@ ceph-rbd-mirror@ + ceph-immutable-object-cache@ rbdmap) configure_file( ${service}.service.in @@ -31,5 +32,6 @@ install(FILES ceph-mds.target ceph-radosgw.target ceph-rbd-mirror.target + ceph-immutable-object-cache.target ceph-volume@.service DESTINATION ${CMAKE_INSTALL_SYSTEMD_SERVICEDIR})