Bug 1549102

Summary: don't restart openvswitch if --no-activate is specified
Product: Red Hat OpenStack Reporter: zenghui.shi <zshi>
Component: os-net-configAssignee: zenghui.shi <zshi>
Status: CLOSED ERRATA QA Contact: Yariv <yrachman>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 10.0 (Newton)CC: bfournie, hbrock, jslagle, mburns, mcornea, rhel-osp-director-maint, skramaja, yroblamo
Target Milestone: z8Keywords: Regression, Triaged, ZStream
Target Release: 10.0 (Newton)   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: os-net-config-5.2.3-2.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1549107 (view as bug list) Environment:
Last Closed: 2018-05-17 15:48:40 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1549107    

Description zenghui.shi 2018-02-26 12:09:48 UTC
Description of problem:

there is a special case for os-net-config update during newton minor update process which will upgrade os-net-config package if needed and re-run os-net-config configuration with following cmd:

# os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes

this cmd (with --no-activate specified) is intended to not restart any of network interfaces and ovs which may cause network interruption, but in a dpdk environment, when dpdk port config file(ifcfg-dpdkx) is changed, it will cause restart of openvswitch service.

the solution is to check activate state before doing openvswitch restart so that with --no-activate specified, it won;t restart ovs.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 zenghui.shi 2018-02-27 00:49:12 UTC
upstream bug: https://bugs.launchpad.net/tripleo/+bug/1751955

Comment 3 Bob Fournier 2018-03-28 14:22:49 UTC
Changing QA contact to nfvqe after discussion with Zenghui.

Comment 12 zenghui.shi 2018-05-10 02:09:05 UTC
Set status to verified based on the following tests:

1) Deploy osp10 ovs-dpdk environment(3ctl + 2com) with latest puddle which contains the fixed package version :os-net-config-5.2.3-2.el7ost.noarch

[root@overcloud-compute-0 ~]# rpm -qa | grep os-net-config
os-net-config-5.2.3-2.el7ost.noarch

2) Create dpdk VM on each compute node, run ping test between VMs

3) Manually modify the ifcfg-dpdk0 config file (remove the OVS_EXTRA config)

[root@overcloud-compute-0 ~]# cat /etc/sysconfig/network-scripts/ifcfg-dpdk0 
# This file is autogenerated by os-net-config
DEVICE=dpdk0
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
PEERDNS=no
DEVICETYPE=ovs
TYPE=OVSDPDKPort
OVS_BRIDGE=br-link

3) Manually run os-net-config cmd (os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes)

[root@overcloud-compute-0 ~]# os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes
[2018/05/10 01:55:51 AM] [INFO] Using config file at: /etc/os-net-config/config.json
[2018/05/10 01:55:51 AM] [INFO] Using mapping file at: /etc/os-net-config/mapping.yaml
[2018/05/10 01:55:51 AM] [INFO] Ifcfg net config provider created.
[2018/05/10 01:55:51 AM] [INFO] nic2 mapped to: p5p1
[2018/05/10 01:55:51 AM] [INFO] nic3 mapped to: p5p2
[2018/05/10 01:55:51 AM] [INFO] nic1 mapped to: em1
[2018/05/10 01:55:51 AM] [INFO] adding bridge: br-isolation
[2018/05/10 01:55:51 AM] [WARNING] ifcfg format supports a max of 2 dns servers.
[2018/05/10 01:55:51 AM] [INFO] adding custom route for interface: br-isolation
[2018/05/10 01:55:51 AM] [INFO] adding interface: p5p1
[2018/05/10 01:55:51 AM] [INFO] adding vlan: vlan201
[2018/05/10 01:55:51 AM] [INFO] adding vlan: vlan203
[2018/05/10 01:55:51 AM] [INFO] adding vlan: vlan202
[2018/05/10 01:55:51 AM] [INFO] adding interface: em1
[2018/05/10 01:55:51 AM] [WARNING] ifcfg format supports a max of 2 dns servers.
[2018/05/10 01:55:51 AM] [INFO] adding custom route for interface: em1
[2018/05/10 01:55:51 AM] [INFO] adding ovs user bridge: br-link
[2018/05/10 01:55:51 AM] [INFO] adding ovs dpdk port: dpdk0
[2018/05/10 01:55:51 AM] [INFO] applying network configs...
[2018/05/10 01:55:51 AM] [INFO] No changes required for interface: p5p1
[2018/05/10 01:55:51 AM] [INFO] No changes required for interface: em1
[2018/05/10 01:55:51 AM] [INFO] No changes required for vlan interface: vlan201
[2018/05/10 01:55:51 AM] [INFO] No changes required for vlan interface: vlan202
[2018/05/10 01:55:51 AM] [INFO] No changes required for vlan interface: vlan203
[2018/05/10 01:55:51 AM] [INFO] No changes required for bridge: br-link
[2018/05/10 01:55:51 AM] [INFO] No changes required for bridge: br-isolation
[2018/05/10 01:55:51 AM] [INFO] Writing config /etc/sysconfig/network-scripts/route6-dpdk0
[2018/05/10 01:55:51 AM] [INFO] Writing config /etc/sysconfig/network-scripts/route-dpdk0
[2018/05/10 01:55:51 AM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-dpdk0

4) Check the newly generated ifcfg-dpdk0 file and ping tests between VMs

the ifcfg-dpdk0 file is changed and have the OVS_EXTRA config added after running above os-net-config cmd.

[root@overcloud-compute-0 ~]# cat /etc/sysconfig/network-scripts/ifcfg-dpdk0 
# This file is autogenerated by os-net-config
DEVICE=dpdk0
ONBOOT=yes
HOTPLUG=no
NM_CONTROLLED=no
PEERDNS=no
DEVICETYPE=ovs
TYPE=OVSDPDKPort
OVS_BRIDGE=br-link
OVS_EXTRA="set Interface $DEVICE options:dpdk-devargs=0000:06:00.1"

there is no restart of openvswitch service, ping continue work between VMs
the output of os-net-config run doesn't contain "Restart openvswitch".

5) modify the ifcfg-dpdk0 config file to remove the OVS_EXTRA config again

6) run os-net-config without --no-activate

7) check the output of os-net-config and ping tests between VMs

[root@overcloud-compute-0 ~]# os-net-config  -c /etc/os-net-config/config.json -v --detailed-exit-codes
[2018/05/10 01:56:17 AM] [INFO] Using config file at: /etc/os-net-config/config.json
[2018/05/10 01:56:17 AM] [INFO] Using mapping file at: /etc/os-net-config/mapping.yaml
[2018/05/10 01:56:17 AM] [INFO] Ifcfg net config provider created.
[2018/05/10 01:56:17 AM] [INFO] nic2 mapped to: p5p1
[2018/05/10 01:56:17 AM] [INFO] nic3 mapped to: p5p2
[2018/05/10 01:56:17 AM] [INFO] nic1 mapped to: em1
[2018/05/10 01:56:17 AM] [INFO] adding bridge: br-isolation
[2018/05/10 01:56:17 AM] [WARNING] ifcfg format supports a max of 2 dns servers.
[2018/05/10 01:56:17 AM] [INFO] adding custom route for interface: br-isolation
[2018/05/10 01:56:17 AM] [INFO] adding interface: p5p1
[2018/05/10 01:56:17 AM] [INFO] adding vlan: vlan201
[2018/05/10 01:56:17 AM] [INFO] adding vlan: vlan203
[2018/05/10 01:56:17 AM] [INFO] adding vlan: vlan202
[2018/05/10 01:56:17 AM] [INFO] adding interface: em1
[2018/05/10 01:56:17 AM] [WARNING] ifcfg format supports a max of 2 dns servers.
[2018/05/10 01:56:17 AM] [INFO] adding custom route for interface: em1
[2018/05/10 01:56:17 AM] [INFO] adding ovs user bridge: br-link
[2018/05/10 01:56:17 AM] [INFO] adding ovs dpdk port: dpdk0
[2018/05/10 01:56:17 AM] [INFO] applying network configs...
[2018/05/10 01:56:17 AM] [INFO] No changes required for interface: p5p1
[2018/05/10 01:56:17 AM] [INFO] No changes required for interface: em1
[2018/05/10 01:56:17 AM] [INFO] No changes required for vlan interface: vlan201
[2018/05/10 01:56:17 AM] [INFO] No changes required for vlan interface: vlan202
[2018/05/10 01:56:17 AM] [INFO] No changes required for vlan interface: vlan203
[2018/05/10 01:56:17 AM] [INFO] No changes required for bridge: br-link
[2018/05/10 01:56:17 AM] [INFO] No changes required for bridge: br-isolation
[2018/05/10 01:56:17 AM] [INFO] running ifdown on interface: dpdk0
[2018/05/10 01:56:17 AM] [INFO] Restart openvswitch
[2018/05/10 01:56:37 AM] [INFO] Writing config /etc/sysconfig/network-scripts/route6-dpdk0
[2018/05/10 01:56:37 AM] [INFO] Writing config /etc/sysconfig/network-scripts/route-dpdk0
[2018/05/10 01:56:37 AM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-dpdk0
[2018/05/10 01:56:37 AM] [INFO] running ifup on interface: dpdk0


there is a "Restart openvswitch" in the output log
ping tests between VMs termiated.

[root@overcloud-compute-0 ~]# rpm -qa | grep openvswitch
openvswitch-ovn-central-2.6.1-16.git20161206.el7ost.x86_64
python-openvswitch-2.6.1-16.git20161206.el7ost.noarch
openvswitch-ovn-common-2.6.1-16.git20161206.el7ost.x86_64
openstack-neutron-openvswitch-9.4.1-16.el7.noarch
openvswitch-2.6.1-16.git20161206.el7ost.x86_64
openvswitch-ovn-host-2.6.1-16.git20161206.el7ost.x86_64

Comment 15 errata-xmlrpc 2018-05-17 15:48:40 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2018:1597