Bug 1378501

Summary: [fdBeta] OVS fails if SSSE3 is not supported
Product: Red Hat Enterprise Linux 7 Reporter: Flavio Leitner <fleitner>
Component: openvswitchAssignee: Flavio Leitner <fleitner>
Status: CLOSED CURRENTRELEASE QA Contact: Christian Trautman <ctrautma>
Severity: high Docs Contact:
Priority: high    
Version: 7.3CC: abradshaw, akarlsso, aloughla, alukiano, atragler, ctrautma, danken, dhill, fleitner, gveitmic, jjung, jraju, mkalinin, pablo.iranzo, pmdyermms, qding, sasha, sukulkar, tony, tshefi, ylavi
Target Milestone: rcKeywords: Reopened
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: openvswitch-2.5.0-17.git20160727.el7fdb Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1397048 (view as bug list) Environment:
Last Closed: 2017-02-10 16:31:04 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: 1396161, 1396389, 1397048    

Description Flavio Leitner 2016-09-22 14:58:50 UTC
Description of problem:

The unified package includes statically linked DPDK.

There is only one openvswitch package with minimum support set to core2.

The core2 includes support for ssse3 instruction set.

DPDK includes a runtime check that runs when the library is loaded (i.e. before main() function) and if SSSE3 instruction set isn't available, ovs-vswitchd will fail to run.

So, the unified package requires a minimum system/cpu features regardless if DPDK is used or not. 

Version-Release number of selected component (if applicable):
openvswitch-2.5.0-10.git20160727.el7fdb.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Reserve a system without SSSE3 instruction set support
2. Install the unified package openvswitch-2.5.0-10.git20160727.el7fdb.x86_64
3. Run ovs-vswitchd.

Actual results:
[root@localhost ~]# ovs-vswitchd --version 
ERROR: This system does not support "SSSE3".
Please check that RTE_MACHINE is set correctly.
[root@localhost ~]# echo $?
1

CPU flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx rdtscp lm constant_tsc rep_good nopl eagerfpu pni pclmulqdq cx16 sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm arat fsgsbase smep erms xsaveopt

Expected results:
Non-DPDK users to run OVS regardless of SSSE3 instruction set support.

Comment 2 Flavio Leitner 2016-09-22 19:42:31 UTC
Based on quick search:

SSE3 is supported by Intel Pentium 4 processors (“Prescott”), AMD Athlon 64 (“revision E”), AMD Phenom, and later processors. This means most, but not quite all, x64 capable CPUs should support SSE3.

Supplemental SSE3 (SSSE3) is supported by Intel Core 2 Duo, Intel Core i7/i5/i3, Intel Atom, AMD Bulldozer, and later processors.

Comment 3 Flavio Leitner 2016-09-29 14:22:37 UTC
Patch posted upstream:
http://dpdk.org/ml/archives/dev/2016-September/047436.html

Comment 4 David Hill 2016-10-04 22:44:47 UTC
DPDK requires SSSE3 according to the digging I've made.   The problem we have is that if someone is building a lab on older hardware that doesn't have that CPU instruction set, what will happen?

Comment 5 Flavio Leitner 2016-10-05 14:17:08 UTC
The same OVS is capable of running using DPDK or not.  You're correct about DPDK requiring SSSE3 support.

What happens before the patch is that every user of OVS (using DPDK or not) needs to have SSSE3 support and that's bad.

After the patch, only OVS users that enable DPDK will see the SSSE3 requirement. So, OVS users that don't need DPDK will not see the SSSE3 requirement anymore.

Comment 6 Flavio Leitner 2016-10-05 14:19:31 UTC
Patch accepted upstream:
http://dpdk.org/browse/dpdk/commit/?id=4757d06634070e0a60c5984919078adc36b1c514

Comment 8 Flavio Leitner 2016-10-18 18:45:08 UTC
# rpm -Uvh openvswitch-2.5.0-17.git20160727.el7.x86_64.rpm 
Preparing...                          ################################# [100%]
Updating / installing...
   1:openvswitch-1:2.5.0-17.git2016072################################# [ 50%]
Cleaning up / removing...
   2:openvswitch-1:2.5.0-13.git2016072################################# [100%]


Non-DPDK case wprks now:

# systemctl status -l openvswitch-nonetwork
● openvswitch-nonetwork.service - Open vSwitch Internal Unit
   Loaded: loaded (/usr/lib/systemd/system/openvswitch-nonetwork.service; static; vendor preset: disabled)
   Active: active (exited) since Tue 2016-10-18 16:12:56 BRST; 22s ago
  Process: 2253 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start --system-id=random $OPTIONS (code=exited, status=0/SUCCESS)
 Main PID: 2253 (code=exited, status=0/SUCCESS)
   CGroup: /system.slice/openvswitch-nonetwork.service
           ├─2269 ovsdb-server: monitoring pid 2270 (healthy)                                                                                                                                                                                                                                                                                                                                                         
           ├─2270 ovsdb-server /etc/openvswitch/conf.db -vconsole:emer -vsyslog:err -vfile:info --remote=punix:/var/run/openvswitch/db.sock --private-key=db:Open_vSwitch,SSL,private_key --certificate=db:Open_vSwitch,SSL,certificate --bootstrap-ca-cert=db:Open_vSwitch,SSL,ca_cert --no-chdir --log-file=/var/log/openvswitch/ovsdb-server.log --pidfile=/var/run/openvswitch/ovsdb-server.pid --detach --monitor
           ├─2279 ovs-vswitchd: monitoring pid 2280 (healthy)                                                                                                                                                                                     
           └─2280 ovs-vswitchd unix:/var/run/openvswitch/db.sock -vconsole:emer -vsyslog:err -vfile:info --mlockall --no-chdir --log-file=/var/log/openvswitch/ovs-vswitchd.log --pidfile=/var/run/openvswitch/ovs-vswitchd.pid --detach --monitor

Oct 18 16:12:56 localhost.localdomain systemd[1]: Starting Open vSwitch Internal Unit...
Oct 18 16:12:56 localhost.localdomain ovs-ctl[2253]: Starting ovsdb-server [  OK  ]
Oct 18 16:12:56 localhost.localdomain ovs-vsctl[2271]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait -- init -- set Open_vSwitch . db-version=7.12.1
Oct 18 16:12:56 localhost.localdomain ovs-vsctl[2276]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=2.5.0 "external-ids:system-id=\"b51e7be2-357a-4b80-877d-6ba163eb2ff9\"" "system-type=\"unknown\"" "system-version=\"unknown\""
Oct 18 16:12:56 localhost.localdomain ovs-ctl[2253]: Configuring Open vSwitch system IDs [  OK  ]
Oct 18 16:12:56 localhost.localdomain ovs-ctl[2253]: Starting ovs-vswitchd [  OK  ]
Oct 18 16:12:56 localhost.localdomain ovs-ctl[2253]: Enabling remote OVSDB managers [  OK  ]
Oct 18 16:12:56 localhost.localdomain systemd[1]: Started Open vSwitch Internal Unit.



DPDK case:
# grep -i dpdk /etc/sysconfig/openvswitch 
DPDK_OPTIONS="--dpdk -c 0x2"

# systemctl restart openvswitch 
[root@localhost ~]# systemctl status -l openvswitch-nonetwork | grep ctl
  Process: 2302 ExecStop=/usr/share/openvswitch/scripts/ovs-ctl stop (code=exited, status=0/SUCCESS)
  Process: 2314 ExecStart=/usr/share/openvswitch/scripts/ovs-ctl start --system-id=random $OPTIONS (code=exited, status=0/SUCCESS)
  Oct 18 16:14:16 localhost.localdomain ovs-ctl[2314]: Starting ovsdb-server [  OK  ]
  Oct 18 16:14:16 localhost.localdomain ovs-vsctl[2332]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait -- init -- set Open_vSwitch . db-version=7.12.1
  Oct 18 16:14:16 localhost.localdomain ovs-vsctl[2337]: ovs|00001|vsctl|INFO|Called as ovs-vsctl --no-wait set Open_vSwitch . ovs-version=2.5.0 "external-ids:system-id=\"b51e7be2-357a-4b80-877d-6ba163eb2ff9\"" "system-type=\"unknown\"" "system-version=\"unknown\""
  Oct 18 16:14:16 localhost.localdomain ovs-ctl[2314]: Configuring Open vSwitch system IDs [  OK  ]
  Oct 18 16:14:16 localhost.localdomain ovs-ctl[2314]: Starting ovs-vswitchd 2016-10-18T18:14:16Z|00001|dpdk|INFO|No -vhost_sock_dir provided - defaulting to /var/run/openvswitch
> Oct 18 16:14:16 localhost.localdomain ovs-ctl[2314]: ERROR: This system does not support "SSSE3".
> Oct 18 16:14:16 localhost.localdomain ovs-ctl[2314]: Please check that RTE_MACHINE is set correctly.
> Oct 18 16:14:16 localhost.localdomain ovs-ctl[2314]: [FAILED]


The systemd services status will improve with the backports from upstream pending to be done (bug 1378135).

Comment 9 Tzach Shefi 2016-11-03 09:56:44 UTC
FYI I've run into this problem also:

Servers with an old AMD CPU 4170 HE - OPSD on virt, undercloud would fail to get an IP due to ovs switch failing to install/start.
 
Also on a VMware VM (5.5u3), packstack RHOS10 would fail to deploy/start openvswitch. 

With this fixed-in version openvswitch-2.5.0-17.git20160727.el7fdb openvswitch gets installed/starts-up fine onboth system.

Comment 17 pmdyermms 2016-11-10 20:20:30 UTC
I have a Dell PE-R715 with AMD Opteron 6176.   It also does not have ssse3 and gets this error.

# ovs-vswitchd --version 
ERROR: This system does not support "SSSE3".
Please check that RTE_MACHINE is set correctly.

# rpm -q openvswitch
openvswitch-2.5.0-14.git20160727.el7fdp.x86_64