Bug 1275954

Summary: Openflow rules will not be updated after the service gets updated
Product: OKD Reporter: Meng Bo <bmeng>
Component: NetworkingAssignee: Dan Winship <danw>
Status: CLOSED CURRENTRELEASE QA Contact: Meng Bo <bmeng>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.xCC: aos-bugs, eparis, rpenta
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-11-23 21:15: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:
Attachments:
Description Flags
node_log_during_update_service none

Description Meng Bo 2015-10-28 07:54:18 UTC
Description of problem:
After change the port of an existing service, the openflow rule on the node will not be updated accordingly.

Version-Release number of selected component (if applicable):
openshift v1.0.6-997-gff3b522
kubernetes v1.2.0-alpha.1-1107-g4c8e6f4


How reproducible:
always

Steps to Reproduce:
1. Setup multi-node env
2. Create service in any of the projects
$ oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/networking/list_for_pods.json
3. Check the openflow rules on node 
# ovs-ofctl dump-flows br0 -O openflow13  | grep 27017
 cookie=0x0, duration=1434.270s, table=4, n_packets=0, n_bytes=0, priority=200,tcp,reg0=0xc,nw_dst=172.30.213.88,tp_dst=27017 actions=output:2

4. Update the port number for the service in step2
$ oc get svc test-service -o json | sed 's/27017/27018/g' | oc replace -f -
5. Check the openflow rules on node again
# ovs-ofctl dump-flows br0 -O openflow13  | grep -e 27017 -e 27018
 cookie=0x0, duration=1464.440s, table=4, n_packets=0, n_bytes=0, priority=200,tcp,reg0=0xc,nw_dst=172.30.213.88,tp_dst=27017 actions=output:2

Actual results:
It will not update the openflow rules on node.

Expected results:
The openflow rules should be updated accordingly.

Additional info:
The iptables rule for the service will be changed after service updated.

openshift-node log attached.

Comment 1 Meng Bo 2015-10-28 07:55:27 UTC
Created attachment 1087158 [details]
node_log_during_update_service

Comment 2 Meng Bo 2015-10-28 08:03:58 UTC
BTW, once the service has been updated, the openflow rule in ovs cannot be deleted with the service.

Comment 3 Ravi Sankar 2015-10-29 18:56:45 UTC
Currently, we are not watching for service updates.
Fix will be to catch modified event in WatchServices() and delete existing OF rules and add new OF rules for the service.

Comment 5 Eric Paris 2015-11-02 15:05:02 UTC
https://github.com/openshift/origin/pull/5552

Comment 6 Meng Bo 2015-11-04 06:37:52 UTC
Checked with openshift version v1.0.7-253-gb8cde97.

Issue has been fixed, the ovs rule will be updated accordingly when the service changed.

Move bug to verified.