Bug 1549107 - don't restart openvswitch if --no-activate is specified
Summary: don't restart openvswitch if --no-activate is specified
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: os-net-config
Version: 11.0 (Ocata)
Hardware: x86_64
OS: Linux
high
high
Target Milestone: z5
: 11.0 (Ocata)
Assignee: zenghui.shi
QA Contact: Shai Revivo
URL:
Whiteboard:
Depends On: 1549102
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-02-26 12:15 UTC by zenghui.shi
Modified: 2018-05-18 17:09 UTC (History)
9 users (show)

Fixed In Version: os-net-config-6.1.4-2.el7ost
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1549102
: 1572667 1572668 (view as bug list)
Environment:
Last Closed: 2018-05-18 17:08:29 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
OpenStack gerrit 564663 None MERGED ifcfg: don't restart ovs if --no-activate is specified 2020-07-01 03:42:37 UTC
Red Hat Product Errata RHBA-2018:1622 None None None 2018-05-18 17:09:49 UTC

Description zenghui.shi 2018-02-26 12:15:40 UTC
+++ This bug was initially created as a clone of Bug #1549102 +++

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 2 Bob Fournier 2018-04-17 14:45:53 UTC
Zenghui - it doesn't look like the fix https://review.openstack.org/#/c/548006/ has been backported to stable/ocata. Can you please backport it?

Comment 11 zenghui.shi 2018-05-10 06:47:28 UTC
Set status to verified based on the following tests:

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

[root@overcloud-compute-1 ~]# rpm -qa | grep os-net-config
os-net-config-6.1.4-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-1 ~]# 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

4) 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-1 ~]# os-net-config --no-activate -c /etc/os-net-config/config.json -v --detailed-exit-codes
[2018/05/10 06:40:38 AM] [INFO] Using config file at: /etc/os-net-config/config.json
[2018/05/10 06:40:38 AM] [INFO] Using mapping file at: /etc/os-net-config/mapping.yaml
[2018/05/10 06:40:38 AM] [INFO] Ifcfg net config provider created.
[2018/05/10 06:40:38 AM] [INFO] nic2 mapped to: p5p1
[2018/05/10 06:40:38 AM] [INFO] nic3 mapped to: p5p2
[2018/05/10 06:40:38 AM] [INFO] nic1 mapped to: em1
[2018/05/10 06:40:38 AM] [INFO] adding bridge: br-isolation
[2018/05/10 06:40:38 AM] [WARNING] ifcfg format supports a max of 2 dns servers.
[2018/05/10 06:40:38 AM] [INFO] adding custom route for interface: br-isolation
[2018/05/10 06:40:38 AM] [INFO] adding interface: p5p1
[2018/05/10 06:40:38 AM] [INFO] adding vlan: vlan201
[2018/05/10 06:40:38 AM] [INFO] adding vlan: vlan203
[2018/05/10 06:40:38 AM] [INFO] adding vlan: vlan202
[2018/05/10 06:40:38 AM] [INFO] adding interface: em1
[2018/05/10 06:40:38 AM] [WARNING] ifcfg format supports a max of 2 dns servers.
[2018/05/10 06:40:38 AM] [INFO] adding custom route for interface: em1
[2018/05/10 06:40:38 AM] [INFO] adding ovs user bridge: br-link
[2018/05/10 06:40:38 AM] [INFO] adding ovs dpdk port: dpdk0
[2018/05/10 06:40:38 AM] [INFO] applying network configs...
[2018/05/10 06:40:38 AM] [INFO] No changes required for interface: p5p1
[2018/05/10 06:40:38 AM] [INFO] No changes required for interface: em1
[2018/05/10 06:40:38 AM] [INFO] No changes required for vlan interface: vlan201
[2018/05/10 06:40:38 AM] [INFO] No changes required for vlan interface: vlan202
[2018/05/10 06:40:38 AM] [INFO] No changes required for vlan interface: vlan203
[2018/05/10 06:40:38 AM] [INFO] No changes required for bridge: br-link
[2018/05/10 06:40:38 AM] [INFO] No changes required for bridge: br-isolation
[2018/05/10 06:40:38 AM] [INFO] Writing config /etc/sysconfig/network-scripts/route6-dpdk0
[2018/05/10 06:40:38 AM] [INFO] Writing config /etc/sysconfig/network-scripts/route-dpdk0
[2018/05/10 06:40:38 AM] [INFO] Writing config /etc/sysconfig/network-scripts/ifcfg-dpdk0

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

newly generated ifcfg-dpdk0 as below:

[root@overcloud-compute-1 ~]# 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"

meanwhile, the ping test continue work between the two VMs.
there is no 'Restart openvswitch' in the output log when running os-net-config cmd.

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

7) run os-net-config without --no-activate  (os-net-config  -c /etc/os-net-config/config.json -v --detailed-exit-codes)

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

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


there is a "Restart openvswitch" in the output log
ping test was interrupted for a while due to openvswitch restart, then resumed as dpdk VMs are created with vhostuserclient mode is osp11.

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

Comment 14 errata-xmlrpc 2018-05-18 17:08:29 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:1622


Note You need to log in before you can comment on or make changes to this bug.