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

utils: ignore ENOTSUP when chmod a symlink #1309

Merged
merged 1 commit into from Sep 25, 2023

Conversation

giuseppe
Copy link
Member

@giuseppe giuseppe commented Sep 22, 2023

commit 5d1f903f75a80daa4dfb3d84e114ec8ecbf29956 in the kernel, present in a release since Linux 6.6 doesn't allow anymore to change the mode of a symlink, so just ignore the failure.

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5d1f903f75a80daa4dfb3d84e114ec8ecbf29956

Closes: #1308

commit 5d1f903f75a80daa4dfb3d84e114ec8ecbf29956 in the kernel, present
in a release since Linux 6.6 doesn't allow anymore to change the
mode of a symlink, so just ignore the failure.

Closes: containers#1308

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
@giuseppe giuseppe marked this pull request as draft September 22, 2023 09:41
@giuseppe giuseppe marked this pull request as ready for review September 22, 2023 09:42
Copy link
Collaborator

@flouthoc flouthoc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM , just a small question above.

@Luap99
Copy link
Member

Luap99 commented Sep 22, 2023

Did you ask on the kernel list to revert or at least not backport this change?
I am asking because the linked commit asked for backports to stable releases which means this will start breaking on older LTS releases unless crun gets updated there which seems unlikely.

@giuseppe
Copy link
Member Author

no, I've not asked it yet.

@brauner even if the issue is in user space (as in our case), do you think the mentioned patch "attr: block mode changes of symlinks" should be reverted on LTS releases to prevent such kind of errors when the kernel is updated?

@brauner
Copy link

brauner commented Sep 22, 2023

no, I've not asked it yet.

@brauner even if the issue is in user space (as in our case), do you think the mentioned patch "attr: block mode changes of symlinks" should be reverted on LTS releases to prevent such kind of errors when the kernel is updated?

I would leave it in the LTS as well to make it consistent what you did above could fail before btw. It depends on the fstype whether this breaks and whether posix acls are enabled or not. That's why this was blocked in the first place as it only works sometimes.

The code you added in there isn't guaranteed to work and why both glibc and musl removed it. If you want to insist on it getting reverted from the LTS than you can probably get Greg to do this but if you can live with fixing this up here we're all better off imho.

Copy link
Collaborator

@kolyshkin kolyshkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

NB1: ENOTSUP == EOPNOTSUPP in glibc (but not in the kernel).

NB2: The code to handle ENOTSUP was added in 2019 in commit 805e01d.

Later in 2020, glibc added its own handling of AT_SYMLINK_NOFOLLOW to its fchmodat, and it returns EOPNOTSUPP in case of a symlink. This was added by https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=a492b1e5ef7ab50c6fdd4e4e9879ea5569ab0a6c (see also https://sourceware.org/bugzilla/show_bug.cgi?id=14578) and is there since glibc-2.32.

I think musl did a similar change but haven't took a closer look.

@giuseppe giuseppe merged commit be16ee7 into containers:main Sep 25, 2023
22 of 38 checks passed
@edsantiago
Copy link
Contributor

@giuseppe do you have a guess on when this will hit bodhi?

@giuseppe
Copy link
Member Author

today! :)

edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 27, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Signed-off-by: Ed Santiago <santiago@redhat.com>
cevich added a commit to cevich/automation_images that referenced this pull request Sep 27, 2023
Ref: containers/crun#1309

Signed-off-by: Chris Evich <cevich@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 27, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 27, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 28, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 28, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 28, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
cevich added a commit to cevich/automation_images that referenced this pull request Sep 28, 2023
Ref: containers/crun#1309

Signed-off-by: Chris Evich <cevich@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 28, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 28, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
edsantiago added a commit to edsantiago/libpod that referenced this pull request Sep 28, 2023
...from f38 + f37.

Requires one minor e2e test change, to handle an error logging
change in conmon 2.1.8.

Also, this is important, requires crun-1.9.1 because of a kernel
symlink change; see containers/crun#1309
The VM images here were carefully built to include that. By the
time the next VM images get built, it should be default.

Since we've bumped crun, remove two obsolete skips

And, skip a flaky pasta test, containers#20170

Signed-off-by: Ed Santiago <santiago@redhat.com>
@aki-k
Copy link

aki-k commented Oct 5, 2023

This issue occurs with kernel 6.5.5 too (podman container with systemd)

@adworacz
Copy link

adworacz commented Oct 9, 2023

This issue is now effecting Debian stable, which updated its kernel to 6.1.0-13 (6.1.55), which includes the backported change, as you can see in this change log.

This is breaking some of my podman containers on my Debian install.

https://metadata.ftp-master.debian.org/changelogs//main/l/linux-signed-amd64/linux-signed-amd64_6.1.55+1_changelog

@aki-k
Copy link

aki-k commented Oct 16, 2023

I received an update crun-1.9.2-1.fc37 (Fedora 37) today and now systemd in a podman container works again.

Kernel 6.5.6-100.fc37.x86_64

@christianhorn
Copy link

christianhorn commented Oct 28, 2023

I see this on Fedora39 with all updates as of today, on aarch64 and x86_64.
kernels 6.5.6-300.fc39.x86_64 and 6.5.6-403.asahi.fc39.aarch64+16k
podman and crun versions are same on both systems:

[chris@asahi ~]$ podman --version
podman version 4.7.0
[chris@asahi ~]$ crun --version
crun version 1.9
commit: a538ac4ea1ff319bcfe2bf81cb5c6f687e2dc9d3
rundir: /run/user/1000/crun
spec: 1.0.0
+SYSTEMD +SELINUX +APPARMOR +CAP +SECCOMP +EBPF +CRIU +LIBKRUN +WASM:wasmedge +YAJL

Reproduces in a newly deployed Fed39 KVM guest on x86_64: I used 'podman build [..]' to build an image (based on Debian Bookworm in my case) and then 'podman run':

[chris@fed39 ~]$ podman run --privileged -p 127.0.0.1:8084:80 --name mastodon -d \
   --security-opt seccomp=unconfined      localhost/mastodon /lib/systemd/systemd
Error: OCI runtime error: crun: chmod `run/shm`: Operation not supported

almusil added a commit to almusil/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
almusil added a commit to almusil/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
almusil added a commit to almusil/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
almusil added a commit to almusil/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
almusil added a commit to almusil/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
ovsrobot pushed a commit to ovsrobot/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
dceara pushed a commit to dceara/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
numansiddique pushed a commit to ovn-org/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
numansiddique pushed a commit to ovn-org/ovn that referenced this pull request Feb 16, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from commit 891cf58)
mohammadheib added a commit to mohammadheib/ovn that referenced this pull request Feb 27, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
ovsrobot pushed a commit to ovsrobot/ovn that referenced this pull request Feb 27, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
ovsrobot pushed a commit to ovsrobot/ovn that referenced this pull request Feb 27, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
ovsrobot pushed a commit to ovsrobot/ovn that referenced this pull request Feb 27, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
mohammadheib added a commit to mohammadheib/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
ovsrobot pushed a commit to ovsrobot/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: 0-day Robot <robot@bytheb.org>
dceara pushed a commit to dceara/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
dceara pushed a commit to dceara/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit cbf4fc8)
dceara pushed a commit to dceara/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from commit 891cf58)
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
dceara pushed a commit to dceara/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit cbf4fc8)
dceara pushed a commit to dceara/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 23.10 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Ales Musil <amusil@redhat.com>
Acked-by: Dumitru Ceara <dceara@redhat.com>
Signed-off-by: Numan Siddique <numans@ovn.org>
(cherry picked from commit 891cf58)
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
dceara pushed a commit to dceara/ovn that referenced this pull request Feb 28, 2024
There are some issues with older crun and newer kernel
combination [0]. Unfortunately Ubuntu 22.04 falls into this
category and the jobs will often time fail. Temoprarily use
newer crun from git that has the fix [1].

[0] containers/crun#1309
[1] https://noobient.com/2023/11/15/fixing-ubuntu-containers-failing-to-start-with-systemd/

Signed-off-by: Mohammad Heib <mheib@redhat.com>
Signed-off-by: Dumitru Ceara <dceara@redhat.com>
(cherry picked from commit cbf4fc8)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

container with systemd don't start
9 participants