Set probe macvlan ownership explicitly inside its target namespace
This commit is contained in:
@@ -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'])
|
||||
|
||||
Reference in New Issue
Block a user