Heisath / wdmc2-kernel

Tools to create a mainline linux kernel and debian rootfs for WD MyCloud Gen2
GNU General Public License v2.0
33 stars 11 forks source link

Can't install docker? #19

Open mruru opened 1 year ago

mruru commented 1 year ago

when i try to run error msg like this: Mycloud:/var/lib/dpkg# dockerd INFO[2023-05-08T06:48:44.599345520+02:00] Starting up
ERRO[2023-05-08T06:48:44.647317040+02:00] failed to mount overlay: no such device storage-driver=overlay2 ERRO[2023-05-08T06:48:44.647880760+02:00] exec: "fuse-overlayfs": executable file not found in $PATH storage-driver=fuse-overlayfs INFO[2023-05-08T06:48:44.664998520+02:00] Loading containers: start.
INFO[2023-05-08T06:48:44.695349640+02:00] unable to detect if iptables supports xlock: 'iptables --wait -L -n': iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument error="exit status 4" INFO[2023-05-08T06:48:45.072778360+02:00] stopping event stream following graceful shutdown error="" module=libcontainerd namespace=moby failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.7 (nf_tables): Could not fetch rule set generation id: Invalid argument (exit status 4)

Heisath commented 1 year ago

Not sure what the problem is there. iptables 1.8.7 is a current version. Maybe some kernel module is missing? If you figure it out, I'd gladly accept a PR.

mruru commented 1 year ago

The tools shell with check-config.sh is available here https://github.com/moby/moby/tree/master/contrib docker requires these kernel modules

CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y CONFIG_MEMCG_SWAP_ENABLED=y CONFIG_CGROUP_PIDS=y CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_PERF=y CONFIG_CGROUP_NET_PRIO=y CONFIG_CGROUP_NET_CLASSID=y CONFIG_NET_CLS_CGROUP=y CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_BLK_CGROUP=y CONFIG_CFS_BANDWIDTH=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_BLK_DEV_THROTTLING=y CONFIG_CFQ_GROUP_IOSCHED=y CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y CONFIG_NETFILTER_XT_MATCH_IPVS=y CONFIG_IP_VS=y CONFIG_MACVLAN=y CONFIG_VETH=y CONFIG_OVERLAY_FS=y CONFIG_IPVLAN=y

codekow commented 1 year ago

PR #20 Introduces kernel features that enabled using docker / podman along with a few other changes.

codekow commented 1 year ago

@mruru Will you verify that this is possible with PR #20

coos77 commented 9 months ago

@codekow @Heisath i can confirm, that Docker can be installed but it does not start. i use Debian Bullseye with kernel 6.3 (instead of Ubuntu)

Problem is with missing IP Table Modules again docker.service: Start request repeated too quickly.

INFO[2024-01-26T01:11:28.597815030+03:00] Starting up DEBU[2024-01-26T01:11:28.606049443+03:00] Listener created for HTTP on unix (/var/run/docker.sock) DEBU[2024-01-26T01:11:28.681648534+03:00] Golang's threads limit set to 7110 DEBU[2024-01-26T01:11:28.683040955+03:00] metrics API listening on /var/run/docker/metrics.sock DEBU[2024-01-26T01:11:28.707679393+03:00] Using default logging driver json-file DEBU[2024-01-26T01:11:28.708786059+03:00] processing event stream module=libcontainerd namespace=plugins.moby DEBU[2024-01-26T01:11:28.711010830+03:00] No quota support for local volumes in /var/lib/docker/volumes: Filesystem does not support, or has not enabled quotas DEBU[2024-01-26T01:11:28.722650037+03:00] [graphdriver] priority list: [overlay2 fuse-overlayfs btrfs zfs vfs] DEBU[2024-01-26T01:11:28.810867923+03:00] successfully detected metacopy status storage-driver=overlay2 usingMetacopy=false DEBU[2024-01-26T01:11:28.872956151+03:00] backingFs=extfs, projectQuotaSupported=false, usingMetacopy=false, indexOff="index=off,", userxattr="" storage-driver=overlay2 INFO[2024-01-26T01:11:28.873134069+03:00] [graphdriver] using prior storage driver: overlay2 DEBU[2024-01-26T01:11:28.873923659+03:00] Initialized graph driver overlay2 DEBU[2024-01-26T01:11:28.875205242+03:00] Max Concurrent Downloads: 3 DEBU[2024-01-26T01:11:28.875620997+03:00] Max Concurrent Uploads: 5 DEBU[2024-01-26T01:11:28.875952792+03:00] Max Download Attempts: 5 INFO[2024-01-26T01:11:28.876392706+03:00] Loading containers: start. DEBU[2024-01-26T01:11:28.877238815+03:00] Option DefaultDriver: bridge DEBU[2024-01-26T01:11:28.877456733+03:00] Option DefaultNetwork: bridge DEBU[2024-01-26T01:11:28.878770835+03:00] Network Control Plane MTU: 1500 DEBU[2024-01-26T01:11:28.877524412+03:00] processing event stream module=libcontainerd namespace=moby DEBU[2024-01-26T01:11:28.901307381+03:00] /usr/sbin/iptables, [--wait -t filter -C FORWARD -j DOCKER-ISOLATION] DEBU[2024-01-26T01:11:28.909891308+03:00] /usr/sbin/iptables, [--wait -t nat -D PREROUTING -m addrtype --dst-type LOCAL -j DOCKER] DEBU[2024-01-26T01:11:28.918791632+03:00] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL ! --dst 127.0.0.0/8 -j DOCKER] DEBU[2024-01-26T01:11:28.927470558+03:00] /usr/sbin/iptables, [--wait -t nat -D OUTPUT -m addrtype --dst-type LOCAL -j DOCKER] DEBU[2024-01-26T01:11:28.936201124+03:00] /usr/sbin/iptables, [--wait -t nat -D PREROUTING] DEBU[2024-01-26T01:11:28.943999262+03:00] /usr/sbin/iptables, [--wait -t nat -D OUTPUT] DEBU[2024-01-26T01:11:28.951443165+03:00] /usr/sbin/iptables, [--wait -t nat -F DOCKER] DEBU[2024-01-26T01:11:28.959071225+03:00] /usr/sbin/iptables, [--wait -t nat -X DOCKER] DEBU[2024-01-26T01:11:28.966841483+03:00] /usr/sbin/iptables, [--wait -t filter -F DOCKER] DEBU[2024-01-26T01:11:28.974821819+03:00] /usr/sbin/iptables, [--wait -t filter -X DOCKER] DEBU[2024-01-26T01:11:29.004345833+03:00] /usr/sbin/iptables, [--wait -t filter -F DOCKER-ISOLATION-STAGE-1] DEBU[2024-01-26T01:11:29.054297740+03:00] /usr/sbin/iptables, [--wait -t filter -X DOCKER-ISOLATION-STAGE-1] DEBU[2024-01-26T01:11:29.104243047+03:00] /usr/sbin/iptables, [--wait -t filter -F DOCKER-ISOLATION-STAGE-2] DEBU[2024-01-26T01:11:29.144274004+03:00] /usr/sbin/iptables, [--wait -t filter -X DOCKER-ISOLATION-STAGE-2] DEBU[2024-01-26T01:11:29.184302721+03:00] /usr/sbin/iptables, [--wait -t filter -F DOCKER-ISOLATION] DEBU[2024-01-26T01:11:29.191765624+03:00] /usr/sbin/iptables, [--wait -t filter -X DOCKER-ISOLATION] DEBU[2024-01-26T01:11:29.199439604+03:00] /usr/sbin/iptables, [--wait -t nat -n -L DOCKER] DEBU[2024-01-26T01:11:29.207181742+03:00] /usr/sbin/iptables, [--wait -t nat -N DOCKER] DEBU[2024-01-26T01:11:29.214983640+03:00] /usr/sbin/iptables, [--wait -t filter -n -L DOCKER] DEBU[2024-01-26T01:11:29.222890737+03:00] /usr/sbin/iptables, [--wait -t filter -N DOCKER] DEBU[2024-01-26T01:11:29.230560077+03:00] /usr/sbin/iptables, [--wait -t filter -n -L DOCKER-ISOLATION-STAGE-1] DEBU[2024-01-26T01:11:29.238719250+03:00] /usr/sbin/iptables, [--wait -t filter -N DOCKER-ISOLATION-STAGE-1] DEBU[2024-01-26T01:11:29.246578668+03:00] /usr/sbin/iptables, [--wait -t filter -n -L DOCKER-ISOLATION-STAGE-2] DEBU[2024-01-26T01:11:29.254443925+03:00] /usr/sbin/iptables, [--wait -t filter -N DOCKER-ISOLATION-STAGE-2] DEBU[2024-01-26T01:11:29.262527139+03:00] /usr/sbin/iptables, [--wait -t filter -C DOCKER-ISOLATION-STAGE-1 -j RETURN] DEBU[2024-01-26T01:11:29.271032988+03:00] /usr/sbin/iptables, [--wait -A DOCKER-ISOLATION-STAGE-1 -j RETURN] DEBU[2024-01-26T01:11:29.279589116+03:00] /usr/sbin/iptables, [--wait -t filter -C DOCKER-ISOLATION-STAGE-2 -j RETURN] DEBU[2024-01-26T01:11:29.287693970+03:00] /usr/sbin/iptables, [--wait -A DOCKER-ISOLATION-STAGE-2 -j RETURN] WARN[2024-01-26T01:11:29.378106789+03:00] Could not load necessary modules for IPSEC rules: protocol not supported INFO[2024-01-26T01:11:29.405178875+03:00] Default bridge (docker0) is assigned with an IP address 172.17.0.0/16. Daemon option --bip can be used to set a preferred IP address DEBU[2024-01-26T01:11:29.406125863+03:00] Allocating IPv4 pools for network bridge (94d1c2ac8b7185e73883a399d404e0c92cfcbe07e4814f3f96f51f2ff05360a5) DEBU[2024-01-26T01:11:29.406337260+03:00] RequestPool(LocalDefault, 172.17.0.0/16, , _, false) DEBU[2024-01-26T01:11:29.406618697+03:00] RequestAddress(LocalDefault/172.17.0.0/16, 172.17.0.1, map[RequestAddressType:com.docker.network.gateway]) DEBU[2024-01-26T01:11:29.406910533+03:00] Request address PoolID:172.17.0.0/16 Bits: 65536, Unselected: 65534, Sequence: (0x80000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:0 Serial:false PrefAddress:172.17.0.1 DEBU[2024-01-26T01:11:29.409580818+03:00] /usr/sbin/iptables, [--wait -t nat -C POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE] DEBU[2024-01-26T01:11:29.429554957+03:00] /usr/sbin/iptables, [--wait -t nat -I POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE] DEBU[2024-01-26T01:11:29.448990063+03:00] releasing IPv4 pools from network bridge (94d1c2ac8b7185e73883a399d404e0c92cfcbe07e4814f3f96f51f2ff05360a5) DEBU[2024-01-26T01:11:29.449517776+03:00] ReleaseAddress(LocalDefault/172.17.0.0/16, 172.17.0.1) DEBU[2024-01-26T01:11:29.449954010+03:00] Released address Address:172.17.0.1 Sequence:Bits: 65536, Unselected: 65534, Sequence: (0x80000000, 1)->(0x0, 2046)->(0x1, 1)->end Curr:0 DEBU[2024-01-26T01:11:29.450334725+03:00] ReleasePool(LocalDefault/172.17.0.0/16) DEBU[2024-01-26T01:11:29.450836079+03:00] daemon configured with a 15 seconds minimum shutdown timeout DEBU[2024-01-26T01:11:29.451212794+03:00] start clean shutdown of all containers with a 15 seconds timeout... DEBU[2024-01-26T01:11:29.453761081+03:00] Unix socket /var/run/docker/libnetwork/f5bcf8b2c58f.sock was closed. The external key listener will stop. INFO[2024-01-26T01:11:29.456587444+03:00] stopping event stream following graceful shutdown error="" module=libcontainerd namespace=moby DEBU[2024-01-26T01:11:29.456655363+03:00] Cleaning up old mountid : start. DEBU[2024-01-26T01:11:29.458949493+03:00] Cleaning up old mountid : done. failed to start daemon: Error initializing network controller: error creating default "bridge" network: Failed to Setup IP tables: Unable to enable NAT rule: (iptables failed: iptables --wait -t nat -I POSTROUTING -s 172.17.0.0/16 ! -o docker0 -j MASQUERADE: iptables v1.8.7 (nf_tables): Chain 'MASQUERADE' does not exist Try `iptables -h' or 'iptables --help' for more information. (exit status 2))

mruru commented 9 months ago

docker.service: Start request repeated too quickly.

Podman and Docker both have the same issue

codekow commented 9 months ago

What kernel module is missing?

On Sun, Jan 28, 2024, 2:31 AM Mruru @.***> wrote:

docker.service: Start request repeated too quickly.

Podman and Docker both have the same issue

— Reply to this email directly, view it on GitHub https://github.com/Heisath/wdmc2-kernel/issues/19#issuecomment-1913515069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDIWEFBRVF6KN2JRXQDA3TYQYEFBAVCNFSM6AAAAAAXZN24YOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGUYTKMBWHE . You are receiving this because you were mentioned.Message ID: @.***>

codekow commented 9 months ago

Verify which kernel config you are using.

config/linux-default.config should be copied over the other version config and updated. A PR could be created for 6.x.

I only updated the default and ver 5.15 kernel config. I did not update any others.

On Sun, Feb 4, 2024, 10:54 AM Cory Latschkowski @.***> wrote:

What kernel module is missing?

On Sun, Jan 28, 2024, 2:31 AM Mruru @.***> wrote:

docker.service: Start request repeated too quickly.

Podman and Docker both have the same issue

— Reply to this email directly, view it on GitHub https://github.com/Heisath/wdmc2-kernel/issues/19#issuecomment-1913515069, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMDIWEFBRVF6KN2JRXQDA3TYQYEFBAVCNFSM6AAAAAAXZN24YOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGUYTKMBWHE . You are receiving this because you were mentioned.Message ID: @.***>

Matff4 commented 8 months ago

Same problem here, What I tried is copy default config to linux-6.1.y.config, added all these necessary settings to it, compiled, uploaded to wdmc.

The tools shell with check-config.sh is available here

https://github.com/moby/moby/tree/master/contrib docker requires these kernel modules CONFIG_MEMCG=y CONFIG_MEMCG_SWAP=y CONFIG_MEMCG_SWAP_ENABLED=y CONFIG_CGROUP_PIDS=y CONFIG_CGROUP_DEVICE=y CONFIG_CGROUP_PERF=y CONFIG_CGROUP_NET_PRIO=y CONFIG_CGROUP_NET_CLASSID=y CONFIG_NET_CLS_CGROUP=y CONFIG_POSIX_MQUEUE=y CONFIG_POSIX_MQUEUE_SYSCTL=y CONFIG_BLK_CGROUP=y CONFIG_CFS_BANDWIDTH=y CONFIG_UTS_NS=y CONFIG_IPC_NS=y CONFIG_USER_NS=y CONFIG_PID_NS=y CONFIG_BLK_DEV_THROTTLING=y CONFIG_CFQ_GROUP_IOSCHED=y CONFIG_NETFILTER_XT_MATCH_ADDRTYPE=y CONFIG_NETFILTER_XT_MATCH_IPVS=y CONFIG_IP_VS=y CONFIG_MACVLAN=y CONFIG_VETH=y CONFIG_OVERLAY_FS=y CONFIG_IPVLAN=y

It boots, OMV workbench starts, but while trying to log in it shows error "Failed to connect to socket: No such file or directory", and podman/docker still doesnt launch properly.

Tested on debian 12 bookworm, kernel 6.1.78 LTS. Currently went back to previous kernel without these modifications. I'll try to setup new config in near future and let you know how it went

codekow commented 6 months ago

Issues above should be addressed in #24 - updated 6.1 kernel config

Tested on kernel 6.1.87 and debian 12 (bookworm)

Matff4 commented 4 months ago

The tools shell with check-config.sh is available here

https://github.com/moby/moby/tree/master/contrib docker requires these kernel modules

Using this script i modified linux-6.1.y.config and managed to build kernel and modules so that docker/podman works perfectly fine. image image image image

machsix commented 2 months ago

Here is a modified config for 6.1.104 in case someone need, I'd love to submit a PR if needed https://raw.githubusercontent.com/machsix/wdmc2-kernel/master/config/linux-6.1.104.config