Skip to content

Wait for systemd to be ready before waiting for systemd-networkd#488

Merged
dmitry-lyfar merged 1 commit into
mainfrom
fix/systemd-networkd-inotify
Sep 17, 2025
Merged

Wait for systemd to be ready before waiting for systemd-networkd#488
dmitry-lyfar merged 1 commit into
mainfrom
fix/systemd-networkd-inotify

Conversation

@jonathan-conder
Copy link
Copy Markdown
Contributor

Description

This test is flaky on my "update base image" branch, which is odd because I've never noticed it being flaky before, and I don't think I made any major changes to the code this exercises. In any case, it should be more reliable now.

The error manifests as "command exit code 1" when LaunchTestWorkshop runs the start command. The stderr of the start command is "Could not create manager: No such file or directory." After installing strace in a custom base image, and looking at the code a bit, I was able to confirm that the file in question is /run/systemd/. So this particular error is definitely fixed by waiting for systemd to be ready.

I probably should have done this from the beginning, the extra Exec call is much simpler than I was imagining.

Self-review quick check

  • Make decisions that cost a lot to reverse explicit in the PR description.
  • Avoid nested conditions.
  • Delete dead code and redundant comments.
  • Normalise symmetries by sticking to doing identical things identically.
// one way to handle errors
if err := f(); err != nil {
   ...
}

// one way to handle multiple returns
val, err := f()
if err != nil {
   ...
}
...
  • Check that coupled code elements, files, and directories are adjacent. For example, test data is stored as close as possible to a test.
  • Put variable declaration and initialisation together.
  • Divide large expressions into digestable and self-explanatory ones. Use multiple variables if required.
  • Put a blank line between two logically different chunks of code.
  • Follow the style guide for new error messages.

Docs

  • I have checked and added or updated relevant documentation.
  • I have checked and added or updated relevant release notes.
  • I have included the technical author in the review.

Or:

  • I confirm the PR has no implications for documentation.

This test is flaky on my "update base image" branch, which is odd
because I've never noticed it being flaky before, and I don't think I
made any major changes to the code this exercises. In any case, it
should be more reliable now.

The error manifests as "command exit code 1" when LaunchTestWorkshop
runs the start command. The stderr of the start command is "Could not
create manager: No such file or directory." After installing strace in a
custom base image, and looking at the code a bit, I was able to confirm
that the file in question is /run/systemd/. So this particular error is
definitely fixed by waiting for systemd to be ready.

I probably should have done this from the beginning, the extra Exec call
is much simpler than I was imagining.
@github-actions
Copy link
Copy Markdown

TICS Quality Gate

✔️ Passed

No changed files applicable for TICS analysis quality gating.

Automatic-tests / code-coverage / TICS GitHub Action

@dmitry-lyfar dmitry-lyfar merged commit c483824 into main Sep 17, 2025
11 checks passed
@dmitry-lyfar dmitry-lyfar deleted the fix/systemd-networkd-inotify branch September 17, 2025 23:17
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