Public bug reported:

With openvswitch 4.0.0-1 in stonking-proposed, the netplan.io "ovs"
autopkgtest fails in every run, which blocks openvswitch migration:

  FAIL: test_ovsdb_server_is_not_running 
(__main__.TestOVS.test_ovsdb_server_is_not_running)
    File ".../tests/integration/ovs.py", line 478, in 
test_ovsdb_server_is_not_running
      self.assertIn("OpenvSwitch database is not running", err)
  AssertionError: 'OpenvSwitch database is not running' not found in ''

Failing runs (amd64):
  
https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/n/netplan.io/20260922_145459_efa42@/log.gz
  
https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/n/netplan.io/20260924_192643_460c4@/log.gz
  
https://autopkgtest.ubuntu.com/results/autopkgtest-stonking/stonking/amd64/n/netplan.io/20260927_092923_bc791@/log.gz
migration-reference/0 passes.

[Cause]

OVS 4.0.0 ships ovsdb-server.socket, so ovsdb-server is started on
demand (socket activation). The test only stops ovsdb-server.service:

  Stopping 'ovsdb-server.service', but its triggering units are still active:
  ovsdb-server.socket

Netplan's _ovs_active() check runs "ovs-vsctl show", which connects to the
socket, so systemd starts ovsdb-server again. Netplan never sees the DB as
down, and the expected error message never appears.

This is a test problem, not a netplan bug: netplan doesn't crash, and it
still works correctly.

Side note on behaviour: with OVS >= 4.0, if an admin stops only
ovsdb-server.service, "netplan apply" now starts the DB again (through the
socket) instead of reporting "OpenvSwitch database is not running". That
seems acceptable, but it's worth a look (as the upstream commit message
also suggests).

[Fix]

Already fixed upstream (not in a release yet, latest is 1.2.2):

  commit 14780cf6b2277ceb066a3cdbfee5523de8c3d1d4
  "tests/integration: fix ovsdb-server test on OVS 4.0.0+ (#613)"
  https://github.com/canonical/netplan/pull/613

The fix also stops ovsdb-server.socket in the test and restarts it during
cleanup. It still works with older OVS releases that don't have the unit.

[Proposed resolution]

Cherry-pick 14780cf into netplan.io in stonking as a d/patches entry, then
upload it and trigger the tests with openvswitch/4.0.0-1 (together with the
netplan.io upload).

Debian: sid already has openvswitch 4.0.0-2 and netplan.io 1.2.2-2, without
the fix. Debian CI is green only because the "ovs" test is skipped there:
openvswitch-switch.service is inactive in the debci testbed, so the test
exits 77 (skippable). For example, debci unstable/arm64 on 2026-09-26:

  test ovs: (systemctl is-active openvswitch-switch.service || exit 77) && ...
  inactive
  ovs                  SKIP exit status 77 and marked as skippable

The test code is the same, so it will fail in Debian as soon as OVS
runs there. The patch should be forwarded to Debian too.

** Affects: netplan.io (Ubuntu)
     Importance: Undecided
         Status: New

** Affects: openvswitch (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: stonking update-excuse

** Also affects: openvswitch (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/2168838

Title:
  netplan.io autopkgtest "ovs" fails with openvswitch 4.0.0:
  test_ovsdb_server_is_not_running (ovsdb-server.socket reactivates DB)

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/2168838/+subscriptions


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

Reply via email to