Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix veth device move #368

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lnst/Agent/InterfaceManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ def remap_device(self, ifindex, clsname, args=[], kwargs={}):
except KeyError as e:
raise DeviceConfigError("%s is a mandatory argument" % e)
remapped_device._bulk_enabled = False
remapped_device._nl_link_update = {}
remapped_device.ifindex = ifindex
self.replace_dev(ifindex, remapped_device)
self.rescan_devices()
Expand Down
6 changes: 6 additions & 0 deletions lnst/Controller/Machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,12 @@ def remote_device_set_netns(self, dev, dst, src):
dev_args = dev._dev_args
dev_kwargs = dev._dev_kwargs

try:
if dev.peer_name:
dev_kwargs['peer_name'] = dev.peer_name
except AttributeError:
pass

self.rpc_call("remap_device",
dev.ifindex,
clsname=dev_clsname,
Expand Down
Loading