-
Notifications
You must be signed in to change notification settings - Fork 162
overlay: migrate existing systems to OCI #3458
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
base: testing-devel
Are you sure you want to change the base?
Conversation
ok. a few things here.
|
cf29a75
to
42f19d2
Compare
overlay.d/15fcos/usr/lib/systemd/system/coreos-oci-migration-motd.service
Outdated
Show resolved
Hide resolved
42f19d2
to
79a91cd
Compare
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 this motd and the migration script into its own overlay (i.e. not 15fcos
) that only gets included for F42?
I just went through removing some old cruft from our packages lists and pulling it out of a generic overlay is much harder than just deleting a directory.
overlay.d/15fcos/usr/lib/systemd/system/zincati.service.d/010-oci-migration.conf
Outdated
Show resolved
Hide resolved
79a91cd
to
0bc6bbe
Compare
overlay.d/35oci-migration/usr/libexec/coreos-oci-migration-motd
Outdated
Show resolved
Hide resolved
IMO things here become way simpler if we do #3458 (comment) and just roll out the motd in the next release after we roll out the automated migration (i.e. separate PR) |
the issue I see going that route is : if a node get the ExecStartPre but zincati can't pull the OCI at the next update for some reason, it won't be able to get the next update, so won't ever get the motd to display I would prefer to ship the motd in the same rollout. We can make it simpler if you think the complexity is not worth it, and we could move the |
TBH I've been thinking for some time that we need a motd that warns of the most recent deployment being stale (i.e. older than 30 days or something). I think if we had, it wouldn't give you what you want here, but it would be some sort of backstop that would let the user know something was going wrong with the update mechanism.
|
I agree with @jbtrystram that the likelihood of failure is highest during migration and we want to cover the case where the system can't upgrade. But I also agree with @dustymabe that this seems quite complex. Hmm, I'm confused why we need the motd stuff to live completely separately. Couldn't it be another Ahh, is it to handle the "disabled Zincati" case? People doing |
Then you'd only get the MOTD at next login I think. That's why I ended up with the path unit , but I think it's a byproduct of |
Yeah, agree with that. Noticing it at the next login seems OK too. |
Ok I Just tested this some more and after all the whole
Then you can't silence it without having to do another zincati dropin |
dc74044
to
9f8da5e
Compare
@@ -0,0 +1,3 @@ | |||
[Service] | |||
StateDirectory=coreos-oci-migration |
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 worry just a little bit about this somehow affecting zincati daemon when it runs.
This will set some env vars:
StateDirectory= │ /var/lib/ │ $XDG_STATE_HOME │ $STATE_DIRECTORY
Are we sure this won't change any behavior of Zincati when it runs?
If we are worried about it we could just move to a model where we don't write the files under a directory but just directly in /var/lib/
.
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 haven't had any issues in my testing, Zincati updated fine
manifests/fedora-coreos.yaml
Outdated
@@ -33,6 +33,10 @@ conditional-include: | |||
# All Fedora CoreOS streams share the same pool for locked files. | |||
lockfile-repos: | |||
- fedora-coreos-pool | |||
- if: ${stream} == "next" |
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.
- if: ${stream} == "next" | |
- if: stream == "next" |
I don't think the ${}
is needed, but please confirm
overlay.d/35oci-migration/usr/lib/systemd/system/coreos-oci-migration-motd.service
Outdated
Show resolved
Hide resolved
The system can still be updated using 'rpm-ostree update' but this | ||
will no longer work after the legacy OSTree repository is decommissioned. | ||
Currently this is planned for the release | ||
of Fedora 43. |
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.
We changed the strategy slightly such that rpm-ostree upgrade
will continue to work even after the OCI migration. So we can drop this part.
See new wording suggestion in other 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.
I think you are misunderstanding this : this is shown when Zincati is disabled, so there is no oci migration happening here.
This says that if you want to disable zincati you can still manually update, as always, but as the ostree repo won't be populated after f43, then no more updates after this point.
Some wording suggestions for the motd messages:
|
I can try to test this later this week if you like. |
@dustymabe I applied the suggestions . Thanks |
dc46722
to
8fb8909
Compare
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 think the code review LGTM. I'll try to run some tests.
I made a small ign config and instructions to make testing this easier : https://gist.github.com/jbtrystram/5f0f94e2ea47f46e16f0e7cafc4cc788
|
In [1] we moved newly provisioned systems to be deployed via container and thus retrieving updates via zincati from the OCI registry (quay.io/fedora/fedora-coreos). This starts the migration script shipped in [2] before Zincati to set up the migration at the next update. Slightly tweak the migration script to look for a stamp to opt-out of the migration and create one to signal failure. Also add a MOTD that look for those stamps and display an appropriate message. [1] coreos/fedora-coreos-tracker#1823 [2] coreos#3355 Closes coreos/fedora-coreos-tracker#1890
8fb8909
to
e30fd89
Compare
In [1] we moved newly provisioned systems to be
deployed via container and thus retrieving updates via zincati from the OCI registry (quay.io/fedora/fedora-coreos).
This starts the migration script shipped in [2]
before Zincati to set up the migration at the next update.
A way to override this is to add another drop-in
with
ExecStartPre=
with a higher ranking nameunder the systemd drop in path, e.g.
/etc/systemd/system/zincati.service.d/90-no-oci.conf
.[1] coreos/fedora-coreos-tracker#1823
[2] #3355
Closes coreos/fedora-coreos-tracker#1890