-
Notifications
You must be signed in to change notification settings - Fork 168
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
Remove anaconda #556
Remove anaconda #556
Conversation
ajeddeloh
commented
Jun 14, 2019
- Only for qemu right now. Trying to make sense of the buildextend-metal, it looks like it's running anaconda again?
- Only tested with fcos
- We ought to not use yaml for image.yaml, it's a pain to parse
- Doesn't actually remove anaconda, just switches to not using it
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 pretty easy; shouldn't be too hard to extend to metal-uefi
I'd think. Will play with this too.
src/create_disk.sh
Outdated
# init the ostree | ||
ostree admin init-fs rootfs | ||
ostree pull-local "$ostree" --repo rootfs/ostree/repo | ||
ostree admin os-init fedora-coreos --sysroot rootfs |
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.
Let's continue templating this from the manifest.
From shell script yes but Python is good for that right? |
Misc idea: re-render to a file in tmp it as json using python. Then bash utils can use |
Updated so we build bios+uefi images now. |
src/create_disk.sh
Outdated
ostree admin init-fs rootfs | ||
ostree pull-local "$ostree" --repo rootfs/ostree/repo | ||
ostree admin os-init fedora-coreos --sysroot rootfs | ||
kargs='root=/dev/disk/by-label/root console=ttyS0,115200n8 console=ttyS0 rootflags=defaults,prjquota rw $ignition_firstboot' |
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.
Can we move the middle part of this to two variables ($consoleflags
and $rootflags
) that can be overridden via environment?
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.
Also we need to use VM_TERMINAL
instead of ttyS0
.
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.
@lucab what environment precisely? This is run in supermin, so the environment is pretty sparse.
The kargs currently live in a kickstart. Seems like they ought to live in image.yaml
?
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.
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.
Summarizing some discussion on #fedora-coreos
: We're going to keep the kargs that relate to this script in this script but move the other kargs to cmd-build since we can do thing like templating (for things like $VM_TERMINAL
there since it's not in supermin. We may move them later, but that's for another PR.
Sure, fine by me. |
I'll deal with doing the yaml->json re-rendering later in another PR. Doesn't need to happen in this one. |
src/cmd-build
Outdated
build_image() { | ||
local size | ||
size="$(python3 -c 'import sys, yaml; print(yaml.load(sys.stdin)["size"])' < "$configdir/image.yaml")G" | ||
qemu-img create -f qcow2 "$workdir/diskimage.qcow2" "$size" |
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.
Instead of $workdir
this should be in the build tmpdir $(pwd)
(which would require passing it as an argument to runvm
for cleanliness)
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.
In that case might as well pass the base image path directly to runvm, right?
Addressed things besides the mutli-arch bit, waiting to learn a bit more about ppc64le on that. Do we need to support arm64 on non-uefi platforms? |
No, aarch64 is EFI-only. |
Added a check so we fall back to anaconda on non-x86_64 arches. Addressed @jlebon's comments. Also worth calling out we need coreos/fedora-coreos-config#105 to not get failed units. Do we want to handle buildextend-metal here or in another PR? If we do want to continue creating the small images for metal but do not for qemu then the buildextend-metal will need to recreate the image entirely since we can't shrink xfs filesystems. |
As a short term that's probably OK, will make it easier to test without disrupting the multi-arch porting in progress.
If we don't we're back in the guessing game of how big the disk should be...
No, that's where |
I'm assuming |
Right now So it sounds like this should not wait for the buildextend-metal (be and qemu only for the moment) and I'll follow up with the corresponding Is |
I'm also OK with that. |
Ok, this should be ready for more review then. Also gated the changes to |
This looks good to me! (Though we can probably squash 7ef9087 into ef0450c, right? Edit: and 4e490eb into 7640c90) |
I think I want to leave the latter set of commits separate. Makes it clear what changes for UEFI vs removing anaconda in general. |
Testing this locally (privileged), I get:
So there are two issues here. The first is #560 (comment). The second is that: # ensure the user of files created do not have root ownership
trap 'chown -h -R ${USER}:${USER} ${workdir}' EXIT which is now running in the privileged path for the first time. This will fail though, because the cache has a bunch of stuff owned by root and we're trying to chown it to something else as real UID != 0. I'm actually not entirely sure why we need this, since we're running supermin as the current user, so everything created through the 9p mount should already be owned by that user. Dropped that, and got farther (it created the partitions at least), but now hitting:
Haven't debugged that yet. But probably comes down to the expanding ways in which one can now run cosa. Tried unprivileged mode quickly. I got further but hit:
Just needs a |
OK, right also needs: diff --git a/src/create_disk.sh b/src/create_disk.sh
index a0281a2..e1029e7 100755
--- a/src/create_disk.sh
+++ b/src/create_disk.sh
@@ -42,7 +42,7 @@ mount "${disk}2" rootfs/boot/efi
# init the ostree
ostree admin init-fs rootfs
-ostree pull-local "$ostree" --repo rootfs/ostree/repo
+ostree pull-local "$ostree" "$ref" --repo rootfs/ostree/repo
ostree admin os-init "$os_name" --sysroot rootfs
allkargs='root=/dev/disk/by-label/root rootflags=defaults,prjquota rw $ignition_firstboot'
allkargs="$allkargs $extrakargs" |
With the workarounds for the above, I got this working in both the privileged and unprivileged paths! 🎉 |
Also switch to BLS. Continue to use anaconda on other arches.
Install both uefi and bios grub, but have them read the same config.
Ok, just pushed the $ref and python loader warning/.get() fixes. Lets fix the other unrelated issues in their own PRs |
Awesome, let's do this! |
Both fixed in #564. |