c6e133cee1
Replace exit code checking with explicit state comparison when
detecting if barbican-api.service is active. This handles edge
cases like "failed" or "activating" states more reliably.
Test Plan:
PASS: build-pkgs
PASS: Install ISO and bootstrap
PASS: barbican-api.service must be inactive after sm is started
PASS: Replicate the odd behavior of barbican-api.service:
systemctl start barbican-api.service
It was noticed that sm calls the <start> method on any change
on PIDFile, so SM should stop barbican-api.service whenever it
starts, since it changes the PIDFile. Check barbican-api.log
for these messages:
INFO: Barbican start
INFO: OpenStack Key Management API (barbican-api) managed by
systemd identified. Stopping it...
Check barbican-api.service status, it should be inactive.
Story: 2011360
Task:
Change-Id: Ib5909f1533afa3694381e49b2fe2369463ccca6e
Signed-off-by: sharang bhardwaj <sharang.bhardwaj@windriver.com>