Commit e274696
ansible-scylla-monitoring: make start wrapper idempotent for systemd unit
The 'Enable scylla-monitoring at boot' task sets state: started on the
scylla-monitoring.service unit right after the stack was already
started manually via the same start wrapper a few tasks earlier. Since
the unit was freshly installed (and thus inactive from systemd's point
of view), enabling it with state: started re-runs ExecStart
(start-monitoring.sh -> start-all.sh) against containers that are
already up, so start-all.sh fails with a container/name conflict and
systemd reports 'control process exited with error code'.
Make start-monitoring.sh.j2 tear down any already-running stack (via
the already-idempotent stop wrapper) before starting, so it is safe to
invoke back-to-back from the manual start task and then again from the
systemd unit.
Co-authored-by: Manjot Singh <ManjotS@users.noreply.github.com>1 parent 004d9ac commit e274696
1 file changed
Lines changed: 5 additions & 0 deletions
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
9 | 14 | | |
0 commit comments