Skip to content
This repository has been archived by the owner on Jan 4, 2022. It is now read-only.

Incorrect assumption that overlayfs is only docker storage driver #302

Open
donbowman opened this issue Aug 22, 2018 · 4 comments
Open

Incorrect assumption that overlayfs is only docker storage driver #302

donbowman opened this issue Aug 22, 2018 · 4 comments

Comments

@donbowman
Copy link
Contributor

donbowman commented Aug 22, 2018

#301 (comment)

in pkg/bootstrap/node.go we have function ensureOverlayfs(). However, users may be using e.g. devicemapper driver for docker.

I personally don't believe these system checks belong in this tool, its too easy to get them wrong.

In this case, we'd have to look in /etc/docker/daemon.json for:

{
  "storage-driver": "devicemapper"
}

But, on some systems, this would be setup in systemd (e.g. /lib/systemd/system/docker.service) or in an environment or add-on for it.

Another method would be to parse docker info (as below). But I'm still not sure why we are doing this, I think its simpler to document 'docker is installed and working', its not really our business whether they use btrfs / zfs / overlayfs / ...

$ docker info
Containers: 1
 Running: 1
 Paused: 0
 Stopped: 0
Images: 14
Server Version: 18.06.0-ce
Storage Driver: overlay2
 Backing Filesystem: extfs
 Supports d_type: true
 Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host macvlan null overlay
 Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d64c661f1d51c48782c9cec8fda7604785f93587
runc version: 69663f0bd4b60df09991c08812a60108003fa340
init version: fec3683
Security Options:
 apparmor
 seccomp
  Profile: default
Kernel Version: 4.18.0-041800-generic
Operating System: Ubuntu 18.04.1 LTS
OSType: linux
Architecture: x86_64
CPUs: 16
Total Memory: 31.4GiB
Name: cube
ID: MMIA:334X:MD65:7BKQ:WYL3:XGCV:RYQO:OTAS:PJPP:362I:VG63:L2AN
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: donbowman
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support
@dongsupark
Copy link
Member

Ok, it seems to be actually multiple issues.

First of all, basically I agree that we should check for more details before loading the overlay kernel module.
Maybe then it's an issue about not only docker storage driver, but also whether the container runtime is docker or rkt. Or there could be other factors.

And the next issue about whether we can just ignore all of these issues and simply write documents: I doubt that it's doable. Of course in that case, we system engineers are still capable of fulfilling the system requirements on our own. (I'm sure you are able to do that as well :-)) But in practice, most newcomers would not be able to run kube-spawn at all. That's one of the reasons why we added the various ensure* functions to meet the requirements.

@donbowman
Copy link
Contributor Author

donbowman commented Aug 23, 2018 via email

@dongsupark
Copy link
Member

I would call it a "necessary evil" instead of a "bad path". ;-)
Anyway your suggestion of running docker info looks good in the docker world.

@donbowman
Copy link
Contributor Author

donbowman commented Aug 23, 2018 via email

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants