Skip to content

daemon: use new finalization APIs#4939

Merged
jmarrero merged 1 commit intocoreos:mainfrom
jlebon:pr/new-lock-api
May 7, 2024
Merged

daemon: use new finalization APIs#4939
jmarrero merged 1 commit intocoreos:mainfrom
jlebon:pr/new-lock-api

Conversation

@jlebon
Copy link
Member

@jlebon jlebon commented Apr 26, 2024

Now that we've stabilized and made public deployment finalization APIs,
let's use them.

This also fixes an issue where when creating a locked deployment using
the legacy API (i.e. touching the /run/ostree/staged-deployment-locked
file before calling the staging API), if a staged deployment already
exists, libostree would just nuke the lockfile (this behaviour was
introduced in ostreedev/ostree#3077).

In theory the legacy API (via the lockfile) should keep working, but
the core issue is that there's no way for libostree to know if the
lockfile is carried-over state, or was freshly created for the current
invocation.

So let's not try to salvage the legacy API and just move over to the
new one.

We already have finalization tests; they will now test that the new API
functions correctly. But stop looking for the legacy lockfile. We could
instead inspect the staged deployment GVariant, but these checks were
redundant anyway since the tests verify the finalization by actually
rebooting and/or not use finalize-deployment --allow-unlocked.

Fixes: coreos/fedora-coreos-tracker#1691

@jlebon
Copy link
Member Author

jlebon commented May 6, 2024

/retest

@jmarrero
Copy link
Member

jmarrero commented May 6, 2024

need to rebase?

Now that we've stabilized and made public deployment finalization APIs,
let's use them.

This also fixes an issue where when creating a locked deployment using
the legacy API (i.e. touching the `/run/ostree/staged-deployment-locked`
file before calling the staging API), if a staged deployment already
exists, libostree would just nuke the lockfile (this behaviour was
introduced in ostreedev/ostree#3077).

In theory the legacy API (via the lockfile) should keep working, but
the core issue is that there's no way for libostree to know if the
lockfile is carried-over state, or was freshly created for the current
invocation.

So let's not try to salvage the legacy API and just move over to the
new one.

We already have finalization tests; they will now test that the new API
functions correctly. But stop looking for the legacy lockfile. We could
instead inspect the staged deployment GVariant, but these checks were
redundant anyway since the tests verify the finalization by actually
rebooting and/or not use `finalize-deployment --allow-unlocked`.

Fixes: coreos/fedora-coreos-tracker#1691
@jlebon jlebon force-pushed the pr/new-lock-api branch from e3ad874 to 37c7228 Compare May 6, 2024 13:28
@jlebon
Copy link
Member Author

jlebon commented May 6, 2024

I would've expected a rerun of the failed GHAs to rerun on top of the latest base, but that doesn't seem to be the case.

Rebased!

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

Successfully merging this pull request may close these issues.

Zincati refuses to update after manually staging a deployment

3 participants