Skip to content

install/config: Skip config fragments that vanish while loading - #24

Closed
cgwalters-bot wants to merge 2 commits into
mainfrom
bot/printconfig-race
Closed

cgwalters-bot wants to merge 2 commits into
mainfrom
bot/printconfig-race

Conversation

@cgwalters-bot

@cgwalters-bot cgwalters-bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Collaborator

The install config container integration test flakes with error: Loading configuration: No such file or directory (os error 2) (seen on the sealed leg of bootc-dev#2500, and in a fork run on 2026-09-24). printconfig --all runs concurrently and creates then removes /run/bootc/install/10-test.toml, which bootc install print-configuration can find in its directory scan and then fail to open.

The first commit makes config loading skip a fragment that vanished between scan and read (a real robustness issue, since /etc and /run are writable), and names the file for other read errors. The second serializes the two tests so the reader can't also see the fragment half-written.

Testing, on a 16-core devspace:

  • Reproducer (loop creating/removing a fragment in /run/bootc/install while running bootc install print-configuration 2000 times in the container): stock quay.io/fedora/fedora-bootc:44 (bootc 1.16.13) failed 24/2000 and 25/2000 with the CI error; the image built from this branch had 0/2000.
  • just validate passed; just test-container passed (unit tests incl. the new test_read_fragment, and all 10 container integration tests); the container integration tests then passed 10/10 more runs.

Generated-by: https://github.com/cgwalters/#llms


Review draft in cgwalters-forge, not upstream yet. This section is removed when the PR is opened upstream.

  • Upstream: bootc-dev/bootc, base main
  • Board item: PVTI_lADOE9oHIs4BlJLczg9kEig
  • Fork CI: off; the devspace testing described above is this PR's CI, and upstream CI runs once it is opened there

To review:

  • Approve, or comment /promote on a line of its own, to open it upstream, ready for review. Either covers only the commits pushed so far.
  • If upstream requires DCO, approving also signs off: promote adds Signed-off-by: Colin Walters <walters@verbum.org> to the commits lacking it (the bot's and yours; anyone else's only if you ask), with you as committer.
  • Add a /draft line (in the same comment or before) to open it upstream as a draft (/ready undoes that).
  • Close to drop it.
  • Edit the title and description freely: they become the upstream PR's. Review comments are squashed into the commits they concern, with a reply here.

The install config fragments live partly in writable directories
(/etc, /run), so one can be removed between the directory scan and
reading it. That made `bootc install print-configuration` (and install
itself) fail with a bare "No such file or directory", with no path
to say which file. A removed fragment is just not part of the config
anymore, so skip it; other read errors now name the file.

This is what made the "install config" container integration test
flake while "printconfig --all" created and removed a fragment in
/run/bootc/install concurrently.

Generated-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
libtest runs the container tests concurrently, and "printconfig --all"
writes and then removes a fragment in /run/bootc/install that
"install config" would pick up while scanning the same directory.
Besides the vanishing-file error fixed in the previous commit, the
reader could also see the fragment half-written, so take a lock rather
than relying on timing.

Generated-by: AI
Signed-off-by: Colin Walters <walters@verbum.org>
@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Signed off 2 commit(s) with Signed-off-by: Colin Walters <walters@verbum.org> for bootc-dev/bootc's DCO check, on cgwalters's approval #24 (review) of 4a6dc3fc70d4. Same trees; the head is now b5e7c08ff708.

@cgwalters-bot

Copy link
Copy Markdown
Collaborator Author

Opened upstream as bootc-dev#2520. Closing this review draft.

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.

2 participants