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

Feedback on running osbuild in GitLab CI for CKI project #3490

Open
mh21 opened this issue Jun 14, 2023 · 3 comments
Open

Feedback on running osbuild in GitLab CI for CKI project #3490

mh21 opened this issue Jun 14, 2023 · 3 comments

Comments

@mh21
Copy link

mh21 commented Jun 14, 2023

Purpose was to build gitlab-runner worker VM images which are basically FC37 + moby similar to https://github.com/major/imagebuilder-fedora/.

The setup is a service container image with osbuild in it, which can then be accessed in GitLab via a socket in /builds.

main issues

  • GitLab-provided runners use a 5.4+ kernel which is missing LOOP_CONFIGURE support (job logs); this can be worked around by using self-provisioned runners with a newer kernel: fixed by loop: use LOOP_CONFIGURE when available osbuild#1253
  • FC37+ doesn't have the loop devices preallocated, while Ubuntu used in the blog post above does that; as devices are not synced after container creation, osbuild is unhappy because it cannot find its loop devices (job logs); this can be worked around with a systemd unit that takes care of creating the devices
  • osbuild-composer only exposes a local socket in /run for the use by composer-cli; this can be worked around via systemd-socket-proxyd rerouting to a socket in the shared /builds volume and --socket

misc issues

@mh21
Copy link
Author

mh21 commented Jun 14, 2023

/cc @ondrejbudai

@AnthonyAus
Copy link

/cc @mh21 I'm trying composer in a container, and getting setfile errors during the compose build:
...
raise CalledProcessError(retcode, process.args,\nsubprocess.CalledProcessError: Command '['setfiles', '-F', '-r', '/run/osbuild/tree', '/run/osbuild/tree/etc/selinux/targeted/contexts/files/file_contexts', '/run/osbuild/tree']' returned non-zero exit status 255.\n"}]},"metadata":null},"upload_status":"failure","pipeline_names":{"build":["build"],"payload":["os","image","vmdk"]},"host_os":"rhel-92","arch":"x86_64","image_boot_mode":"hybrid","job_error":{"id":10,"reason":"osbuild build failed"}},"channel":"","queued_at":"2024-01-16T21:34:47.325360649Z","started_at":"2024-01-16T21:34:47.33913667Z","finished_at":"2024-01-16T21:35:40.764334525Z","expires_at":"0001-01-01T00:00:00Z","retries":0}

Are you able to advise tips on getting setfiles working in the container, I understand we can't enable selinux inside a podman container

@mh21
Copy link
Author

mh21 commented Jan 17, 2024

no 😕

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

No branches or pull requests

2 participants