* [PR PATCH] WIP: update moby run to work with containers
@ 2022-12-24 19:04 sbromberger
2022-12-24 21:42 ` [PR PATCH] [Updated] " sbromberger
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: sbromberger @ 2022-12-24 19:04 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1301 bytes --]
There is a new pull request by sbromberger against master on the void-packages repository
https://github.com/sbromberger/void-packages patch-2
https://github.com/void-linux/void-packages/pull/41273
WIP: update moby run to work with containers
Two things need to change when we're running docker in a virtual environment (LXC/D): first, we shouldn't test for the loop module, which might not exist/be loadable within the container. Second, we need a different cgroup mount command.
This PR is blocked on https://github.com/void-linux/void-runit/pull/101 since the virtualization detection is currently incorrect for recent versions of LXD. Once https://github.com/void-linux/void-runit/pull/101 is merged, I'll remove the WIP designator.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES** - but note - they've only been testing when the environment is virtual (I don't have docker running on bare metal void).
#### Local build testing
- I built this PR locally for my native architecture, `Linux lithium 6.0.13_1 #1 SMP PREEMPT_DYNAMIC Fri Dec 16 02:05:26 UTC 2022 x86_64 GNU/Linux` (glibc)
A patch file from https://github.com/void-linux/void-packages/pull/41273.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-patch-2-41273.patch --]
[-- Type: text/x-diff, Size: 1705 bytes --]
From 909fc632b3cb62aebe6d440e73a9471e1a041eaa Mon Sep 17 00:00:00 2001
From: Seth Bromberger <sbromberger@users.noreply.github.com>
Date: Sat, 24 Dec 2022 14:01:18 -0500
Subject: [PATCH] WIP: update moby run to work with containers
two things need to change when we're running docker in a virtual environment (LXC/D): first, we shouldn't test for the loop module, which might not exist/be loadable within the container. Second, we need a different cgroup mount command.
This PR is blocked on https://github.com/void-linux/void-runit/pull/101 since the virtualization detection is currently incorrect for recent versions of LXD. Once https://github.com/void-linux/void-runit/pull/101 is merged, I'll remove the WIP designator.
---
srcpkgs/moby/files/docker/run | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/moby/files/docker/run b/srcpkgs/moby/files/docker/run
index ed42f5fa72f8..724e5bc13228 100644
--- a/srcpkgs/moby/files/docker/run
+++ b/srcpkgs/moby/files/docker/run
@@ -1,8 +1,13 @@
#!/bin/sh
[ -r conf ] && . ./conf
-modprobe -q loop || exit 1
-mountpoint -q /sys/fs/cgroup/systemd || {
- mkdir -p /sys/fs/cgroup/systemd;
- mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd;
-}
+[ -r /etc/runit/functions ] && . /etc/runit/functions && detect_virt
+if [ -z $VIRTUALIZATION ]; then # we're not in a container
+ modprobe -q loop || exit 1
+ mountpoint -q /sys/fs/cgroup/systemd || {
+ mkdir -p /sys/fs/cgroup/systemd;
+ mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd;
+ }
+else
+ mount -t cgroup2 cgroup2 /sys/fs/cgroup/
+fi
exec chpst -o 1048576 -p 1048576 dockerd $OPTS 2>&1
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Updated] WIP: update moby run to work with containers
2022-12-24 19:04 [PR PATCH] WIP: update moby run to work with containers sbromberger
@ 2022-12-24 21:42 ` sbromberger
2023-03-25 1:52 ` github-actions
2023-04-09 1:52 ` [PR PATCH] [Closed]: " github-actions
2 siblings, 0 replies; 4+ messages in thread
From: sbromberger @ 2022-12-24 21:42 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1297 bytes --]
There is an updated pull request by sbromberger against master on the void-packages repository
https://github.com/sbromberger/void-packages patch-2
https://github.com/void-linux/void-packages/pull/41273
WIP: update moby run to work with containers
Two things need to change when we're running docker in a virtual environment (LXC/D): first, we shouldn't test for the loop module, which might not exist/be loadable within the container. Second, we need a different cgroup mount command.
This PR is blocked on https://github.com/void-linux/void-runit/pull/101 since the virtualization detection is currently incorrect for recent versions of LXD. Once https://github.com/void-linux/void-runit/pull/101 is merged, I'll remove the WIP designator.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES** - but note - they've only been tested in virtual environments (I don't have docker running on bare metal void).
#### Local build testing
- I built this PR locally for my native architecture, `Linux lithium 6.0.13_1 #1 SMP PREEMPT_DYNAMIC Fri Dec 16 02:05:26 UTC 2022 x86_64 GNU/Linux` (glibc)
A patch file from https://github.com/void-linux/void-packages/pull/41273.patch is attached
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-patch-2-41273.patch --]
[-- Type: text/x-diff, Size: 2629 bytes --]
From 909fc632b3cb62aebe6d440e73a9471e1a041eaa Mon Sep 17 00:00:00 2001
From: Seth Bromberger <sbromberger@users.noreply.github.com>
Date: Sat, 24 Dec 2022 14:01:18 -0500
Subject: [PATCH 1/2] WIP: update moby run to work with containers
two things need to change when we're running docker in a virtual environment (LXC/D): first, we shouldn't test for the loop module, which might not exist/be loadable within the container. Second, we need a different cgroup mount command.
This PR is blocked on https://github.com/void-linux/void-runit/pull/101 since the virtualization detection is currently incorrect for recent versions of LXD. Once https://github.com/void-linux/void-runit/pull/101 is merged, I'll remove the WIP designator.
---
srcpkgs/moby/files/docker/run | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/srcpkgs/moby/files/docker/run b/srcpkgs/moby/files/docker/run
index ed42f5fa72f8..724e5bc13228 100644
--- a/srcpkgs/moby/files/docker/run
+++ b/srcpkgs/moby/files/docker/run
@@ -1,8 +1,13 @@
#!/bin/sh
[ -r conf ] && . ./conf
-modprobe -q loop || exit 1
-mountpoint -q /sys/fs/cgroup/systemd || {
- mkdir -p /sys/fs/cgroup/systemd;
- mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd;
-}
+[ -r /etc/runit/functions ] && . /etc/runit/functions && detect_virt
+if [ -z $VIRTUALIZATION ]; then # we're not in a container
+ modprobe -q loop || exit 1
+ mountpoint -q /sys/fs/cgroup/systemd || {
+ mkdir -p /sys/fs/cgroup/systemd;
+ mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd;
+ }
+else
+ mount -t cgroup2 cgroup2 /sys/fs/cgroup/
+fi
exec chpst -o 1048576 -p 1048576 dockerd $OPTS 2>&1
From 07aea324442ae7b492508885d87bb7e8dba96853 Mon Sep 17 00:00:00 2001
From: Seth Bromberger <sbromberger@users.noreply.github.com>
Date: Sat, 24 Dec 2022 16:42:52 -0500
Subject: [PATCH 2/2] Update run
Changed based on https://github.com/void-linux/void-runit/pull/102
---
srcpkgs/moby/files/docker/run | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/srcpkgs/moby/files/docker/run b/srcpkgs/moby/files/docker/run
index 724e5bc13228..a1ebdf9e23dc 100644
--- a/srcpkgs/moby/files/docker/run
+++ b/srcpkgs/moby/files/docker/run
@@ -1,7 +1,6 @@
#!/bin/sh
[ -r conf ] && . ./conf
-[ -r /etc/runit/functions ] && . /etc/runit/functions && detect_virt
-if [ -z $VIRTUALIZATION ]; then # we're not in a container
+if [[ $VIRTUALIZATION -ne 1 ]]; then # we're not in a container
modprobe -q loop || exit 1
mountpoint -q /sys/fs/cgroup/systemd || {
mkdir -p /sys/fs/cgroup/systemd;
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: WIP: update moby run to work with containers
2022-12-24 19:04 [PR PATCH] WIP: update moby run to work with containers sbromberger
2022-12-24 21:42 ` [PR PATCH] [Updated] " sbromberger
@ 2023-03-25 1:52 ` github-actions
2023-04-09 1:52 ` [PR PATCH] [Closed]: " github-actions
2 siblings, 0 replies; 4+ messages in thread
From: github-actions @ 2023-03-25 1:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 305 bytes --]
New comment by github-actions[bot] on void-packages repository
https://github.com/void-linux/void-packages/pull/41273#issuecomment-1483675530
Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that. If this pull request is still relevant bump it or assign it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PR PATCH] [Closed]: WIP: update moby run to work with containers
2022-12-24 19:04 [PR PATCH] WIP: update moby run to work with containers sbromberger
2022-12-24 21:42 ` [PR PATCH] [Updated] " sbromberger
2023-03-25 1:52 ` github-actions
@ 2023-04-09 1:52 ` github-actions
2 siblings, 0 replies; 4+ messages in thread
From: github-actions @ 2023-04-09 1:52 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 1125 bytes --]
There's a closed pull request on the void-packages repository
WIP: update moby run to work with containers
https://github.com/void-linux/void-packages/pull/41273
Description:
Two things need to change when we're running docker in a virtual environment (LXC/D): first, we shouldn't test for the loop module, which might not exist/be loadable within the container. Second, we need a different cgroup mount command.
This PR is blocked on https://github.com/void-linux/void-runit/pull/102 since the virtualization detection is currently unavailable to runsv scripts. Once https://github.com/void-linux/void-runit/pull/102 is merged, I'll remove the WIP designator.
<!-- Uncomment relevant sections and delete options which are not applicable -->
#### Testing the changes
- I tested the changes in this PR: **YES** - but note - they've only been tested in virtual environments (I don't have docker running on bare metal void).
#### Local build testing
- I built this PR locally for my native architecture, `Linux lithium 6.0.13_1 #1 SMP PREEMPT_DYNAMIC Fri Dec 16 02:05:26 UTC 2022 x86_64 GNU/Linux` (glibc)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-04-09 1:52 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-24 19:04 [PR PATCH] WIP: update moby run to work with containers sbromberger
2022-12-24 21:42 ` [PR PATCH] [Updated] " sbromberger
2023-03-25 1:52 ` github-actions
2023-04-09 1:52 ` [PR PATCH] [Closed]: " github-actions
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).