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

Change binfmt flags to ensure setuid is enabled in qemu-user-static supported CI runs #1077

Merged
merged 4 commits into from
Sep 18, 2023

Conversation

trws
Copy link
Member

@trws trws commented Sep 18, 2023

Second try to fix the aarch64 container builders. AFAICT this is an issue with the way the binfmt_flags are set up. I actually like this solution if it works, it's a lot easier to maintain than the opaque github action reference, and gives us more control over the behavior.

NOTE: I changed the behavior to build the arm container on push for debugging, ensure that's rebased out before this merges!

@trws
Copy link
Member Author

trws commented Sep 18, 2023

Here's a link to the successful test of this change: https://github.com/flux-framework/flux-sched/actions/runs/6220263727/job/16879950413?pr=1077

It's not directly accessible from here anymore due to a rebase. Hopefully this will keep similar problems from coming back, and we might want to apply a similar change to the actions file on core.

@trws trws requested a review from grondo September 18, 2023 10:10
@trws
Copy link
Member Author

trws commented Sep 18, 2023

@grondo, apparently ReadTheDocs is switching what they require in their YAML at the same time. Fix included here as well since it was required to get the tests green. We'll want that on core for sure. https://blog.readthedocs.com/use-build-os-config/

@grondo
Copy link
Contributor

grondo commented Sep 18, 2023

We've already incorporated th build.os requirement in flux-core (actually, we only added the config file itself recently when it became a requirement), but thanks!

Copy link
Contributor

@grondo grondo left a comment

Choose a reason for hiding this comment

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

LGTM! One question about a commit message inline.

targets: aarch64
- name: setup qemu-user-static
run: |
docker run --rm --privileged aptman/qus -s -- -p --credential aarch64
Copy link
Contributor

@grondo grondo Sep 18, 2023

Choose a reason for hiding this comment

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

Question: The commit message references "This adds the --capability yes argument to the script", but I don't see anything in the actual commit that does something like that (this seems to just replace the dbhi/qus/action action with a docker run comand). Just checking if the commit message is outdated.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah, I'll fix that, I meant "--credential" but mistyped it.

@grondo
Copy link
Contributor

grondo commented Sep 18, 2023

Also: update PR title for release notes inclusion 😉

problem: Arm64 container build still running into issues even avoiding
sudo in the docker container, it's hiding in check run, Debian-based
distributions by default register binfmt_misc loaders without support
for setuid propagating into the container

solution: This adds the `--credential` argument to the script in the
container, and strips out the github actions indirection so we can
maintain it.  This should change the flags from F to OC or OCF, either
should allow the setuid of the sudo binary to be preserved
I have no idea how I missed this:
problem: install-only builds passed `--with-systemdsystemunitdir` which
was not supported in the cmake wrapper and caused a failure

solution: add support for accepting the option.  It currently doesn't
*do* anything, but it's pulled in at least so we can use it when and if
we want to.
Problem: much like systemdsystemunitdir, we don't support flux-security
and caliper arguments to cmake, unlike systemdunitdir I don't see these
being useful since we need to match upstream flux-core

Solution: remove the flags from docker-run-checks.sh
Problem: RTD decided to require a new key to define the container, see
this post: https://blog.readthedocs.com/use-build-os-config/
Solution: add keys to say we want jammy and python 3.10 to appease the
yaml demons
@codecov
Copy link

codecov bot commented Sep 18, 2023

Codecov Report

Merging #1077 (31845c3) into master (f1e77a5) will decrease coverage by 0.1%.
The diff coverage is n/a.

❗ Current head 31845c3 differs from pull request most recent head b40f2ba. Consider uploading reports for the commit b40f2ba to get more accurate results

@@           Coverage Diff            @@
##           master   #1077     +/-   ##
========================================
- Coverage    71.6%   71.6%   -0.1%     
========================================
  Files          89      89             
  Lines       11569   11569             
========================================
- Hits         8292    8289      -3     
- Misses       3277    3280      +3     

see 1 file with indirect coverage changes

@trws trws changed the title Binfmt flags Change binfmt flags to ensure setuid is enabled in qemu-user-static supported CI runs Sep 18, 2023
@trws trws added the merge-when-passing mergify.io - merge PR automatically once CI passes label Sep 18, 2023
@mergify mergify bot merged commit 6948322 into flux-framework:master Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge-when-passing mergify.io - merge PR automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants