Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

detect unsupported seccomp architecture #1776

Merged
merged 3 commits into from
Dec 6, 2023
Merged

detect unsupported seccomp architecture #1776

merged 3 commits into from
Dec 6, 2023

Conversation

reidpr
Copy link
Collaborator

@reidpr reidpr commented Nov 27, 2023

Closes #1771.

@reidpr
Copy link
Collaborator Author

reidpr commented Nov 27, 2023

@wiene, does this PR work for you in your s390x environment?

@wiene
Copy link
Contributor

wiene commented Nov 30, 2023

@reidpr, thanks for this PR. I do not have direct access to a host with this architecture. The issue reported in #1771 showed up on an s390x node which is part of the post-upload Debian CI infrastructure. Nevertheless to test the change introduced by this PR I followed a two step procedure:

  1. Apply this PR and run the hello example on x86-64 -> Works as expected.
  2. Apply this PR, remove x86-64 architecture from list of supported seccomp architectures and test the hello example on x86-64 -> Fails as expected with a helpful error message:
$ ch-image build .
initializing storage directory: v7 /var/tmp/root.ch
initializing empty build cache
inferred image name: hello
  2. FROM almalinux:8
[...]
image arch: amd64
copying image from cache ...
  4. RUN.S dnf install -y --setopt=install_weak_deps=false openssh-clients  && dnf clean all
copying image from cache ...
ch-run[6793]: error: seccomp root emulation failed (is your architecture supported?): Operation not permitted (ch_core.c:602 1)
something went wrong, rolling back ...
HEAD is now at 0bc098b PULL almalinux:8
error: build failed: RUN command exited with 1

So from my point of view this change looks fine. 👍

@reidpr reidpr requested a review from lucaudill November 30, 2023 20:59
Copy link
Collaborator

@lucaudill lucaudill left a comment

Choose a reason for hiding this comment

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

Looks good to me

# Conflicts:
#	bin/ch_core.c
@reidpr reidpr merged commit 20bac07 into master Dec 6, 2023
6 checks passed
@reidpr reidpr deleted the seccomp-fail_1771 branch December 6, 2023 15:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ch-image build fails silently on architectures without seccomp support
3 participants