Set probe macvlan ownership explicitly inside its target namespace

This commit is contained in:
omar
2026-09-25 17:59:40 +03:00
parent 1bbf542262
commit 95d11b54d4
+3
View File
@@ -348,6 +348,9 @@ class Probe:
run(['ip', 'link', 'add', 'link', self.broker_config['uplink_bridge'], 'name', target['interface'],
'netns', target['namespace'], 'alias', target['alias'], 'type', 'macvlan', 'mode', 'bridge'])
target['interface_created'] = True
# Kernel namespace creation can discard IFLA_IFALIAS from NEWLINK;
# assign it explicitly in the destination namespace before inspection.
run(prefix + ['ip', 'link', 'set', target['interface'], 'alias', target['alias']])
save(self.journal_path, self.journal)
ns_owned(self.journal, True)
run(prefix + ['ip', 'link', 'set', target['interface'], 'up'])