Open maddyblue opened 9 years ago
Progress: disabling lots of the IP options allows docker to start. It can also download images. However it cannot actually put the images on disk:
# docker daemon --ip-forward=false --ip-masq=false --iptables=false -D
# docker pull quay.io/coreos/etcd
Using default tag: latest
DEBU[0009] Calling POST /images/create
INFO[0009] POST /v1.20/images/create?fromImage=quay.io%2Fcoreos%2Fetcd%3Alatest
DEBU[0009] hostDir: /etc/docker/certs.d/quay.io
DEBU[0009] Trying to pull quay.io/coreos/etcd from https://quay.io v2
DEBU[0009] Error getting v2 registry: endpoint does not support v2 API
DEBU[0009] Trying to pull quay.io/coreos/etcd from https://quay.io v1
DEBU[0009] hostDir: /etc/docker/certs.d/quay.io
DEBU[0009] attempting v2 ping for registry endpoint https://quay.io/v2/
DEBU[0015] attempting v1 ping for registry endpoint https://quay.io/v1/
DEBU[0015] Error unmarshalling the _ping PingResult: json: cannot unmarshal bool into Go value of type registry.PingResult
DEBU[0015] Registry version header: '0.6.0'
DEBU[0015] PingResult.Version: "0.6.0"
DEBU[0015] Registry standalone header: '0'
DEBU[0015] PingResult.Standalone: false
Pulling repository quay.io/coreos/etcd
DEBU[0015] [registry] Calling GET https://quay.io/v1/repositories/coreos/etcd/images
DEBU[0018] Retrieving the tag list
DEBU[0018] Got status code 200 from https://quay.io/v1/repositories/coreos/etcd/tags/latest
DEBU[0018] Registering tags
3032497b93b9: Pulling image (latest) from quay.io/coreos/etcd, endpoint: https://quay.io/v1/
DEBU[0018] Ancestry: [3032497b93b98d20a1cd48824e65f11a0a88fe687765b974d23e5b5e7156448e 905454660f4dbbffa71003e1915ca8990d65a5e968555b4af2e64699bd178513 8c36a566c7522acfa0765d85728a8620611d7d978ea14b233003000503e3032497b93b9: Pulling dependent layers
3032497b93b9: Error pulling image (latest) from quay.io/coreos/etcd, operation not supported
8c36a566c752: Pulling fs layer
8c36a566c752: Error downloading dependent layers
DEBU[0019] Not continuing with error: Error pulling image (latest) from quay.io/coreos/etcd, operation not supported
Error pulling image (latest) from quay.io/coreos/etcd, operation not supported
This same error also occurs when using -s overlay
to start the daemon.
It looks like created image of pod with docker does not have character device (10, 237) as /dev/loop-control
. Loop device support is enabled in kernel used by lkvm.
Could You check if manual adding mknod /dev/loop-control c 10 237
before running docker daemon helps a bit?
Also kernel running inside of vm is not ready to run docker in default configuration, it does not support aufs
.
It's not currently safe to bring /dev/loop-control inside a container. Kernel patches were discussed to get loop devices safely: https://lwn.net/Articles/600463/
Of course, the lkvm flavor should not have this restriction :)
Adding loop-control changed the error:
root@172:/# docker daemon
WARN[0000] Udev sync is not supported. This will lead to unexpected behavior, data loss and errors. For more information, see https://docs.docker.com/reference/commandline/cli/#daemon-storage-driver-option
INFO[0000] Listening for HTTP on unix (/var/run/docker.sock)
ERRO[0000] There are no more loopback devices available.
ERRO[0000] [graphdriver] prior storage driver "devicemapper" failed: loopback mounting failed
FATA[0000] Error starting daemon: error initializing graphdriver: loopback mounting failed
root@172:/# ls -l /dev/loop-control
crw-r--r-- 1 root root 10, 237 Oct 6 19:05 /dev/loop-control
I ran docker/contrib/check-config.sh on rkt's cutdown-config and the output was really similar to the kernel running on my laptop.
$ bash check-config.sh /data/go/src/github.com/coreos/rkt/stage1/usr_from_kvm/kernel/cutdown-config
info: reading kernel config from /data/go/src/github.com/coreos/rkt/stage1/usr_from_kvm/kernel/cutdown-config ...
Generally Necessary:
- cgroup hierarchy: properly mounted [/sys/fs/cgroup]
- CONFIG_NAMESPACES: enabled
- CONFIG_NET_NS: enabled
- CONFIG_PID_NS: enabled
- CONFIG_IPC_NS: enabled
- CONFIG_UTS_NS: enabled
- CONFIG_DEVPTS_MULTIPLE_INSTANCES: enabled
- CONFIG_CGROUPS: enabled
- CONFIG_CGROUP_CPUACCT: enabled
- CONFIG_CGROUP_DEVICE: enabled
- CONFIG_CGROUP_FREEZER: enabled
- CONFIG_CGROUP_SCHED: enabled
- CONFIG_CPUSETS: missing
- CONFIG_MEMCG: enabled
- CONFIG_MACVLAN: enabled (as module)
- CONFIG_VETH: enabled (as module)
- CONFIG_BRIDGE: enabled
- CONFIG_BRIDGE_NETFILTER: enabled (as module)
- CONFIG_NF_NAT_IPV4: enabled
- CONFIG_IP_NF_FILTER: enabled
- CONFIG_IP_NF_TARGET_MASQUERADE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_ADDRTYPE: enabled (as module)
- CONFIG_NETFILTER_XT_MATCH_CONNTRACK: enabled
- CONFIG_NF_NAT: enabled
- CONFIG_NF_NAT_NEEDED: enabled
- CONFIG_POSIX_MQUEUE: enabled
Optional Features:
- CONFIG_MEMCG_KMEM: missing
- CONFIG_MEMCG_SWAP: enabled
- CONFIG_MEMCG_SWAP_ENABLED: enabled
- CONFIG_BLK_CGROUP: missing
- CONFIG_IOSCHED_CFQ: enabled
- CONFIG_BLK_DEV_THROTTLING: missing
- CONFIG_CGROUP_PERF: enabled
- CONFIG_CGROUP_HUGETLB: missing
- CONFIG_NET_CLS_CGROUP: enabled
- CONFIG_CGROUP_NET_PRIO: missing
- CONFIG_CFS_BANDWIDTH: enabled
- CONFIG_FAIR_GROUP_SCHED: enabled
- CONFIG_RT_GROUP_SCHED: missing
- CONFIG_EXT3_FS: missing
- CONFIG_EXT3_FS_XATTR: missing
- CONFIG_EXT3_FS_POSIX_ACL: missing
- CONFIG_EXT3_FS_SECURITY: missing
(enable these ext3 configs if you are using ext3 as backing filesystem)
- CONFIG_EXT4_FS: enabled
- CONFIG_EXT4_FS_POSIX_ACL: enabled
- CONFIG_EXT4_FS_SECURITY: enabled
- Storage Drivers:
- "aufs":
- CONFIG_AUFS_FS: missing
- "btrfs":
- CONFIG_BTRFS_FS: missing
- "devicemapper":
- CONFIG_BLK_DEV_DM: enabled
- CONFIG_DM_THIN_PROVISIONING: enabled
- "overlay":
- CONFIG_OVERLAY_FS: enabled
- "zfs":
- /dev/zfs: missing
- zfs command: missing
- zpool command: missing
The notable disabled was CONFIG_CPUSETS
. I compiled the rkt lkvm stage1 with that option enabled, and there was no change. (I did that by editing cluster-config and setting that option to y
, then clearing the build and running make again.)
Overall still not sure what's going on here. Similar bugs for docker have been fixed by enabling kernel config options that are already enabled here.
Clearly docker tries to use DM as storage backend (and there is mentioned problem with loop) - maybe better would be use overlayfs
?
Same errors with -s overlay
.
@mjibson any more progress in your investigations here?
No. I have no plans to investigate further. On Oct 20, 2015 1:08 PM, "Jonathan Boulle" notifications@github.com wrote:
@mjibson https://github.com/mjibson any more progress in your investigations here?
— Reply to this email directly or view it on GitHub https://github.com/coreos/rkt/issues/1539#issuecomment-149635270.
I'm attempting to get docker running in rkt with the lkvm stage1. Here's what I've done so far, from a debian stretch install with rkt 0.8.1.
make a docker image with docker installed
convert it to a rkt aci
run it
attempt to start docker
This ends with an error about the devicemapper driver. I've search for that error and found it a few other places, but they haven't been helpful to me.
Attempting to systemctl start it also doesn't work: