-
Notifications
You must be signed in to change notification settings - Fork 326
fix(service): change default service name #277
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
fix(service): change default service name #277
Conversation
ef72742 to
79a56bc
Compare
|
@hatifnatt Looks like you're going to need to modify this test as well:
|
|
@myii good point, I'm still not using Kitchen locally
Title is stating 'running and enabled' but it seems like running is not actually tested.
|
@hatifnatt Ideally, yes -- but there's probably a reason why @noelmcloughlin disabled it, so let's leave it for this particular PR. I suppose some of the instances will fail due to some container-based issues. In fact, this block has also been disabled and would need to be investigated: docker-formula/test/integration/package/controls/service.rb Lines 6 to 9 in 3f85131
|
Docker daemon service name in official Docker packages is 'docker' but formula uses 'dockerd'. Due to these differences docker service won't start after installation. Fix documentation link in systemd service Docker daemon binary in official Docker archive distribution is always 'dockerd' no reason to substitute service name 'null' from yaml is rendering as 'None' by Jinja therefore, systemd displays a warning in the log, replace with empty string to prevent this issue BREAKING CHANGE: due changes in default service name, on systems where 'archive' installation method is used, duplicate service will be created. This can be avoided by updating pillar with 'docker:pkg:docker:service:name: dockerd'. Due fact that 'archive' method is default this change may affect a large number of users
79a56bc to
f8f96f1
Compare
myii
left a comment
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, @hatifnatt. Since this involves a BREAKING CHANGE, I'll leave this open for a second opinion, probably from @noelmcloughlin.
|
thanks @hatifnatt |
@myii the docker |
@noelmcloughlin Thanks for the response. I'm intrigued... let me try a run here in GitHub Actions to see what happens. I'll let you know shortly. |
|
Service name is (probably) |
In Travis CI/CD we used docker driver and means we cannot test Suse: #203 #197 |
|
Same issue in arch: #229 We need to figure out if it is package or archive or both formats that encounter the issue. |
|
Actually maybe these issues only happen when kernel is upgraded and docker is installed before required reboots. |
|
@noelmcloughlin @sticky-note So I've run a build with the service tests enabled, adding this commit as well -- almost there now: Let me figure out the specifics of the failing builds and then we can add that to this PR. |
|
@noelmcloughlin OK, the systemd[1]: /usr/lib/systemd/system/docker.service:16: PIDFile= references a path below legacy directory /var/run/, updating /var/run/docker.pid → /run/docker.pid; please update the unit file accordingly.
That will probably be the same for the other two failures as well. |
|
Ah, that's not enough by itself, that then leads to the following error: dockerd[1548]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not foundSo until there's a proper fix for that, perhaps the best gains would be to enable the service testing everywhere except for these three failing instances. That's easy enough to do from InSpec. |
|
Yes that makes sense. @hatifnatt could you update the PR based on the test results please? |
Don't worry, I'll push the fixed tests once I figure out the right ignores to use. @hatifnatt Is |
Here is ugly hack: https://forums.docker.com/t/failing-to-start-dockerd-failed-to-create-nat-chain-docker/78269/9 |
|
OK, the other two are failing with the same.
dockerd[803]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not found
dockerd[758]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not foundSo let me fix up those tests and then push them here. |
Excluding for `archive` on the following platforms until resolved.
---
`archive-fedora-33-master-py3`:
```
systemd[1]: /usr/lib/systemd/system/docker.service:16: PIDFile= references a path below legacy directory /var/run/,
updating /var/run/docker.pid → /run/docker.pid; please update the unit file accordingly.
```
However, even when that's fixed:
```
dockerd[1548]: failed to start daemon: Error initializing network controller:
error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not found
```
---
`archive-fedora-32-master-py3`:
```
dockerd[803]: failed to start daemon: Error initializing network controller:
error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not found
```
---
`archive-opensuse-leap-152-master-py3`:
```
dockerd[758]: failed to start daemon: Error initializing network controller:
error obtaining controller instance: failed to create NAT chain DOCKER: Iptables not found
```
|
@noelmcloughlin @hatifnatt Tests updated in c168ee1, service is being tested wherever possible. |
|
@myii thanks for the fixes! About docker-formula/docker/osfamilymap.yaml Line 56 in 3f85131
but due lists are not merged by grains.filter_by it's lost when docker:pkg:deps defined in osfamilymap
|
|
@noelmcloughlin could you please review and give any conclusion? |
I checked and found #273 (comment) and I was suggesting this line be fixed:
But I think you were not keen. @myii has approved feel free to merge yourself. |
|
I outlined my thoughts about additional variable in #273 (comment) Do you still think additional variable is required?
Actually I already wrote my own formula for docker, just want to close this 'hanging' PR in some way. |
noelmcloughlin
left a comment
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.
Nice work. You are probably correct. I reviewed the CI and both package/archive states are working across an impressive matrix of OS. So LGTM
|
Because your PR includes this fix: |
|
🎉 This PR is included in version 2.0.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
|
@noelmcloughlin thanks for review and merge! |
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?Yes.
BREAKING CHANGE: due changes in default service name, on systems where 'archive' installation method is used, duplicate service will be created. This can be avoided by updating pillar with 'docker:pkg:docker:service:name: dockerd'. Due fact that 'archive' method is default this change may affect a large number of users
Related issues and/or pull requests
Closes #273
Describe the changes you're proposing
Docker daemon service name in official Docker packages is 'docker' but formula uses 'dockerd'. Due to these differences docker service won't start after installation if
packageinstallation method is selected -docker:pkg:docker:use_upstream: repo.Fix documentation link in systemd service
docker/software/archive/install.slsDocker daemon binary in official Docker archive distribution is always 'dockerd' no reason to substitute service name
defaults.yaml'null' from yaml is rendering as 'None' by Jinja therefore, systemd displays a warning in the log, replace with empty string to prevent this issue
Pillar / config required to test the proposed changes
Debug log showing how the proposed changes work
Documentation checklist
README(e.g.Available states).pillar.example.Testing checklist
state_top).Additional context
Better merge this after #276