puppetlabs-docker icon indicating copy to clipboard operation
puppetlabs-docker copied to clipboard

Update systemd docker run template, remove WantedBy=multi-user.target to avoid ordering cycle

Open archaron opened this issue 3 years ago • 2 comments

When running docker-based services, puppet creates systemd startup file named docker-.service with dependency on docker.service and multi-user.target.

docker.service depends on multi-user.target. docker- adds WantedBy=multi-user.target that creates complement circular dependency

According to docs:

Target units will automatically complement all configured dependencies of type Wants= or Requires= with dependencies of type After= unless DefaultDependencies=no is set in the specified units.

Service dependency graph looks like: docker-<myservice> -> docker.service -> multi-user.target -> docker-<myservice> -> .....

When rebooting system:

multi-user.target: Found ordering cycle on docker-myservice.service/start
multi-user.target: Found dependency on docker.service/start
multi-user.target: Found dependency on multi-user.target/start
multi-user.target: Job docker-myservice.service/start deleted to break ordering cycle starting with multi-user.target/start

Service is not starts at boot anymore.

archaron avatar Jun 15 '22 12:06 archaron

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Jun 15 '22 12:06 CLAassistant

Thank you for reporting this. However, we require more information in order to move forward with this issue. If you would be able to provide:

your environment setup the version of the modules involved a manifest to help with reproduction of the issue The more information you give us the more likely we will be to reproduce and address the issue.

Thanks!

petergmurphy avatar Jul 04 '22 14:07 petergmurphy

Hello! 👋

This pull request has been open for a while and has had no recent activity. We've labelled it with attention-needed so that we can get a clear view of which PRs need our attention.

If you are waiting on a response from us we will try and address your comments on a future Community Day.

Alternatively, if it is no longer relevant to you please close the PR with a comment.

Please note that if a pull request receives no update for 7 after it has been labelled, it will be closed. We are always happy to re-open pull request if they have been closed in error.

github-actions[bot] avatar Sep 03 '22 02:09 github-actions[bot]