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

Can't disable docker.socket with Ignition #229

Closed
bgilbert opened this issue Jul 26, 2019 · 3 comments
Closed

Can't disable docker.socket with Ignition #229

bgilbert opened this issue Jul 26, 2019 · 3 comments

Comments

@bgilbert
Copy link
Contributor

With this Ignition config:

{
  "ignition": {
    "version": "3.0.0"
  },
  "systemd": {
    "units": [
      {
        "enabled": false,
        "name": "docker.socket"
      }
    ]
  }
}

I get:

[core@localhost ~]$ rpm-ostree status
State: idle
AutomaticUpdates: disabled
Deployments:
● ostree://fedora:fedora/x86_64/coreos/testing
                   Version: 30.20190725.0 (2019-07-25T18:54:22Z)
                    Commit: 8b79877efa7ac06becd8637d95f8ca83aa385f89f383288bf3c2c31ca53216c7
              GPGSignature: (unsigned)
[core@localhost ~]$ systemctl status docker.socket
● docker.socket - Docker Socket for the API
   Loaded: loaded (/usr/lib/systemd/system/docker.socket; enabled; vendor prese>
   Active: active (listening) since Fri 2019-07-26 03:51:45 UTC; 25s ago
   Listen: /var/run/docker.sock (Stream)
    Tasks: 0 (limit: 2312)
   Memory: 0B
   CGroup: /system.slice/docker.socket

Jul 26 03:51:45 localhost systemd[1]: Starting Docker Socket for the API.
Jul 26 03:51:45 localhost systemd[1]: Listening on Docker Socket for the API.
[core@localhost ~]$ sudo systemctl preset-all
Removed /etc/systemd/system/sockets.target.wants/docker.socket.
[core@localhost ~]$

It's not immediately obvious why the preset isn't being respected. Using Ignition to enable a service does work.

@EnigmaCurry
Copy link

Not ideal, but this gets rid of docker.service and docker.socket (by overwriting the service file) :

systemd:
  units:
    - name: docker.service
      enabled: false
      contents: |
        [Unit]
        Description=disable docker

        [Service]

        [Install]
        WantedBy=multi-user.target
[core@localhost system-connections]$ systemctl status docker.socket
● docker.socket - Docker Socket for the API
   Loaded: loaded (/usr/lib/systemd/system/docker.socket; enabled; vendor preset: enabled)
   Active: inactive (dead)
   Listen: /var/run/docker.sock (Stream)

Jul 26 03:26:17 localhost systemd[1]: docker.socket: Socket service docker.service not loaded, refusing.
Jul 26 03:26:17 localhost systemd[1]: Failed to listen on Docker Socket for the API.
[core@localhost system-connections]$ systemctl status docker.service
● docker.service - disable docker
   Loaded: bad-setting (Reason: Unit docker.service has a bad unit file setting.)
   Active: inactive (dead)

@dustymabe
Copy link
Member

seems like this might be the same thing as #392 except this is a socket and that is a service.

@EnigmaCurry I think an easier way may be to just mask docker.service:

variant: fcos
version: 1.0.0
systemd:
  units:
    - name: docker.service
      mask: true

@bgilbert
Copy link
Contributor Author

bgilbert commented Jun 7, 2022

The fix for this went into testing stream release 36.20220522.2.1 and stable stream release 36.20220522.3.0.

@bgilbert bgilbert closed this as completed Jun 7, 2022
spaced pushed a commit to spaced/kubespray that referenced this issue Jun 10, 2024
- docker is preinstalled with fedora coreos, needs to be disabled
  coreos/fedora-coreos-tracker#229
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants