Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1607996

Summary: Following protocol 73 name change , neutron constants have to be updated too
Product: Red Hat OpenStack Reporter: David Hill <dhill>
Component: openstack-neutronAssignee: Brian Haley <bhaley>
Status: CLOSED EOL QA Contact: Toni Freger <tfreger>
Severity: medium Docs Contact:
Priority: medium    
Version: 11.0 (Ocata)CC: afariasa, amuller, bhaley, chrisw, dhill, mfuruta, pamadio, pmorey, sclewis, srevivo
Target Milestone: ---Keywords: Triaged, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-10.0.5-7.el7ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1654020 1654023 1654028 (view as bug list) Environment:
Last Closed: 2019-09-30 18:42:51 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: 1654020, 1654023, 1654028    

Description David Hill 2018-07-24 17:37:51 UTC
Description of problem:
Following protocol 73 name change , neutron constants have to be updated too


[root@undercloud-0-rhosp10 ~]# cat /etc/protocols  | grep 73
cphb    73      CPHB            # Computer Protocol Heart Beat

[dhill@otto neutron]$ grep -r rspf *
neutron/common/constants.py:                              '73': 'rspf',


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 3 Pierre Amadio 2018-07-26 07:06:28 UTC
Note that the same problem exist not only for protocol 73, but also for protocol 4 (ipv4 in /etc/protocols vs ipencap in constants.py) and probably for other protocol names.

Comment 4 David Hill 2018-07-26 12:25:55 UTC
Yes.  I've adapted my patch to actually load /etc/protocols on the system where it's installed.  That should solve half of these.

Comment 5 David Hill 2018-07-29 21:28:53 UTC
It looks like it's only those 2 that differs.  I've adapted my patch to populate the array from /etc/protocols using libc getprotoent, fixed ipv4 and cphb in the constants.   I don't think this can be easily backported to RHOSP 11 but I can validate with the customer if RHOSP13 and later would do.  

Can anyone validate my proposed changes ?

Comment 7 David Hill 2018-07-30 18:51:01 UTC
/usr/lib/python2.7/site-packages/neutron/common/constants.py defines names for some protocols in IPTABLES_PROTOCOL_NAME_MAP

Definition of protocol number 4 and 73 are different compared to /etc/protocols:
#/etc/protocols defined value
/usr/lib/python2.7/site-packages/neutron/common/constants.py defined value

#ipv4   4       IPv4            # IPv4 encapsulation
ipencap 4       IPv4            # IPv4 encapsulation
#cphb   73      CPHB            # Computer Protocol Heart Beat
rspf    73      RSPF            # Computer Protocol Heart Beat

We have a customer who has defined protocols 2-255 to security group, when neutron-openvswitch-agent tries to create matching rules iptables-manager fails to unknown protocol:

2018-07-24 10:56:11.225 18538 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent ; Stdout: ; Stderr: iptables-restore v1.4.21: unknown protocol "rspf" specified
2018-07-24 10:56:12.824 18538 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent ; Stdout: ; Stderr: iptables-restore v1.4.21: unknown protocol "rspf" specified
2018-07-24 10:56:15.218 18538 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent ; Stdout: ; Stderr: iptables-restore v1.4.21: unknown protocol "rspf" specified
2018-07-24 10:56:16.824 18538 ERROR neutron.plugins.ml2.drivers.openvswitch.agent.ovs_neutron_agent ; Stdout: ; Stderr: iptables-restore v1.4.21: unknown protocol "rspf" specified

Comment 24 Brian Haley 2018-10-17 19:54:59 UTC
I tested this on OSP11 and it worked fine, without it the agent would go into a loop when I tried to add certain security group rules by protocol number.  It also worked properly modifying the entries in /etc/protocols on the compute node and restarting the agent.

Assaf - it should be fine to release the hotfix now.

Comment 28 Andre 2019-01-21 14:44:32 UTC
Hi,
I'd like to know if we have this patch also on RHOSP 12 as well?

Comment 29 David Hill 2019-01-21 14:45:40 UTC
It's EOL so I didn't clone it for OSP12.

Comment 32 Brian Haley 2019-09-30 18:42:51 UTC
Clearing needinfo and marking closed as the hotfix for OSP 11 was delivered to this customer and it is fixed in later OSP releases.  All the customer cases are marked closed as well.