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

agent: is_in_docker not supports cgroup v2 #303

Closed
uar316025 opened this issue Oct 3, 2023 · 2 comments
Closed

agent: is_in_docker not supports cgroup v2 #303

uar316025 opened this issue Oct 3, 2023 · 2 comments
Assignees
Labels
bug Something isn't working prio:high

Comments

@uar316025
Copy link

agent/kraken/agent/utils.py::is_in_docker relies on /proc/self/cgroup
on containers with cgroup v2 which leads to

OSError: [Errno 99] error while attempting to bind on address ('172.17.0.1', 0): cannot assign requested address 

similar problem with jenkins


Host details

Kraken 1.4.16
Rocky Linux 9

[[REDACTED]@[REDACTED] kraken]# uname -a
Linux [REDACTED] 5.14.0-284.30.1.el9_2.x86_64 #1 SMP PREEMPT_DYNAMIC Sat Sep 16 09:55:41 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Agent details

[[REDACTED@[REDACTED]kraken]# docker exec -it kraken-agent-1 /bin/bash
root@ff5d4ce61b24:/opt/kraken# cat /proc/self/cgroup
0::/
root@ff5d4ce61b24:/opt/kraken# cat /proc/1/cgroup
0::/
root@ff5d4ce61b24:/opt/kraken# cat /proc/self/mountinfo
1378 1329 0:144 / / rw,relatime master:483 - overlay overlay rw,lowerdir=/var/lib/docker/overlay2/l/4D243WGV72K7EVGFTTJG4QZWGW:/var/lib/docker/overlay2/l/VLDETVBQLOKVHVOCO5CJY4D5DY:/var/lib/docker/overlay2/l/7WQNLYUS5WYL6PNPDIYHFCEYCQ:/var/lib/docker/overlay2/l/3OJEALPBSIRZJDNJ7Y6QQBVGJY:/var/lib/docker/overlay2/l/TGHWA7UVUPQUMJKJAJWZFOX5PK:/var/lib/docker/overlay2/l/KWSRB3OGL6NNIQ7LHAT5IZ6QEZ:/var/lib/docker/overlay2/l/OLNBANADJYPRI4X72IPLIXGKAX,upperdir=/var/lib/docker/overlay2/8fce33363622edee9d5977e3120fd0d1938412727aefbe06444218f1f0f39335/diff,workdir=/var/lib/docker/overlay2/8fce33363622edee9d5977e3120fd0d1938412727aefbe06444218f1f0f39335/work
1379 1378 0:153 / /proc rw,nosuid,nodev,noexec,relatime - proc proc rw
1380 1378 0:154 / /dev rw,nosuid - tmpfs tmpfs rw,size=65536k,mode=755,inode64
1381 1380 0:155 / /dev/pts rw,nosuid,noexec,relatime - devpts devpts rw,gid=5,mode=620,ptmxmode=666
1382 1378 0:156 / /sys rw,nosuid,nodev,noexec,relatime - sysfs sysfs rw
1383 1382 0:26 / /sys/fs/cgroup rw,nosuid,nodev,noexec,relatime - cgroup2 cgroup rw
1384 1380 0:152 / /dev/mqueue rw,nosuid,nodev,noexec,relatime - mqueue mqueue rw
1385 1380 0:157 / /dev/shm rw,nosuid,nodev,noexec,relatime - tmpfs shm rw,size=65536k,inode64
1386 1378 253:0 /var/lib/docker/containers/ff5d4ce61b24a0c7b958d5cf2357767dc9dc305d54726dae5aa3562a72ec0ba8/resolv.conf /etc/resolv.conf rw,relatime - xfs /dev/mapper/rl-root rw,attr2,inode64,logbufs=8,logbsize=32k,noquota
1387 1378 253:0 /var/lib/docker/containers/ff5d4ce61b24a0c7b958d5cf2357767dc9dc305d54726dae5aa3562a72ec0ba8/hostname /etc/hostname rw,relatime - xfs /dev/mapper/rl-root rw,attr2,inode64,logbufs=8,logbsize=32k,noquota
1388 1378 253:0 /var/lib/docker/containers/ff5d4ce61b24a0c7b958d5cf2357767dc9dc305d54726dae5aa3562a72ec0ba8/hosts /etc/hosts rw,relatime - xfs /dev/mapper/rl-root rw,attr2,inode64,logbufs=8,logbsize=32k,noquota
1389 1378 0:25 /docker.sock /run/docker.sock rw,nosuid,nodev - tmpfs tmpfs rw,size=3174768k,nr_inodes=819200,mode=755,inode64
@godfryd
Copy link
Contributor

godfryd commented Oct 4, 2023

Thanks for reporting. I'm starting work on it.

@godfryd godfryd self-assigned this Oct 4, 2023
@godfryd godfryd added bug Something isn't working prio:high labels Oct 4, 2023
@godfryd godfryd closed this as completed in 041c8a3 Oct 5, 2023
@godfryd
Copy link
Contributor

godfryd commented Oct 22, 2023

It has been fixed in the latest release, 1.5.

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

No branches or pull requests

2 participants