Skip to content

probe backend and stop the no-backend retry storm - #1144

Merged
MalpenZibo merged 3 commits into
MalpenZibo:mainfrom
romanstingler:fix/network-backend-probe
Nov 13, 2026
Merged

MalpenZibo merged 3 commits into
MalpenZibo:mainfrom
romanstingler:fix/network-backend-probe

Conversation

@romanstingler

@romanstingler romanstingler commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator
  • Probe org.freedesktop.NetworkManager and net.connman.iwd with NameHasOwner before initializing a backend.
  • Add State::Unsupported: log once when no backend exists, then wait on NameOwnerChanged instead of retrying every 5 seconds.
  • Add network_backend = "auto" | "disabled" under [settings]. disabled disables the network service and subscription.
  • Keep the existing fixed 5s State::Error retry. Exponential backoff is left for a follow-up if needed.
  • NetworkManager is preferred when both services are present, including when NetworkManager uses IWD as its Wi-Fi backend.
  • Document the new behavior and config key.

Behavior

  • Host with neither service: one warning, no retry storm, and ashell picks up a backend if one appears later.
  • Host with one service: normal initialization.
  • network_backend = "disabled": no D-Bus probing or subscription, useful on WSL/systemd-networkd hosts.
  • Config reload to disabled clears the current service and ignores late service events.

Refs #911, #881.

@github-actions github-actions Bot added the bug Something isn't working label Nov 12, 2026

@MalpenZibo MalpenZibo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor thing

Comment thread src/config.rs
Comment on lines +673 to +674
#[derive(Deserialize, Copy, Clone, Default, PartialEq, Eq, Debug)]
pub enum NetworkBackend {

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we would like to accept auto (lowercase) as value we should place #[serde(rename_all = "lowercase")].

Also, we could use disabled instead of renaming to none.

About the lowercase vs PascalCase. We currently have different styles. Some property are in lowercase other in PascalCase.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done and fixed the map_or clippy stuff

@MalpenZibo MalpenZibo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@MalpenZibo
MalpenZibo merged commit 74d09d6 into MalpenZibo:main Nov 13, 2026
7 checks passed
@romanstingler
romanstingler deleted the fix/network-backend-probe branch November 13, 2026 09:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants