-
Notifications
You must be signed in to change notification settings - Fork 178
installer: Inject stamp file /etc/coreos-legacy-installer-initramfs #1389
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
installer: Inject stamp file /etc/coreos-legacy-installer-initramfs #1389
Conversation
For openshift/enhancements#210 I think we will need at least some transitional period where RHCOS ships both. Even ignoring customers, the way our CI works strongly encourages "ratcheting" changes in a compatible way, i.e.: - Introduce new thing, ship it - Port consumers to new thing - Remove old thing And honestly I think this is a good model, because it forces us to experience some of the pain that customers might feel here. The basic idea here is: - Install as `/usr/libexec/coreos-installer.legacy` so there's no chance of conflict with the real one - Test for the presence of the "stamp file' we drop in our legacy initramfs so we know to defer to the real root's coreos-installer; see coreos/coreos-assembler#1389
b899863
to
7c82c15
Compare
Ah yes, so if anyone wants to shed a tear for the 40 minutes I spent chasing down
that might console me or something. |
I'm not sure I'm following everything so bear with me. Why not just use the opposite logic since we already have the equivalent of a stamp file in the "fat" initramfs? i.e. |
I think you're right, that would work. I can change the other PR to do that. But...it seems a lot better to me to be explicit rather than implicit. Among other things, it's quite possible we change where the rootfs squashfs is at some point, and I wouldn't expect to need to change the coreos-installer legacy branch too. |
Right. I think I'd be less on the fence about explicit vs implicit if the "legacy installer" weren't going away. Since it's going away I'd be fine with an implicit relationship, but interested in what others think. |
What's the problem with injecting an explicit stamp in the legacy path? I don't know a timeline for removing it from the RHCOS path, it may be harder than we think. That said, at this point it might be easier to fork |
Wait, I remembered the real reason now. It's because the legacy coreos-installer module ends up in all initramfs images and so if someone e.g. booted a qemu image with |
(Now...with some more hackery to the build system we could actually just inject the legacy installer code into the legacy initramfs but...) |
(Side note, I am so happy that we now have CI coverage for this! Was really useful to have the PR fail.) |
With the legacy installer today we allow this. It was or could be viewed as one of the benefits of the old approach: "Want to reinstall your system? Just add some kargs to grub and go!" IOW this would be a behvaior change. So we should probably consider the implications and if it's worth the behavior change or not. |
Sorry, I wasn't clear. I actually more meant we want to always defer installation via kernel arguments to the new installer except in the case where the old initramfs or ISO are booted. |
Ok. That makes more sense. In a scenario where we were to provide both installers (ongoing discussion about that) then it would make sense to disable the old installer if not booted specifically from the old installer artifacts. |
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, dustymabe The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
This is needed for coreos/coreos-installer#220 in the PXE case to distinguish whether or not we're in the initramfs image designed for the legacy installer.
7c82c15
to
811d78b
Compare
For openshift/enhancements#210 I think we will need at least some transitional period where RHCOS ships both. Even ignoring customers, the way our CI works strongly encourages "ratcheting" changes in a compatible way, i.e.: - Introduce new thing, ship it - Port consumers to new thing - Remove old thing And honestly I think this is a good model, because it forces us to experience some of the pain that customers might feel here. The basic idea here is: - Install as `/usr/libexec/coreos-installer.legacy` so there's no chance of conflict with the real one - Test for the presence of the "stamp file' we drop in our legacy initramfs so we know to defer to the real root's coreos-installer; see coreos/coreos-assembler#1389
OK CI is green here and now have coreos/coreos-installer#220 fully working! |
OK took some time to digest this given the multiple branches, artifacts, distros, and repos going on here. One last thing I don't quite follow is the commit message says "in the PXE case" -- the logic in coreos/coreos-installer#220 kicks in equally well in the ISO boot case, no? |
Yes, I'd think so, but for whatever reason only PXE seemed to consistently hit it here. |
Anything else blocking a |
Sorry, forgot to circle back on this. |
This is needed for coreos/coreos-installer#220
in the PXE case to distinguish whether or not we're in the initramfs
image designed for the legacy installer.