[Starlingx-discuss] OVS collectd interface/port state monitoring

Peters, Matt Matt.Peters at windriver.com
Thu Sep 19 19:00:07 UTC 2019


See inline (MP>)

From: "Xu, Chenjie" <chenjie.xu at intel.com>
Date: Thursday, September 19, 2019 at 8:05 AM
To: "Peters, Matt" <Matt.Peters at windriver.com>
Cc: "'starlingx-discuss at lists.starlingx.io'" <starlingx-discuss at lists.starlingx.io>, "Zhao, Forrest" <forrest.zhao at intel.com>, Ghada Khalil <Ghada.Khalil at windriver.com>
Subject: RE: [Starlingx-discuss] OVS collectd interface/port state monitoring

Hi Matt,
During my implementation, I have several questions as below:

1.       If a port is a bond, does the related bridge also has a name with format br-phy%index?
MP> Yes it does.  It would contain a bond port with the interfaces as members.


2.       If OVS-DPDK is used, is bond still supported?
MP> Yes.


3.       A bond may contain multiple interfaces. Do we have some restriction on the number of interfaces belonging to a same bond?
MP> The upper bound for DPDK is 32 (default).  However, practically speaking I have never seen anything more than 4.


4.       How can I get the root password in StarlingX. Because it has to be root to execute OVS commands.
MP> The collectd process runs as root and would therefore have sufficient privileges to read/write to the OVS socket.  BTW, you should not need to execute and parse the output from ovs-xxxctl commands.  You can use the Python API / library to interact with AVS from the collectd python plugin.
https://python-ovs-vsctl.readthedocs.io/en/latest/


5.       How to decide the code is running on OpenStack worker node or not.
MP> I would simplify the plugin check and just have it look for the existence of the OVS unix socket or fail gracefully if it can’t connect or collect information.  The alternative would be to dynamically load the plugin in /etc/collectd.d and have Puppet setup the configuration file dynamically (or via soft link).  I prefer the first option since it avoids a bunch of end-to-end configuration just to identify the presence of OVS or OVS-DPDK.


Best Regards,
Xu, Chenjie

From: Xu, Chenjie
Sent: Wednesday, September 18, 2019 11:28 AM
To: Peters, Matt <Matt.Peters at windriver.com>
Cc: starlingx-discuss at lists.starlingx.io; Zhao, Forrest <forrest.zhao at intel.com>; Khalil, Ghada <Ghada.Khalil at windriver.com>
Subject: RE: [Starlingx-discuss] OVS collectd interface/port state monitoring

Hi Matt,
Thank you for your information! I will submit a patch to implement this function.

Best Regards,
Xu, Chenjie

From: Peters, Matt [mailto:Matt.Peters at windriver.com]
Sent: Tuesday, September 17, 2019 9:32 PM
To: Xu, Chenjie <chenjie.xu at intel.com<mailto:chenjie.xu at intel.com>>
Cc: starlingx-discuss at lists.starlingx.io<mailto:starlingx-discuss at lists.starlingx.io>; Zhao, Forrest <forrest.zhao at intel.com<mailto:forrest.zhao at intel.com>>; Khalil, Ghada <Ghada.Khalil at windriver.com<mailto:Ghada.Khalil at windriver.com>>
Subject: Re: [Starlingx-discuss] OVS collectd interface/port state monitoring

Hi Chenjie,
Yes, the dump-ports-desc can be used to obtain the current port state and negotiated state with the peer.  This data will need to be mapped back to the data interface mapping of the host so that the appropriate alarms may be raised against the proper entity.

In addition, if the data interface is a bond, the following information will also have to be retrieved in order to obtain the full state of the bond interface, including LACP information (if applicable).

ovs-appctl bond/show
ovs-appctl lacp/show

Finally, the alarming behavior should be the following:

Data port is down and does not belong to a bond – Critical Alarm
Data port(s) down, but enabled port remains in bond – Major Alarm (degraded service)
All data ports down in a bond – Critical Alarm

From: "Xu, Chenjie" <chenjie.xu at intel.com<mailto:chenjie.xu at intel.com>>
Date: Monday, September 16, 2019 at 11:32 PM
To: "Peters, Matt" <Matt.Peters at windriver.com<mailto:Matt.Peters at windriver.com>>
Cc: "starlingx-discuss at lists.starlingx.io<mailto:starlingx-discuss at lists.starlingx.io>" <starlingx-discuss at lists.starlingx.io<mailto:starlingx-discuss at lists.starlingx.io>>, "Zhao, Forrest" <forrest.zhao at intel.com<mailto:forrest.zhao at intel.com>>, Ghada Khalil <Ghada.Khalil at windriver.com<mailto:Ghada.Khalil at windriver.com>>
Subject: [Starlingx-discuss] OVS collectd interface/port state monitoring


Hi Matt,
For task “OVS collectd interface/port state monitoring”, which parts should be monitored? For example: Bridge, Port.
https://storyboard.openstack.org/#!/story/2002948
https://bugs.launchpad.net/starlingx/+bug/1834512
Bridge "br-phy1"
        Port "br-phy1"
            Interface "br-phy1"
                type: internal
        Port "eth1"
            Interface "eth1"
                type: dpdk
                options: {dpdk-devargs="0000:18:00.1", n_rxq="1"}
        Port "lldp8a3c28ca-7f"
            Interface "lldp8a3c28ca-7f"
                type: internal

The command “ovs-ofctl dump-ports-desc $ovs_bridge” can be used with collectd for both OVS and OVS-DPDK. The link status for interfaces can be detected as below:
For OVS:
After pull the cabel:
controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy0
OFPST_PORT_DESC reply (xid=0x2):
1(enp51s0f3): addr:0c:c4:7a:ff:5f:ef
     config:     0
     state:      LINK_DOWN
     current:    COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     speed: 0 Mbps now, 1000 Mbps max
2(phy-br-phy0): addr:1a:0a:21:03:6a:1e
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max
LOCAL(br-phy0): addr:0c:c4:7a:ff:5f:ef
     config:     PORT_DOWN
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max
After plug in the cable:
controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy0
OFPST_PORT_DESC reply (xid=0x2):
1(enp51s0f3): addr:0c:c4:7a:ff:5f:ef
     config:     0
     state:      0
     current:    1GB-FD COPPER AUTO_NEG
     advertised: 10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     supported:  10MB-HD 10MB-FD 100MB-HD 100MB-FD 1GB-FD COPPER AUTO_NEG AUTO_PAUSE
     speed: 1000 Mbps now, 1000 Mbps max
2(phy-br-phy0): addr:1a:0a:21:03:6a:1e
     config:     0
     state:      0
     speed: 0 Mbps now, 0 Mbps max
LOCAL(br-phy0): addr:0c:c4:7a:ff:5f:ef
     config:     PORT_DOWN
     state:      LINK_DOWN
     speed: 0 Mbps now, 0 Mbps max

For OVS-DPDK:
After pull the cabel:
controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy1
OFPST_PORT_DESC reply (xid=0x2):
1(eth1): addr:3c:fd:fe:da:e8:85
     config:     0
     state:      LINK_DOWN
     current:    AUTO_NEG
     speed: 0 Mbps now, 0 Mbps max
2(lldp8a3c28ca-7f): addr:52:97:0b:a4:ef:23
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
LOCAL(br-phy1): addr:3c:fd:fe:da:e8:85
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
After plug in the cable:
controller-0:/home/sysadmin# ovs-ofctl dump-ports-desc br-phy1
OFPST_PORT_DESC reply (xid=0x2):
1(eth1): addr:3c:fd:fe:da:e8:85
     config:     0
     state:      0
     current:    10GB-FD AUTO_NEG
     speed: 10000 Mbps now, 0 Mbps max
2(lldp8a3c28ca-7f): addr:52:97:0b:a4:ef:23
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max
LOCAL(br-phy1): addr:3c:fd:fe:da:e8:85
     config:     0
     state:      0
     current:    10MB-FD COPPER
     speed: 10 Mbps now, 0 Mbps max

Best Regards,
Xu, Chenjie

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.starlingx.io/pipermail/starlingx-discuss/attachments/20190919/27d3fc93/attachment-0001.html>


More information about the Starlingx-discuss mailing list