Antoni Segura Puimedon has posted comments on this change.

Change subject: net: skip network restoration if its physical devs are missing
......................................................................


Patch Set 4: Verified+1

Ran the functional tests. Then created two networks

vdsClient -s 0 addNetwork bridge=foo nics=eth2
vdsClient -s 0 addNetwork bridge=bar bonding=bond13 nics=eth3,eth4

vdsClient -s 0 setSafeNetworkConfig

Then I edited /var/lib/vdsm/persistence/netconf/nets/foo:
    {"nic": "eth20", "bootproto": "dhcp", "defroute": "False", "bridged": 
"False"}
pointing the nic to eth20 which does not exist on the system.

I also edited /var/lib/vdsm/persistence/netconf/bonds/bond13:
    {"nics": ["eth3", "eth40"], "options": "mode=802.3ad miimon=150"}
pointing one slave to eth40, which does not exist on the system.

Then issued:
    reboot

After reboot, only ovirtmgmt and bar (with only eth3 as slave) are up:

    bondings = {'bond0': {'addr': '',
                              'bootproto4': 'none',
                              'cfg': {'BOOTPROTO': 'none'},
                              'gateway': '',
                              'hwaddr': '00:00:00:00:00:00',
                              'ipv4addrs': [],
                              'ipv6addrs': [],
                              'ipv6gateway': '::',
                              'mtu': '1500',
                              'netmask': '',
                              'opts': {},
                              'slaves': []},
                    'bond1': {'addr': '',
                              'cfg': {},
                              'hwaddr': '00:00:00:00:00:00',
                              'mtu': '1500',
                              'netmask': '',
                              'slaves': []},
                    'bond13': {'addr': '',
                               'bootproto4': 'none',
                               'cfg': {'BONDING_OPTS': 'mode=802.3ad 
miimon=150',
                                       'BOOTPROTO': 'none',
                                       'BRIDGE': 'bar',
                                       'DEVICE': 'bond13',
                                       'HOTPLUG': 'no',
                                       'NM_CONTROLLED': 'no',
                                       'ONBOOT': 'no'},
                               'gateway': '',
                               'hwaddr': '00:01:a4:ac:87:95',
                               'ipv4addrs': [],
                               'ipv6addrs': ['fe80::201:a4ff:feac:8795/64'],
                               'ipv6gateway': '::',
                               'mtu': '1500',
                               'netmask': '',
                               'opts': {'miimon': '150', 'mode': '4'},
                               'slaves': ['eth3']},
                    'bond2': {'addr': '',
                              'cfg': {},
                              'hwaddr': '00:00:00:00:00:00',
                              'mtu': '1500',
                              'netmask': '',
                              'slaves': []},
                    'bond3': {'addr': '',
                              'cfg': {},
                              'hwaddr': '00:00:00:00:00:00',
                              'mtu': '1500',
                              'netmask': '',
                              'slaves': []},
                    'bond4': {'addr': '',
                              'cfg': {},
                              'hwaddr': '00:00:00:00:00:00',
                              'mtu': '1500',
                              'netmask': '',
                              'slaves': []}}

 bridges = {'bar': {'addr': '',
                           'bootproto4': 'none',
                           'cfg': {'BOOTPROTO': 'none',
                                   'DEFROUTE': 'no',
                                   'DELAY': '0',
                                   'DEVICE': 'bar',
                                   'HOTPLUG': 'no',
                                   'NM_CONTROLLED': 'no',
                                   'ONBOOT': 'no',
                                   'STP': 'off',
                                   'TYPE': 'Bridge'},
                           'gateway': '',
                           'ipv4addrs': [],
                           'ipv6addrs': ['2620:52:0:223c:201:a4ff:feac:8795/64',
                                         'fe80::201:a4ff:feac:8795/64'],
                           'ipv6gateway': 'fe80:52:0:223c::3fe',
                           'mtu': '1500',
                           'netmask': '',
                           'opts': {'ageing_time': '29995',
                                    'bridge_id': '8000.0001a4ac8795',
                                    'forward_delay': '0',
                                    'gc_timer': '57',
                                    'group_addr': '1:80:c2:0:0:0',
                                    'hash_elasticity': '4',
                                    'hash_max': '512',
                                    'hello_time': '199',
                                    'hello_timer': '57',
                                    'max_age': '1999',
                                    'multicast_last_member_count': '2',
                                    'multicast_last_member_interval': '99',
                                    'multicast_membership_interval': '25996',
                                    'multicast_querier': '0',
                                    'multicast_querier_interval': '25496',
                                    'multicast_query_interval': '12498',
                                    'multicast_query_response_interval': '999',
                                    'multicast_router': '1',
                                    'multicast_snooping': '1',
                                    'multicast_startup_query_count': '2',
                                    'multicast_startup_query_interval': '3124',
                                    'priority': '32768',
                                    'root_id': '8000.0001a4ac8795',
                                    'root_path_cost': '0',
                                    'root_port': '0',
                                    'stp_state': '0',
                                    'tcn_timer': '0',
                                    'topology_change': '0',
                                    'topology_change_detected': '0',
                                    'topology_change_timer': '0'},
                           'ports': ['bond13'],
                           'stp': 'off'},
    
    'ovirtmgmt': {'addr': '10.34.60.80',
                                 'bootproto4': 'dhcp',
                                 'cfg': {'BOOTPROTO': 'dhcp',
                                         'DEFROUTE': 'yes',
                                         'DELAY': '0',
                                         'DEVICE': 'ovirtmgmt',
                                         'HOTPLUG': 'no',
                                         'NM_CONTROLLED': 'no',
                                         'ONBOOT': 'no',
                                         'STP': 'off',
                                         'TYPE': 'Bridge'},
                                 'gateway': '10.34.63.254',
                                 'ipv4addrs': ['10.34.60.80/22'],
                                 'ipv6addrs': 
['2620:52:0:223c:201:a4ff:feac:8702/64',
                                               'fe80::201:a4ff:feac:8702/64'],
                                 'ipv6gateway': 'fe80:52:0:223c::3fe',
                                 'mtu': '1500',
                                 'netmask': '255.255.252.0',
                                 'opts': {'ageing_time': '29995',
                                          'bridge_id': '8000.0001a4ac8702',
                                          'forward_delay': '0',
                                          'gc_timer': '57',
                                          'group_addr': '1:80:c2:0:0:0',
                                          'hash_elasticity': '4',
                                          'hash_max': '512',
                                          'hello_time': '199',
                                          'hello_timer': '57',
                                          'max_age': '1999',
                                          'multicast_last_member_count': '2',
                                          'multicast_last_member_interval': 
'99',
                                          'multicast_membership_interval': 
'25996',
                                          'multicast_querier': '0',
                                          'multicast_querier_interval': '25496',
                                          'multicast_query_interval': '12498',
                                          'multicast_query_response_interval': 
'999',
                                          'multicast_router': '1',
                                          'multicast_snooping': '1',
                                          'multicast_startup_query_count': '2',
                                          'multicast_startup_query_interval': 
'3124',
                                          'priority': '32768',
                                          'root_id': '8000.0001a4ac8702',
                                          'root_path_cost': '0',
                                          'root_port': '0',
                                          'stp_state': '0',
                                          'tcn_timer': '0',
                                          'topology_change': '0',
                                          'topology_change_detected': '0',
                                          'topology_change_timer': '0'},
                                 'ports': ['eth1'],

And in the supervdsm log:
202 MainThread::ERROR::2014-07-09 
23:58:01,059::vdsm-restore-net-config::100::root::(_filter_nets_bonds) Nic 
"eth20" required by network foo is missing. The network will not be configured

-- 
To view, visit http://gerrit.ovirt.org/29313
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I9f1370696f2398fe2c3cd9ad92424b126bcd4b7c
Gerrit-PatchSet: 4
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Antoni Segura Puimedon <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: OndÅ™ej Svoboda <[email protected]>
Gerrit-Reviewer: [email protected]
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to