~netplan-developers/netplan/+git/netplan:slyon/fix-integration-tests

Last commit made on 2021-06-14
Get this branch:
git clone -b slyon/fix-integration-tests https://git.launchpad.net/~netplan-developers/netplan/+git/netplan

Branch merges

Branch information

Name:
slyon/fix-integration-tests
Repository:
lp:~netplan-developers/netplan/+git/netplan

Recent commits

5364717... by Lukas Märdian

Merge branch 'master' into slyon/fix-integration-tests

dafe0a9... by Lukas Märdian

Improve subprocess calls to binaries in /sbin + udevadm (#205)

In modern systems /sbin is a symlink to /usr/sbin, we should not be calling /sbin/netplan directly (neither /usr/sbin/netplan), but make use of the SBINDIR build time variable.

Furthermore, the /sbin/udevadm -> /bin/udevadm is not shipped by systemd-udev anymore since Focal, so we should be calling the real binary at /bin/udevadm instead.

COMMITS:
* generate: the /sbin/udevadm is no more since Focal
* openvswitch:util: use SBINDIR for path to /usr/sbin/netplan

f933369... by Khem Raj

Handle enum element override (#213)

NETPLAN_DEF_TYPE_VIRTUAL and NETPLAN_DEF_TYPE_BRIDGE point
to same value in enum, however here they are assigned individually
which results in overriding the initialization of the objects

Fixes
src/netplan.h:85:33: error: initializer overrides prior initialization of this subobject [-Werror,-Winitializer-overrides]
    [NETPLAN_DEF_TYPE_BRIDGE] = "bridges",
                                ^~~~~~~~~

Signed-off-by: Khem Raj <email address hidden>

a8c8564... by Łukasz Zemczak

Add support for the activation-mode parameter (LP: #1664844) (#171)

Per an existing specification, add the activation-mode parameter which currently supports the 'off' and 'manual' modes. This allows administrators either force a given interface to be always in the down state ('off', only for networkd right now) or allow the user to manually manage the state ('manual'). This means that a 'manual' interface will only be up/down if the user does that explicitly.

The main target is the networkd backend, but we try supporting at least the manual setting for NetworkManager. The networkd support for this has now been merged into v248 (which is still not released as of this writing).

https://bugs.launchpad.net/netplan/+bug/1664844

COMMITS:
* Add support for the activation-mode parameter, used for specifying the interface administration policy.
* Add feature flag, clarify some documentation/comments.
* Update src/nm.c
Co-authored-by: Lukas Märdian <email address hidden>
* Update doc/netplan.md
Co-authored-by: Lukas Märdian <email address hidden>
* Update src/networkd.c
Co-authored-by: Lukas Märdian <email address hidden>
* Move the new activation_mode struct member to the end of the struct and bump the netplan minimum version for the feature.
* Update src/nm.c
Co-authored-by: Lukas Märdian <email address hidden>

833952e... by Lukas Märdian

Fix ABI regression LP: #1922898 FR-1273 (#206)

In libnetplan v0.102 we introduced a regression, by breaking the ABI compatibility with netplan.io v0.101 (https://pad.lv/1922898)
This happened by introducing two new settings to the NetplanNetDefinition struct (char* filename and guint tunnel.ttl), modifying the memory layout, thus breaking applications linked against older versions of libnetplan0.

For char* filename, we can fix the problem by moving the new field to the end of the NetplanNetDefinition struct, thus not modifying the existing data layout, but only appending to it for the newer version.

For guint netdef->tunnels.ttl we cannot easily fix the problem easily, as this is a struct inside a struct and there seems to be only one byte left (at least on x86_64) before we hit the memory boundary, while this new guint field needs 4 bytes. So we rename that field as tunnel_ttl and append it to the end of the net_definition struct.

COMMITS:
* Revert "Added TTL option for tunnels (LP: #1846783) (#194)"
This reverts commit 6c8ed65df7c7f31280d5d27b67195a1e9a746e7a.
* parse.h: move new 'filename' pointer to the end to avoid changes in the memory layout
* Revert "Revert "Added TTL option for tunnels (LP: #1846783) (#194)""
This reverts commit 97d7d35704f3c3b80ba63e4f054fd8ac6303ba37.
* parse: fix ABI compatibility with tunnel.ttl
* doc: update tunnel_ttl documentation

dd4db6b... by Lukas Märdian

cli: SNAP special handling: improve test coverage and error handling (#209)

Improve test coverage and handle additional error cases.

This is a follow-up for #208 wrt. snapcore/snapd#10212

2eafea3... by Lukas Märdian

dbus:cli: implement io.netplan.Netplan.Generate() (#208)

Proxy the 'netplan generate' CLI via DBus, if called from within a snap,
to work around the strict AppArmor confinement.

see: snapcore/snapd#10212

COMMITS:
* dbus:cli: implement io.netplan.Netplan.Generate()
Proxy the 'netplan generate' CLI via DBus, if called from within a snap,
to work around the strict AppArmor confinement.
see: https://github.com/snapcore/snapd/pull/10212
* doc: mention Netplan.Generate() DBus method

da3fab1... by Lukas Märdian

cli:set: Fix netplan-set on Core20 (#207)

Using os.replace() leads to "Invalid cross-device link" errors on Core20 setups, due to having different mounts.
Use shutil.copy2() & os.remove() instead.

* cli:set: Fix netplan-set on Core20
* cli:set: use shutil.copy2()

9e76e80... by Lukas Märdian

nm: ignore interfaces by name and MAC, if both are given

Some interfaces, matched by MAC, could change their MAC address after
assignment (e.g. a bond member), thus NM would not ignore this interface
anymore, even if it is also matched by interface-name.

a42fc2f... by Peter MacKinnon

Fix parsing of OVS values with colons (LP: #1913906) (#203)

Fixes the parse error for dict values that include ":"

COMMITS:
* Fix parsing of values with colons
* Update test_ovs.py
Fix pycodestyle pipeline
* Update ovs.py
One more pycodestyle error
* Update test_ovs.py
Add raw string to cure PEP8 fail
* tests:ovs: improve coverage for colon values

Co-authored-by: Pete MacKinnon <email address hidden>
Co-authored-by: Lukas Märdian <email address hidden>