HomeClusterLabs Projects

Fixup docker_stop condition on error

Description

Fixup docker_stop condition on error

In docker_stop() let's store the return code of docker_simple_status
otherwise the second branch of the elif risks reflecting the return
code of the previous operaiton and not of docker_simple_status()

Retested this with a bunch of stop/start commands on a rabbitmq bundle
and observed no issues.

This fixes a stop() regression introduced in
b7ae1bfbe7d393a9e9d993da3da35cc4d1bc9eb4 ("Make the check for the docker
daemon being up more robust")

Thanks to Kota Akatsuka for spotting it.

Signed-off-by: Michele Baldessari <michele@acksyn.org>

Details

Provenance
Michele Baldessari <michele@acksyn.org>Authored on Aug 29 2019, 2:10 AM
Parents
rRdba8d0e9dfe2: Merge pull request #1388 from mbaldessari/docker_stop
Branches
Unknown
Tags
Unknown

Event Timeline