Public bug reported:

[Impact]

When the dnsmasq of an `ipv4.method=shared` connection fails at startup
(for example "Address already in use", see the related bug below), the
device is reported as `activated` first and fails right after:

    device (enx0): state change: secondaries -> activated (reason 'none', 
managed-type: 'full')
    device (enx0): Activation: successful, device activated.
    dnsmasq-manager: dnsmasq exited with error: Network access problem (address 
in use, permissions) (2)
    device (enx0): state change: activated -> failed (reason 
'ip-config-unavailable', managed-type: 'full')
    policy: auto-activating connection 'shared' (...)

NetworkManager resets the autoconnect retry counter when a device
reaches `activated` (src/core/nm-policy.c, "Reset auto retries back to
default since connection was successful"), so
`connection.autoconnect-retries` never runs out. With the default
limit of 4 retries this produced 55785 failed activations in about 6.5
hours (about 2.4 per second), each one adding and removing the sharing
iptables rules and flooding the journal.

Seen with network-manager 1.54.3-2ubuntu3.2.

[Test Plan]

1. Keep another process bound to the shared address so the shared
   dnsmasq cannot start (the stale-dnsmasq bug linked below does this
   after a NetworkManager restart).
2. Leave the profile at the default `connection.autoconnect-retries=-1`.
3. Let the shared connection autoconnect and count
   `journalctl -u NetworkManager | grep -c "Activation: failed for connection"`.

Expected: activation stops after the retry limit. Actual: it never
stops.

[Other Info]

Upstream issue:
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/work_items/2081

Related Ubuntu bug (cause of the dnsmasq failure in this case): LP:
#2178314

** Affects: network-manager (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2178315

Title:
  Shared connection whose dnsmasq fails to start retries autoconnect
  forever

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2178315/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to