Bug 1275954 - Openflow rules will not be updated after the service gets updated
Summary: Openflow rules will not be updated after the service gets updated
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Networking
Version: 3.x
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: ---
Assignee: Dan Winship
QA Contact: Meng Bo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-28 07:54 UTC by Meng Bo
Modified: 2015-11-23 21:15 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-11-23 21:15:04 UTC
Target Upstream Version:
Embargoed:


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

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.


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