Change in vdsm[master]: netinfo: improve which ipv4 addr is reported if there are mu...

asegurap at redhat.com asegurap at redhat.com
Thu Sep 25 15:33:12 UTC 2014


Antoni Segura Puimedon has posted comments on this change.

Change subject: netinfo: improve which ipv4 addr is reported if there are multiple primary
......................................................................


Patch Set 1:

Manual verification:

    In [4]: netinfo.get()['bridges']['ovirtmgmt']
    Out[4]: 
    {'addr': '10.34.63.169',   <-----------------------
     'bootproto4': 'dhcp',
     'cfg': {'BOOTPROTO': 'dhcp',
      'DEFROUTE': 'yes',
      'DELAY': '0',
      'DEVICE': 'ovirtmgmt',
      'HOTPLUG': 'no',
      'MTU': '1500',
      'NM_CONTROLLED': 'no',
      'ONBOOT': 'yes',
      'STP': 'off',
      'TYPE': 'Bridge'},
     'gateway': '10.34.63.254',   <-----------------------
     'ipv4addrs': ['10.34.63.169/22'],   <-----------------------
     'ipv6addrs': [],
     'ipv6gateway': '::',
     'mtu': '1500',
     'netmask': '255.255.252.0',   <-----------------------
     ...

Then  on a separate terminal do:
    dev-09 vdsm (b0dd8b0) # ip -4 a s dev ovirtmgmt
    12: ovirtmgmt: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
        inet 10.34.63.169/22 brd 10.34.63.255 scope global dynamic ovirtmgmt
           valid_lft 6303sec preferred_lft 6303sec
    dev-09 vdsm (b0dd8b0) # ip -4 addr add 192.168.211.2/24 dev ovirtmgmt
    dev-09 vdsm (b0dd8b0) # ip -4 a s dev ovirtmgmt
    12: ovirtmgmt: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
        inet 10.34.63.169/22 brd 10.34.63.255 scope global dynamic ovirtmgmt
           valid_lft 6266sec preferred_lft 6266sec
        inet 192.168.211.2/24 scope global ovirtmgmt
           valid_lft forever preferred_lft forever
    
And check what is reported now
    In [5]: netinfo.get()['bridges']['ovirtmgmt']
    Out[5]:
    {'addr': '10.34.63.169',   <-----------------------
     'bootproto4': 'dhcp',
     'cfg': {'BOOTPROTO': 'dhcp',
      'DEFROUTE': 'yes',
      'DELAY': '0',
      'DEVICE': 'ovirtmgmt',
      'HOTPLUG': 'no',
      'MTU': '1500',
      'NM_CONTROLLED': 'no',
      'ONBOOT': 'yes',
      'STP': 'off',
      'TYPE': 'Bridge'},
     'gateway': '10.34.63.254',   <-----------------------
     'ipv4addrs': ['10.34.63.169/22', '192.168.211.2/24'],   <-----------------------
     'ipv6addrs': [],
     'ipv6gateway': '::',
     'mtu': '1500',
     'netmask': '255.255.252.0',   <-----------------------

As can be seen, the ip on the subnet of the gateway is still reported as 'addr'

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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8666cfef5bd8ea63edf8979e501d4785db5f4893
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Petr Horáček <phoracek at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: No


More information about the vdsm-patches mailing list