-
Notifications
You must be signed in to change notification settings - Fork 329
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Optionally support removing container before trying to start it #238
Optionally support removing container before trying to start it #238
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@solarchad Apologies for the delay and thanks for your contribution. Just a couple of yamllint
violations as mentioned inline. We're also using commitlint
(for semantic-release
):
https://travis-ci.com/saltstack-formulas/docker-formula/jobs/276317943#L374-L379
⧗ input: Optionally support removing container before trying to start it in upstart/systemd
✖ header must not be longer than 72 characters, current length is 82 [header-max-length]
✖ subject may not be empty [subject-empty]
✖ type may not be empty [type-empty]
✖ found 3 problems, 0 warnings
So the commit message should be adjusted accordingly to something like:
-Optionally support removing container before trying to start it in upstart/systemd
+feat: support optional container removal before start in upstart/systemd
9b8695f
to
94f73c6
Compare
Thanks @myii. I made these changes but I see that Travis is still unhappy. Is it failing for unrelated reasons now? |
@solarchad The https://travis-ci.com/saltstack-formulas/docker-formula/jobs/278367547#L298-L301 $ yamllint -s .
./pillar.example
18:28 warning truthy value should be one of [false, true] (truthy)
44:28 warning truthy value should be one of [false, true] (truthy) Perhaps you didn't add the changes to the latest commit you pushed? |
94f73c6
to
cc10d97
Compare
Whoops, sorry about that. I forgot to add the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, looking good now.
🎉 This PR is included in version 0.43.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
PR progress checklist (to be filled in by reviewers)
What type of PR is this?
Primary type
[build]
Changes related to the build system[chore]
Changes to the build process or auxiliary tools and libraries such as documentation generation[ci]
Changes to the continuous integration configuration[feat]
A new feature[fix]
A bug fix[perf]
A code change that improves performance[refactor]
A code change that neither fixes a bug nor adds a feature[revert]
A change used to revert a previous commit[style]
Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)Secondary type
[docs]
Documentation changes[test]
Adding missing or correcting existing testsDoes this PR introduce a
BREAKING CHANGE
?No.
Related issues and/or pull requests
Describe the changes you're proposing
This should avoid this problem when trying to start the service (and the container was created but not running). For example:
I hit the problem with the AWS ecs-agent and in their ECS developer guide (on page 212), you can see that they have their systemd unit file using an
ExecStartPre
to remove the container before trying to start it.This is useful if say the container gets created from a failed run. If you try to run it again, it will continue to fail because the container was created with the same name.
Pillar / config required to test the proposed changes
See the
pillar.example
.Debug log showing how the proposed changes work
Documentation checklist
README
(e.g.Available states
).pillar.example
.Testing checklist
state_top
).Additional context