Thanks for getting in touch! I’m sorry to hear you’re hitting this unexpected behavior with your services not restarting. Your assumption looks correct, and you can also refer directly to the Calamari source code.
This is where we stop the service:
This is where we restart the service:
If you’re still hitting some unexpected behavior on this step, could you attach a copy of your verbose task log? That should give us some more context to hopefully narrow down what’s going on. Feel free to mark this thread as private, or email us at support@octopus.com if sending the log.