Red Hat Bugzilla – Bug 1275954
Openflow rules will not be updated after the service gets updated
Last modified: 2015-11-23 16:15:04 EST
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):
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
It will not update the openflow rules on node.
The openflow rules should be updated accordingly.
The iptables rule for the service will be changed after service updated.
openshift-node log attached.
Created attachment 1087158 [details]
BTW, once the service has been updated, the openflow rule in ovs cannot be deleted with the service.
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.
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.