-
Notifications
You must be signed in to change notification settings - Fork 188
README.md: Document cosa via unprivileged podman as primary #722
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
Conversation
Quiets markdown linter.
Quiet linter.
|
The main reason I was working on this is so we can have alt-arch teams just spin up plain bare metal machines with jenkins workers running as non-root and connect to the FCOS Jenkins master in the normal Jenkins way. Then if we change the pipeline to run |
|
I mean, this is tricky because on x86_64 we kind of do want to continue using |
dustymabe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments. Strategy mostly LGTM
Thanks for working on this. Running fully rootless is nice even just in my normal workflow. If it also has side benefits of helping us get to multi-arch support then that's another plus. |
|
I'll use the documented cosa bash function for a day or two and see if I hit any problems! Thanks @cgwalters |
README.md
Outdated
| The environment variables are special purpose: | ||
|
|
||
|
|
||
| - `COREOS_ASSEMBLER_PRIVILEGED` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like this variable no longer exists
README.md
Outdated
| id=$(id -u) | ||
| set -x # so we can see what command gets run | ||
| podman run --rm -ti --security-opt label=disable --privileged \ | ||
| --uidmap=${id}:0:1 --uidmap=0:1:${id} \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since we are using a static user in the container (the builder user with uid=1000) we need this mapping to be --uidmap=1000:0:1 --uidmap=0:1:1000. The other way will work for users if their uid on their laptop happens to be 1000, but won't work otherwise. In my case I am user with uid 1001.
README.md
Outdated
| podman run --rm -ti --security-opt label=disable --privileged \ | ||
| --uidmap=1000:0:1 --uidmap=0:1:1000 \ | ||
| -v ${PWD}:/srv/ --device /dev/kvm --device /dev/fuse \ | ||
| --tmpfs /tmp --tmpfs /var/tmp --name cosa \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i'm getting an error from cosa buildextend-installer because I think it is running out of space in /var/tmp:
supermin: ext2: creating empty ext2 filesystem '/var/tmp/.guestfs-1000/appliance.d.4x7eb0jg/root'
supermin: ext2: populating from base image
supermin: ext2: copying files from host filesystem
supermin: error: statvfs: No space left on device: /var/tmp/.guestfs-1000/appliance.d.4x7eb0jg/root
libguestfs: error: /usr/bin/supermin exited with error status 1, see debug messages above
libguestfs: trace: launch = -1 (error)
libguestfs: trace: close
libguestfs: closing guestfs handle 0x558c2687a700 (state 0)
libguestfs: command: run: rm
libguestfs: command: run: \ -rf /tmp/libguestfsHTcQf9
fatal: Error running command virt-make-fs
[coreos-assembler]$ df -kh /var/tmp/
Filesystem Size Used Avail Use% Mounted on
tmpfs 64M 0 64M 0% /var/tmp
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seems like this also affects some other commands.. one of them being buildextend-openstack
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. Right, as of recently coretoolbox forwards /var/tmp to the host. That's probably the best bet here.
It seems like podman defaults --tmpfs to 64M for unprivileged users? The desktop toolbox reverted a change to make it larger and seems to have /tmp actually persist in the container root filesystem (bad idea).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the --tmpfs lines fixes it for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That said...I think it'd be cleaner to move all of our large temporary data into the tmp/ in the builddir so we're using space in just one place.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the --tmpfs lines fixes it for me.
Yeah but that will break rpm-ostree unless you have a very new fuse-overlayfs.
Also we want /tmp to actually be a tmpfs since that's part of its "ABI"; updated to bind mount /var/tmp for now like coretoolbox does, but I'll also do a separate patch for TMPDIR.
The advantages of this are *compelling* - among others, we don't need the ACL dance, and it emphasizes how one can do builds as non-root. The doc has a lot of `sudo podman` which I've excised. A downside of this is it's less documented how to get things to work with Docker; I didn't try that, but it should be really easy.
|
one more error I'm seeing now with latest testing-devel branch: This is without the |
and if I update it to |
dustymabe
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
I think we can merge this now |
The advantages of this are compelling - among others, we don't
need the ACL dance, and it emphasizes how one can do builds as
non-root.
The doc has a lot of
sudo podmanwhich I've excised.A downside of this is it's less documented how to get things
to work with Docker; I didn't try that, but it should be really
easy.