Code review comment for lp:~chad.smith/charm-helpers/resume-pause-idempotent

Revision history for this message
Stuart Bishop (stub) wrote :

I don't think we need to worry about backwards compatibility here, which is good, since existing charms that would trigger the new behaviour are currently ending up in an error state.

Is service_running(foo) guaranteed to return true immediately after a start or false immediately after a stop? I don't think sysv makes any such guarantee (not sure about upstart), so I think service_start() will fail with daemons that take a while to startup and write their pid file.

I'd personally trust look-before-you-leap more, only calling stop if service_running() returns true and only calling start if service_running returns false etc. But I don't know what upstart guarantees (nor systemd, when we add xenial support).

review: Needs Information

« Back to merge proposal