From: Guillaume Abrioux Date: Thu, 18 Jul 2019 12:06:23 +0000 (+0200) Subject: handler: fix bug in osd handlers X-Git-Tag: v5.0.0alpha1~205 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=618dbf271d04723bf35483a3aa62ef9019f2d390;p=ceph-ansible.git handler: fix bug in osd handlers fbf4ed42aee8fa5fd18c4c289cbb80ffeda8f72e introduced a bug when container binary is podman. podman doesn't support ps -f using regular expression, the container id is never set in the restart script causing the handler to fail. Closes: https://bugzilla.redhat.com/show_bug.cgi?id=1721536 Signed-off-by: Guillaume Abrioux --- diff --git a/roles/ceph-handler/templates/restart_osd_daemon.sh.j2 b/roles/ceph-handler/templates/restart_osd_daemon.sh.j2 index 2635f6d41..3e5b79daa 100644 --- a/roles/ceph-handler/templates/restart_osd_daemon.sh.j2 +++ b/roles/ceph-handler/templates/restart_osd_daemon.sh.j2 @@ -45,7 +45,7 @@ get_container_id_from_dev_name() { local count count=10 while [ $count -ne 0 ]; do - id=$({{ container_binary }} ps -q -f "name=${1}$") + id=$({{ container_binary }} ps | grep -E "${1}$" | cut -d' ' -f1) test "$id" != "" && break sleep $DELAY let count=count-1