On Mon, Jun 21, 2021 at 09:43:41AM +0200, Jan Tluka wrote:
This patch set fixes several problems with the movement of devices
between namespaces.
All devices are set to readonly cache mode on machine cleanup. This
resolves an issue when the RecipeRun results are inspected after it has
completed. For example when printing the DeviceCreateResult description
a query is sent to the LNST agents and a soft device may not exist
anymore which raises an exception.
A new dictionary of devices moved between namespaces is added to Machine
object that serves as a temporary cache of the devices for the time when
they are removed from a namespace and appear in the new namespace.
This resolves an issue with previous implementation when a duplicate
RemoteDevice was created in the Machine's device database. With the new
implementation the initial instance of the device is used.
A fix of the peer and peer_name properties of VethDevice is included.
These properties need to be implemented on the controller side in the
RemoteDevice class because of missing facility to get the peer device on
an LNST agent.
Finally, the IFLA_NEW_IFINDEX attribute is included in the notification
message since the ifindex of the moved device may change if there's
already a device with the same index in the namespace.
Jan Tluka (13):
Slave.NetTestSlave: fix set_dev_netns
RemoteDevice: return immediately from enable_readonly_cache if already
cached
Controller.Machine: add methods to set device readonly cache
Controller.Machine: set cacheonly mode for all devices on a machine
cleanup
Machine: remove commented out code
Device: handle unsupported features exceptions
Devices.VethDevice: peer property fixes
Controller.Machine: add _find_device_in_any_namespace
Devices.RemoteDevice: add peer property
Devices.RemoteDevice: add peer_name property
Slave.InterfaceManager: include IFLA_NEW_IFINDEX when a device is
moved to a net namespace
Controller.Machine: add cache for devices moved to a namespace
Controller.Machine: handle device namespace movement
lnst/Controller/Machine.py | 88 +++++++++++++++++++++++++++++++---
lnst/Devices/Device.py | 27 +++++++++--
lnst/Devices/RemoteDevice.py | 15 ++++++
lnst/Devices/VethDevice.py | 27 +++++------
lnst/Slave/InterfaceManager.py | 1 +
lnst/Slave/NetTestSlave.py | 2 -
6 files changed, 132 insertions(+), 28 deletions(-)
--
2.26.3
_______________________________________________
LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
Fedora Code of Conduct:
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...
Do not reply to spam on the list, report it:
https://pagure.io/fedora-infrastructure
looks ok.
pushed, thanks.
-Ondrej