mirror of https://github.com/ceph/ceph-ansible.git
handler: fix bug in osd handlers
pull/4255/headfbf4ed42ae
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 <gabrioux@redhat.com> (cherry picked from commit618dbf271d
)
parent
4aa4496fc1
commit
bbfd6965e0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue