Bug 1275954 - Openflow rules will not be updated after the service gets updated
Openflow rules will not be updated after the service gets updated
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Networking (Show other bugs)
3.x
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Dan Winship
Meng Bo
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-28 03:54 EDT by Meng Bo
Modified: 2015-11-23 16:15 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-11-23 16:15:04 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
node_log_during_update_service (32.00 KB, text/plain)
2015-10-28 03:55 EDT, Meng Bo
no flags Details

  None (edit)
Description Meng Bo 2015-10-28 03:54:18 EDT
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 03:55 EDT
Created attachment 1087158 [details]
node_log_during_update_service
Comment 2 Meng Bo 2015-10-28 04:03:58 EDT
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 14:56:45 EDT
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 10:05:02 EST
https://github.com/openshift/origin/pull/5552
Comment 6 Meng Bo 2015-11-04 01:37:52 EST
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.

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