integration-cli: Fix race in restart loop Upstream-commit: 5a6f84ce089f7a562010564ad7e2ebcb60a39d5d Component: engine