Skip to content

Conversation

slyon
Copy link
Collaborator

@slyon slyon commented Jun 26, 2025

Description

Spec: FO165 – Netplan generator architecture

Initial testing of systemd sandbox:

make clean && make
LD_LIBRARY_PATH=_build/src NETPLAN_DBUS_CMD=_build/dbus/netplan-dbus NETPLAN_GENERATE_PATH=$(pwd)/_build/src/generate G_DEBUG=fatal_criticals PYTHONPATH=_build/python-cffi:. pytest -s -v tests/generator/test_sd-generator.py

Checklist

  • Runs make check successfully.
  • Retains code coverage (make check-coverage).
  • New/changed keys in YAML format are documented.
  • (Optional) Adds example YAML for new feature.
  • (Optional) Closes an open bug in Launchpad. LP#2071747

This should also fix https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/2083129 by not re-generating NM configuration on the fly.

@slyon slyon force-pushed the generator-split-sd-1997 branch 8 times, most recently from 8287a28 to 9105838 Compare July 7, 2025 14:34
@slyon slyon force-pushed the generator-split-sd-1997 branch 2 times, most recently from 15db9ad to 320629c Compare July 8, 2025 14:29
@slyon
Copy link
Collaborator Author

slyon commented Jul 10, 2025

FIXME: call generate using the full generator path and/or usr/libexec/netplan/configure binary.

Setting up libnetplan1:amd64 (1.1.2-7+DEV) ...
Setting up python3-netplan (1.1.2-7+DEV) ...
Setting up netplan-generator (1.1.2-7+DEV) ...
Removing 'diversion of /lib/systemd/system-generators/netplan to /lib/systemd/system-generators/netplan.usr-is-merged by netplan-generator'
Bail out! ERROR:../src/gen-openvswitch.c:533:_netplan_state_finish_sd_ovs_write: assertion failed: (generator_dir != NULL)
WARNING: Netplan could not re-generate network configuration. Please run 'netplan generate' to see details.
Created symlink '/etc/systemd/system/sysinit.target.wants/netplan-configure.service' → '/usr/lib/systemd/system/netplan-configure.service'.
Setting up netplan.io (1.1.2-7+DEV) ...

@slyon slyon force-pushed the generator-split-sd-1997 branch from 320629c to 4f36a61 Compare July 10, 2025 14:41
./generate being the systemd-generator in /usr/lib/systemd/system-generators/
producing systemd service units exclusively

./configure being a normal Netplan service binary, producing backend configs
(e.g. for NM, sd-networkd, udev, ...)
…/configure

Run using:
LD_LIBRARY_PATH=_build/src NETPLAN_DBUS_CMD=_build/dbus/netplan-dbus NETPLAN_GENERATE_PATH=$(pwd)/_build/src/generate G_DEBUG=fatal_criticals PYTHONPATH=_build/python-cffi:. pytest -s -v tests/generator/test_sd-generator.py
@slyon slyon force-pushed the generator-split-sd-1997 branch from 4f36a61 to 6e4c640 Compare September 15, 2025 12:41
@slyon slyon force-pushed the generator-split-sd-1997 branch 3 times, most recently from 87ff9b8 to b507c0d Compare September 15, 2025 15:28
@slyon slyon force-pushed the generator-split-sd-1997 branch from b507c0d to d2bd8a8 Compare September 16, 2025 11:32
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.

1 participant