grub and ostree disagree on BLS versioning #2961
Labels
difficulty/medium
medium complexity/difficutly issue
jira
reward/medium
Fixing this will be notably useful
OK so I was playing around with alternative stateroots (i.e.
ostree admin os-init backup; ostree admin deploy --os=backup $commit
) and made an unfortunate discovery.Today, ostree writes BLS files with a
version
entry in them, and that's what it thinks the bootloader order should be.grub2 though seems to be parsing the filenames...as if they were RPM packages actually. See this code: https://github.com/rhboot/grub2/blob/7de33f4072abf5f14c4fdad6e566c58bdbf3b26e/grub-core/commands/blscfg.c#L400
And what's ugly here is what ostree writes into the filenames looks like
ostree-$version-$stateroot
. Except...that parsing code splits on-
. So things go badly if the stateroot name contains-
...as it does forfedora-coreos
.We end up with (I think)
name=ostree-$version
version=fedora
release=coreos
This isn't exactly problem if one only has one stateroot...we'll still correctly sort on the ordering of "name" here...it's just ugly.
However, it does completely break the ability to use alternative stateroots because then the parsing of things just breaks.
I think we could probably change the filenames we emit to match this schema. Hmm...probably we need the version to go first to reliably fix this, and then encode everything else into the version field or so?
The text was updated successfully, but these errors were encountered: