systemctl does not have a nice way to enumerate (active) units so we can
reload them. On centos7, the is-active wildcard syntax does not appear to
be supported. On fedora 22, it prints the state only but not which unit
the state belongs to.
Simply killall -1 instead.
Signed-off-by: Sage Weil <sage@redhat.com>
elif which invoke-rc.d > /dev/null 2>&1 && [ -x `which invoke-rc.d` ]; then
invoke-rc.d ceph reload >/dev/null
elif which systemctl > /dev/null 2>&1 && [ -x `which systemctl` ]; then
- if systemctl is-active 'ceph-*' | grep -i active > /dev/null 2>&1 ; then
- systemctl reload 'ceph-*' >/dev/null || :
- fi
+ # systemd does not provide an easy way to list (active) units
+ killall -q -1 ceph-mon ceph-mds ceph-osd
fi
# Possibly reload twice, but depending on ceph.conf the reload above may be a no-op
if which initctl > /dev/null 2>&1 && [ -x `which initctl` ]; then
service ceph-radosgw reload >/dev/null
elif which invoke-rc.d > /dev/null 2>&1 && [ -x `which invoke-rc.d` ]; then
invoke-rc.d radosgw reload >/dev/null
+ elif which systemctl > /dev/null 2>&1 && [ -x `which systemctl` ]; then
+ # systemd does not provide an easy way to list (active) units
+ killall -q -1 radosgw
fi
# Possibly reload twice, but depending on ceph.conf the reload above may be a no-op
if which initctl > /dev/null 2>&1 && [ -x `which initctl` ]; then