Repository navigation
Conversation
dba7de3 to
9ade58e
Compare
Sad face. That makes this pretty useless as installing to a populated ESP works without issue, only Would the caller of |
yes, and these need special treatment for updates/switches. Also, we need to make sure these appear last in the boot entries list etc etc. There are a few more cases that need to be handled |
9ade58e to
80be97c
Compare
|
I've been looking at this last- and previous weekend and attempting to have the caller filter these entries out would require a lot of changes as the original filename isn't included in the return value of Creating unique filenames for entries using the same |
Johan-Liebert1
left a comment
There was a problem hiding this comment.
State resilience test seems to be failing with
content: Error: x Assertion failed.
content: ,-[/var/tmp/tmt/bootc-tmt-mldew2as-tmt-plans-integration-plan-45-composefs-corruped-state-resilience/tmt/plans/integration/plan-45-composefs-corruped-state-resilience/discover/default-0/tests/tmt/tests/booted/test-composefs-corruped-state-resilience.nu:51:12]
content: 50 |
content: 51 | ,-> assert (
content: 52 | | journalctl F_MESSAGE_ID=d264f924dadb4c31bff0412107d391fb
content: 53 | | | str contains $"No origin file for deployment bad-verity"
content: 54 | |-> )
content: : `---- It is not true.
content: 55 |
content: `----
This is because we log a journal message when we encounter an entry that bootc doesn't own (doesn't start with our prefix). I think it's better now to change this error message as we are handling these entries
|
Nooo... I'm not really sure how these entries end up here as |
80be97c to
6307167
Compare
| staged_entries.atomic_write(filename, new_entry.to_string().as_bytes())?; | ||
| } | ||
|
|
||
| let original_entries = boot_dir.open_dir(TYPE1_ENT_PATH)?; |
There was a problem hiding this comment.
This is fine, but this is only for backwards compatibility stuff. The actual code for writing the staged entries would be somewhere in crates/lib/src/bootc_composefs/boot.rs
|
CI errors are unrelated to this PR |
6307167 to
203a9f6
Compare
|
I'm not entirely happy with what I had to do to create a |
203a9f6 to
4024f97
Compare
|
@Johan-Liebert1 are you going to re-review this one? Only skimming at a high level it seems sane to me |
|
Ah, yes, this was buried deep in my GH notifications |
Johan-Liebert1
left a comment
There was a problem hiding this comment.
Looks good overall. Needs a rebase to fix conflicts
| .with_context(|| format!("Writing to {file_name}"))?; | ||
| } | ||
|
|
||
| let original_entries = boot_dir.open_dir(TYPE1_ENT_PATH)?; |
There was a problem hiding this comment.
Repeated function https://github.com/bootc-dev/bootc/pull/2243/changes#diff-1604878878a88c4dcbd7f51444b69fc01a58e3ab48ade4e10b7a9ed05fa867f8R1232. Can be refactored
| } | ||
|
|
||
| #[cfg(test)] | ||
| mod tests { |
There was a problem hiding this comment.
These tests are fine to have, but having proper integration tests in the tmt/tests directory would be much nicer
There was a problem hiding this comment.
I has some difficulty setting up an environment where I can run the integration tests. The existing tests should be green in a clean fedora cloud image after installing the packages from the contributing document, but they're not...
I'll see if I can figure it out
There was a problem hiding this comment.
It was SELinux...
Not that I got much further after that. I was able to add a few checks to an existing tests and the custom entry is still there at the end, but the entries.staged directory doesn't seem to exist after the bootc upgrade... So there's probably something I'm not understanding/checking correctly
There was a problem hiding this comment.
It was SELinux...
that's always a tough one to find.
but the entries.staged directory doesn't seem to exist after the bootc upgrade
is the .staged directly not available after reboot, or before reboot? If it's not available before reboot, then yeah, there is something wrong here.
There was a problem hiding this comment.
Before reboot, so it should be there
There was a problem hiding this comment.
I don't see any obvious issues in your function. Are you sure you're checking in the right place?
4024f97 to
e4f5df0
Compare
| let entry = entry?; | ||
| let entry_name = entry.file_name()?; | ||
| if entry.file_type()?.is_file() && !entry_name.starts_with(BLS_ENTRY_PREFIX) { | ||
| original_entries.copy(entry_name.clone(), staged_entries, entry_name)?; |
There was a problem hiding this comment.
Ideally we'd want atomic writes here
|
|
||
| #[context("Staging non-managed BLS entry")] | ||
| pub(crate) fn stage_non_manged_bls_entries(boot_dir: &Dir, staged_entries: &Dir) -> Result<()> { | ||
| let original_entries = boot_dir.open_dir(TYPE1_ENT_PATH)?; |
There was a problem hiding this comment.
Maybe this should be the dir we pass and not the boot dir? We don't really need to boot dir per-se
e4f5df0 to
3ed9139
Compare
|
I didn't get around to fixing the integration test failures with ostree and the whitespace-only hunk in I was planning on adding |
Signed-off-by: Dudecake <ckoomen@ckoomen.eu>
Signed-off-by: Dudecake <ckoomen@ckoomen.eu>
Signed-off-by: Dudecake <ckoomen@ckoomen.eu>
Signed-off-by: Dudecake <ckoomen@ckoomen.eu>
3ed9139 to
2df98c5
Compare
Fixes #2228
The cases that the tests in the last commit check cannot occur anymore because of the changes in
get_sorted_type1_boot_entries_helper. If they're unneeded, I can drop the commit.