network: introduce 'degraded-carrier' operstate to order all states
Previously, 'degraded' state is ambiguous for bonding or bridge master: 1. one or more slave interfaces does not have carrier, 2. no link local address is assigned to the master, 3. combination of the above two. This makes the above case 1 and 3 are in the new 'degraded-carrier' state, and makes 'degraded' state as all slaves are active but no link local address on master.
This commit is contained in:
@@ -1200,7 +1200,7 @@ class NetworkdNetWorkBondTests(unittest.TestCase, Utilities):
|
||||
|
||||
output = subprocess.check_output(['networkctl', 'status', 'bond99']).rstrip().decode('utf-8')
|
||||
print(output)
|
||||
self.assertRegex(output, 'State: degraded \(configured\)')
|
||||
self.assertRegex(output, 'State: degraded-carrier \(configured\)')
|
||||
|
||||
self.assertEqual(subprocess.call(['ip', 'link', 'set', 'dummy98', 'up']), 0)
|
||||
time.sleep(2)
|
||||
@@ -1313,7 +1313,7 @@ class NetworkdNetWorkBridgeTests(unittest.TestCase, Utilities):
|
||||
time.sleep(3)
|
||||
|
||||
output = subprocess.check_output(['networkctl', 'status', 'bridge99']).rstrip().decode('utf-8')
|
||||
self.assertRegex(output, 'State: degraded \(configured\)')
|
||||
self.assertRegex(output, 'State: degraded-carrier \(configured\)')
|
||||
|
||||
self.assertEqual(subprocess.call(['ip', 'link', 'del', 'dummy98']), 0)
|
||||
time.sleep(3)
|
||||
|
||||
Reference in New Issue
Block a user