mirror of
https://github.com/systemd/systemd
synced 2024-07-21 10:17:21 +00:00
parent
ed7c45a8c8
commit
b448fc0a6f
|
@ -4,6 +4,3 @@ Name=bond199
|
|||
|
||||
[Network]
|
||||
IPv6AcceptRA=no
|
||||
|
||||
[Link]
|
||||
MACAddress=00:11:22:33:44:55
|
||||
|
|
|
@ -3871,7 +3871,7 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = check_output('ip -d link show bond199')
|
||||
print(output)
|
||||
self.assertRegex(output, 'active_slave dummy98')
|
||||
self.assertIn('active_slave dummy98', output)
|
||||
|
||||
def test_bond_primary_slave(self):
|
||||
copy_network_unit('23-primary-slave.network', '23-bond199.network', '25-bond-active-backup-slave.netdev', '12-dummy.netdev')
|
||||
|
@ -3880,8 +3880,20 @@ class NetworkdBondTests(unittest.TestCase, Utilities):
|
|||
|
||||
output = check_output('ip -d link show bond199')
|
||||
print(output)
|
||||
self.assertRegex(output, 'primary dummy98')
|
||||
self.assertIn('link/ether 00:11:22:33:44:55', output)
|
||||
self.assertIn('primary dummy98', output)
|
||||
|
||||
# for issue #25627
|
||||
mkdir_p(os.path.join(network_unit_dir, '23-bond199.network.d'))
|
||||
for mac in ['00:11:22:33:44:55', '00:11:22:33:44:56']:
|
||||
with open(os.path.join(network_unit_dir, '23-bond199.network.d/mac.conf'), mode='w', encoding='utf-8') as f:
|
||||
f.write(f'[Link]\nMACAddress={mac}\n')
|
||||
|
||||
networkctl_reload()
|
||||
self.wait_online(['dummy98:enslaved', 'bond199:degraded'])
|
||||
|
||||
output = check_output('ip -d link show bond199')
|
||||
print(output)
|
||||
self.assertIn(f'link/ether {mac}', output)
|
||||
|
||||
def test_bond_operstate(self):
|
||||
copy_network_unit('25-bond.netdev', '11-dummy.netdev', '12-dummy.netdev',
|
||||
|
|
Loading…
Reference in a new issue