-
Notifications
You must be signed in to change notification settings - Fork 293
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
deploy: Change BootLoaderSpec filenames so they can be used for sorting #1654
Conversation
Currently the BLS snippets are named ostree-$ID-$VARIANT_ID-$index.conf, but the BLS config files are actually sorted by using the version field which is the inverse of the index. In most places, _ostree_sysroot_read_boot_loader_configs() is used to get the BLS files and this function already returns them sorted by the version field. The only place where the index trailing number is used is in the ostree-grub-generator script that lists the BLS files to populate the grub config file. But for some bootloaders the BLS filename is the criteria for sorting by taking the filename as a string version. So on these bootloaders the BLS entries will be listed in the reverse order. To avoid that, change the BLS snippets filename to have the version field instead of the index and also to have the version before deployment name. Make the filenames to be of the form ostree-$version-$ID-$VARIANT_ID.conf so the version is before the deployment name. Signed-off-by: Javier Martinez Canillas <[email protected]>
It seems the test failures are unrelated? Since I see that in the required test suite the FAH28-insttests failed but this succeeded for ex-required . And conversely f28-introspection-tests failed for ex-required which succeeded in the required test suite. |
That test is flaky sadly...I just don't want to drop it, as at some point I really want to expand our tests to work that way by default. There's some stuff we're doing in the background to enhance reliability here. Anyways I thought about this a fair bit, I can't see a way it could break anything - the way we do an atomic swap of all the bootloader configs makes this transition easy, and older versions of libostree will keep using the version field. The only danger I can think of is if somehow |
@cgwalters agreed and hopefully we should eventually get rid of |
☀️ Test successful - status-atomicjenkins |
We should probably add a libtest.sh API for so for this, but this is the quick hack. Fallout from ostreedev/ostree#1654
We should probably add a libtest.sh API for so for this, but this is the quick hack. Fallout from ostreedev/ostree#1654 Closes: #1433 Approved by: jlebon
We should probably add a libtest.sh API for so for this, but this is the quick hack. Fallout from ostreedev/ostree#1654 Closes: #1433 Approved by: jlebon
The BootLoaderSpec filename change in ostree [0] is causing failures in streams containing the change. This commit will handle pre and post BLS filename changes using a simple regex. [0] ostreedev/ostree#1654
* initramfs: update test for BootLoaderSpec change The BootLoaderSpec filename change in ostree [0] is causing failures in streams containing the change. This commit will handle pre and post BLS filename changes using a simple regex. [0] ostreedev/ostree#1654
Currently the BLS snippets are named ostree-$ID-$VARIANT_ID-$index.conf,
but the BLS config files are actually sorted by using the version field
which is the inverse of the index.
In most places, _ostree_sysroot_read_boot_loader_configs() is used to
get the BLS files and this function already returns them sorted by the
version field. The only place where the index trailing number is used is
in the ostree-grub-generator script that lists the BLS files to populate
the grub config file.
But for some bootloaders the BLS filename is the criteria for sorting by
taking the filename as a string version. So on these bootloaders the BLS
entries will be listed in the reverse order.
To avoid that, change the BLS snippets filename to have the version field
instead of the index and also to have the version before deployment name.
Make the filenames to be of the form ostree-$version-$ID-$VARIANT_ID.conf
so the version is before the deployment name.
Signed-off-by: Javier Martinez Canillas [email protected]