Skip to content
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

moby-engine package should not include /etc/docker/daemon.json #8961

Closed
paulmey opened this issue Apr 30, 2024 · 6 comments
Closed

moby-engine package should not include /etc/docker/daemon.json #8961

paulmey opened this issue Apr 30, 2024 · 6 comments
Assignees
Labels
2.0 AzureLinux 2.0 bug Something isn't working

Comments

@paulmey
Copy link
Member

paulmey commented Apr 30, 2024

Describe the bug
#8556 included a change that includes sane defaults in daemon.json. However, any consumer that deploys config using a configuration package now has a conflict.

file /etc/docker/daemon.json from install of azuredb-dataplane-common-0.0.19-1.cm2.noarch conflicts with file from package moby-engine-24.0.9-1.cm2.x86_64

To Reproduce
Steps to reproduce the behavior:

  1. Create a package that deploys custom config using /etc/docker/daemon.json
  2. Try to install your package on a system where
  3. Scroll down to '....'
  4. See error

Expected behavior
Since docker does not have a drop-in system or any other kind of composability for its config, the moby-engine package should not 'own' /etc/docker/daemon.json.
It might be a good idea to install a default in /etc/docker/daemon.json.default and copy it to /etc/docker/daemon.json in postinst if this file does not exist. That still achieves the goal of shipping sane defaults, while not taking ownership of the file.

@paulmey paulmey added the bug Something isn't working label Apr 30, 2024
@cpuguy83
Copy link

For this specific binary, upstream does not seem to try to resolve it from libexec.
For other ones, such as docker-init, it does look in /usr/libexec/docker/docker-init.
Should be pretty easy to convince upstream to do the same for docker-proxy.

It may be reasonable to look for docker-* binaries directly in /usr/libexec as well, but I don't think its currently doing this for any binary today.

@mfrw mfrw added the 2.0 AzureLinux 2.0 label May 7, 2024
@hbeberman hbeberman self-assigned this May 7, 2024
@hbeberman
Copy link
Member

Thanks for the report @paulmey! I'm looking into the appropriate fix here and will prioritize making sure that /etc/docker/daemon.json is no longer owned by the moby-engine package, be that some %post trickery or enlightening moby-engine to assume a default path to docker-proxy.

@cpuguy83
Copy link

cpuguy83 commented May 7, 2024

Opened this upstream: moby/moby#47804

@cpuguy83
Copy link

Upstream PR is merged.

@hbeberman
Copy link
Member

ACK. Backporting the change into Azure Linux 2.0 now so we can drop the /etc/docker/daemon.json file.

@hbeberman
Copy link
Member

The moby-engine-24.0.9-6.cm2.x86_64 package has just been published and no longer provides the /etc/docker/daemon.json file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.0 AzureLinux 2.0 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants