Skip to content

Commit

Permalink
files,rpm,deb: rename ceph-daemon -> cephadm
Browse files Browse the repository at this point in the history
This is just renaming the files and adjusting the packages.  Lots of
cleanup to do still.

Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Dec 12, 2019
1 parent a5b3037 commit c8750b7
Show file tree
Hide file tree
Showing 41 changed files with 99 additions and 99 deletions.
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/doc/mgr/dashboard.rst @ceph/dashboard

# For Orchestrator related PRs
/src/ceph-daemon @ceph/orchestrators
/src/cephadm @ceph/orchestrators
/src/pybind/mgr/ansible @ceph/orchestrators
/src/pybind/mgr/orchestrator_cli @ceph/orchestrators
/src/pybind/mgr/orchestrator.py @ceph/orchestrators
Expand Down
46 changes: 23 additions & 23 deletions ceph.spec.in
Original file line number Diff line number Diff line change
Expand Up @@ -400,11 +400,11 @@ Recommends: chrony
%description base
Base is the package that includes all the files shared amongst ceph servers

%package -n ceph-daemon
Summary: Ceph-daemon utility to bootstrap Ceph clusters
%package -n cephadm
Summary: cephadm utility to bootstrap Ceph clusters
Requires: podman
%description -n ceph-daemon
Ceph-daemon utility to bootstrap a Ceph cluster and manage ceph daemons
%description -n cephadm
cephadm utility to bootstrap a Ceph cluster and manage ceph daemons
deployed with systemd and podman.

%package -n ceph-common
Expand Down Expand Up @@ -604,7 +604,7 @@ Group: System/Filesystems
%endif
Requires: ceph-mgr = %{_epoch_prefix}%{version}-%{release}
Requires: python%{_python_buildid}-remoto
Requires: ceph-daemon = %{_epoch_prefix}%{version}-%{release}
Requires: cephadm = %{_epoch_prefix}%{version}-%{release}
%if 0%{?suse_version}
Requires: openssh
%endif
Expand Down Expand Up @@ -1349,7 +1349,7 @@ chmod 0644 %{buildroot}%{_docdir}/ceph/sample.ceph.conf
install -m 0644 -D COPYING %{buildroot}%{_docdir}/ceph/COPYING
install -m 0644 -D etc/sysctl/90-ceph-osd.conf %{buildroot}%{_sysctldir}/90-ceph-osd.conf

install -m 0755 src/ceph-daemon/ceph-daemon %{buildroot}%{_sbindir}/ceph-daemon
install -m 0755 src/cephadm/cephadm %{buildroot}%{_sbindir}/cephadm

# firewall templates and /sbin/mount.ceph symlink
%if 0%{?suse_version}
Expand All @@ -1362,7 +1362,7 @@ install -m 0644 -D udev/50-rbd.rules %{buildroot}%{_udevrulesdir}/50-rbd.rules

# sudoers.d
install -m 0600 -D sudoers.d/ceph-osd-smartctl %{buildroot}%{_sysconfdir}/sudoers.d/ceph-osd-smartctl
install -m 0600 -D sudoers.d/cephdaemon %{buildroot}%{_sysconfdir}/sudoers.d/cephdaemon
install -m 0600 -D sudoers.d/cephadm %{buildroot}%{_sysconfdir}/sudoers.d/cephadm

%if 0%{?rhel} >= 8
pathfix.py -pni "%{__python3} %{py3_shbang_opts}" %{buildroot}%{_bindir}/*
Expand Down Expand Up @@ -1510,31 +1510,31 @@ if [ $1 -ge 1 ] ; then
fi
fi

%pre daemon
%pre -n cephadm
# create user
if ! getent passwd | grep -q '^cephdaemon:'; then
useradd -r -s /bin/bash -c "Ceph-daemon user for mgr/ssh" -m cephdaemon
if ! getent passwd | grep -q '^cephadm:'; then
useradd -r -s /bin/bash -c "cephadm user for mgr/ssh" -m cephadm
fi
# set up (initially empty) .ssh/authorized_keys file
if ! test -d /home/cephdaemon/.ssh; then
mkdir /home/cephdaemon/.ssh
chown --reference /home/cephdaemon /home/cephdaemon/.ssh
chmod 0700 /home/cephdaemon/.ssh
if ! test -d /home/cephadm/.ssh; then
mkdir /home/cephadm/.ssh
chown --reference /home/cephadm /home/cephadm/.ssh
chmod 0700 /home/cephadm/.ssh
fi
if ! test -e /home/cephdaemon/.ssh/authorized_keys; then
touch /home/cephdaemon/.ssh/authorized_keys
chown --reference /home/cephdaemon /home/cephdaemon/.ssh/authorized_keys
chmod 0600 /home/cephdaemon/.ssh/authorized_keys
if ! test -e /home/cephadm/.ssh/authorized_keys; then
touch /home/cephadm/.ssh/authorized_keys
chown --reference /home/cephadm /home/cephadm/.ssh/authorized_keys
chmod 0600 /home/cephadm/.ssh/authorized_keys
fi
exit 0

%postun daemon
userdel -r cephdaemon || true
%postun -n cephadm
userdel -r cephadm || true
exit 0

%files daemon
%{_sbindir}/ceph-daemon
%{_sysconfdir}/sudoers.d/cephdaemon
%files -n cephadm
%{_sbindir}/cephadm
%{_sysconfdir}/sudoers.d/cephadm

%files common
%dir %{_docdir}/ceph
Expand Down
2 changes: 0 additions & 2 deletions debian/ceph-daemon.install

This file was deleted.

2 changes: 2 additions & 0 deletions debian/cephadm.install
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
usr/sbin/cephadm
etc/sudoers.d/cephadm
30 changes: 15 additions & 15 deletions debian/ceph-daemon.postinst → debian/cephadm.postinst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# vim: set noet ts=8:
# postinst script for ceph-daemon
# postinst script for cephadm
#
# see: dh_installdeb(1)

Expand All @@ -21,31 +21,31 @@ set -e

case "$1" in
configure)
# create cephdaemon user
# create cephadm user
# 1. create user if not existing
if ! getent passwd | grep -q "^cephdaemon:"; then
echo -n "Adding system user cephdaemon.."
adduser --quiet --system --disabled-password --gecos 'Ceph-dameon user for mgr/ssh' --shell /bin/bash cephdaemon 2>/dev/null || true
if ! getent passwd | grep -q "^cephadm:"; then
echo -n "Adding system user cephadm.."
adduser --quiet --system --disabled-password --gecos 'Ceph-dameon user for mgr/ssh' --shell /bin/bash cephadm 2>/dev/null || true
echo "..done"
fi

# 2. make sure user is unlocked
if [ -f /etc/shadow ]; then
usermod -U -e '' cephdaemon
usermod -U -e '' cephadm
else
usermod -U cephdaemon
usermod -U cephadm
fi

# set up (initially empty) .ssh/authorized_keys file
if ! test -d /home/cephdaemon/.ssh; then
mkdir /home/cephdaemon/.ssh
chown --reference /home/cephdaemon /home/cephdaemon/.ssh
chmod 0700 /home/cephdaemon/.ssh
if ! test -d /home/cephadm/.ssh; then
mkdir /home/cephadm/.ssh
chown --reference /home/cephadm /home/cephadm/.ssh
chmod 0700 /home/cephadm/.ssh
fi
if ! test -e /home/cephdaemon/.ssh/authorized_keys; then
touch /home/cephdaemon/.ssh/authorized_keys
chown --reference /home/cephdaemon /home/cephdaemon/.ssh/authorized_keys
chmod 0600 /home/cephdaemon/.ssh/authorized_keys
if ! test -e /home/cephadm/.ssh/authorized_keys; then
touch /home/cephadm/.ssh/authorized_keys
chown --reference /home/cephadm /home/cephadm/.ssh/authorized_keys
chmod 0600 /home/cephadm/.ssh/authorized_keys
fi

;;
Expand Down
4 changes: 2 additions & 2 deletions debian/ceph-daemon.postrm → debian/cephadm.postrm
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/sh
# postrm script for ceph-daemon
# postrm script for cephadm
#
# see: dh_installdeb(1)

Expand All @@ -21,7 +21,7 @@ set -e

case "$1" in
remove)
deluser --remove-home cephdaemon
deluser --remove-home cephadm
;;

purge)
Expand Down
8 changes: 4 additions & 4 deletions debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -167,16 +167,16 @@ Description: debugging symbols for ceph-base
.
This package contains the debugging symbols for ceph-base.

Package: ceph-daemon
Package: cephadm
Architecture: linux-any
Depends: docker.io,
${python:Depends},
Description: ceph-daemon utility to bootstrap ceph daemons with systemd and containers
Description: cephadm utility to bootstrap ceph daemons with systemd and containers
Ceph is a massively scalable, open-source, distributed
storage system that runs on commodity hardware and delivers object,
block and file system storage.
.
The ceph-daemon utility is used to bootstrap a Ceph cluster and to manage
The cephadm utility is used to bootstrap a Ceph cluster and to manage
ceph daemons deployed with systemd and containers.

Package: ceph-mds
Expand Down Expand Up @@ -329,7 +329,7 @@ Description: kubernetes events plugin for ceph-mgr
Package: ceph-mgr-ssh
Architecture: all
Depends: ceph-mgr (= ${binary:Version}),
ceph-daemon,
cephadm,
python-six,
${misc:Depends},
${python:Depends},
Expand Down
6 changes: 3 additions & 3 deletions debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ override_dh_auto_install:
install -D -m 644 src/etc-rbdmap $(DESTDIR)/etc/ceph/rbdmap
install -D -m 644 etc/sysctl/90-ceph-osd.conf $(DESTDIR)/etc/sysctl.d/30-ceph-osd.conf
install -D -m 600 sudoers.d/ceph-osd-smartctl $(DESTDIR)/etc/sudoers.d/ceph-osd-smartctl
install -D -m 600 sudoers.d/cephdaemon $(DESTDIR)/etc/sudoers.d/cephdaemon
install -D -m 600 sudoers.d/cephadm $(DESTDIR)/etc/sudoers.d/cephadm

install -m 755 src/ceph-daemon/ceph-daemon $(DESTDIR)/usr/sbin/ceph-daemon
install -m 755 src/cephadm/cephadm $(DESTDIR)/usr/sbin/cephadm

# doc/changelog is a directory, which confuses dh_installchangelogs
override_dh_installchangelogs:
Expand Down Expand Up @@ -135,7 +135,7 @@ override_dh_python2:
dh_python2 -p ceph-mgr
# batch-compile, and set up for delete, all the module files
dh_python2 -p ceph-mgr usr/lib/ceph/mgr
dh_python2 -p ceph-daemon
dh_python2 -p cephadm

override_dh_python3:
for binding in rados cephfs rbd rgw; do \
Expand Down
4 changes: 2 additions & 2 deletions qa/packages/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
ceph:
deb:
- ceph
- ceph-daemon
- cephadm
- ceph-mds
- ceph-mgr
- ceph-common
Expand Down Expand Up @@ -35,7 +35,7 @@ ceph:
- ceph-radosgw
- ceph-test
- ceph
- ceph-daemon
- cephadm
- ceph-mgr
- ceph-mgr-dashboard
- ceph-mgr-diskprediction-cloud
Expand Down
8 changes: 4 additions & 4 deletions qa/standalone/test_ceph_daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ OSD_LV_NAME=${SCRIPT_NAME%.*}
[ -z "$SUDO" ] && SUDO=sudo

if [ -z "$CEPH_DAEMON" ]; then
CEPH_DAEMON=${SCRIPT_DIR}/../../src/ceph-daemon/ceph-daemon
CEPH_DAEMON=${SCRIPT_DIR}/../../src/cephadm/cephadm
fi

# at this point, we need $CEPH_DAEMON set
if ! [ -x "$CEPH_DAEMON" ]; then
echo "ceph-daemon not found. Please set \$CEPH_DAEMON"
echo "cephadm not found. Please set \$CEPH_DAEMON"
exit 1
fi

Expand All @@ -42,7 +42,7 @@ if [ -z "$PYTHON_KLUDGE" ]; then
TMPBINDIR=$(mktemp -d)
trap "rm -rf $TMPBINDIR" EXIT
ORIG_CEPH_DAEMON="$CEPH_DAEMON"
CEPH_DAEMON="$TMPBINDIR/ceph-daemon"
CEPH_DAEMON="$TMPBINDIR/cephadm"
for p in $PYTHONS; do
echo "=== re-running with $p ==="
ln -s `which $p` $TMPBINDIR/python
Expand Down Expand Up @@ -211,7 +211,7 @@ for tarball in $TEST_TARS; do
# validate after adopt
out=$($CEPH_DAEMON ls | jq '.[]' \
| jq 'select(.name == "'$name'")')
echo $out | jq -r '.style' | grep 'ceph-daemon'
echo $out | jq -r '.style' | grep 'cephadm'
echo $out | jq -r '.fsid' | grep $FSID_LEGACY
done
# clean-up before next iter
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
extra_packages: ['librados2']
- print: "**** done installing mimic"
- ceph:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
extra_packages: ['librados2']
- print: "**** done installing mimic"
- ceph:
Expand Down
2 changes: 1 addition & 1 deletion qa/suites/rados/ssh/mode/packaged.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ overrides:
ceph2:
ceph_daemon_mode: packaged-ceph-daemon
install:
extra_packages: [ceph-daemon]
extra_packages: [cephadm]
2 changes: 1 addition & 1 deletion qa/suites/rados/thrash-old-clients/1-install/hammer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
- ceph-mgr
- libcephfs2
- libcephfs-devel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
- ceph-mgr
- libcephfs2
- libcephfs-devel
Expand Down
2 changes: 1 addition & 1 deletion qa/suites/rados/thrash-old-clients/1-install/jewel.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
- ceph-mgr
- libcephfs2
- libcephfs-devel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
extra_packages: ['librados2']
- install.upgrade:
mon.a:
Expand Down
2 changes: 1 addition & 1 deletion qa/suites/rados/thrash-old-clients/1-install/luminous.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
extra_packages: ['librados2']
- install.upgrade:
mon.a:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
extra_packages: ['librados2']
- install.upgrade:
mon.a:
Expand Down
2 changes: 1 addition & 1 deletion qa/suites/rados/thrash-old-clients/1-install/mimic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
extra_packages: ['librados2']
- install.upgrade:
mon.a:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ tasks:
- install:
branch: nautilus
exclude_packages:
- ceph-daemon
- cephadm
- install.upgrade:
mon.a:
mon.b:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ tasks:
- install:
branch: nautilus
exclude_packages:
- ceph-daemon
- cephadm
- install.upgrade:
mon.a:
mon.b:
Expand Down
2 changes: 1 addition & 1 deletion qa/suites/rados/thrash-old-clients/1-install/nautilus.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ tasks:
- install:
branch: nautilus
exclude_packages:
- ceph-daemon
- cephadm
- install.upgrade:
mon.a:
mon.b:
Expand Down
2 changes: 1 addition & 1 deletion qa/suites/upgrade/mimic-x-singleton/1-install/mimic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ tasks:
- ceph-mgr-diskprediction-cloud
- ceph-mgr-rook
- ceph-mgr-ssh
- ceph-daemon
- cephadm
extra_packages: ['librados2']
- print: "**** done install mimic"
- ceph:
Expand Down
Loading

0 comments on commit c8750b7

Please sign in to comment.