Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1361024 - [public_networking_226]Should disable the rate limiting function when 'haproxy.router.openshift.io/rate-limit-connections' is not true
Summary: [public_networking_226]Should disable the rate limiting function when 'haprox...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OKD
Classification: Red Hat
Component: Routing
Version: 3.x
Hardware: All
OS: All
low
low
Target Milestone: ---
: 3.x
Assignee: Ben Bennett
QA Contact: zhaozhanqi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-28 07:45 UTC by zhaozhanqi
Modified: 2017-11-10 21:34 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-11-10 21:34:50 UTC


Attachments (Terms of Use)

Description zhaozhanqi 2016-07-28 07:45:07 UTC
Description of problem:
currently, the code did not verify the value of 'haproxy.router.openshift.io/rate-limit-connections'. found this function will be enable whatever the value of 'haproxy.router.openshift.io/rate-limit-connections' is.

As my understanding. if the 'haproxy.router.openshift.io/rate-limit-connections' is false. this function should be disable.

cat haproxy-config.template
<--snip-->

{{ if index $cfg.Annotations "haproxy.router.openshift.io/rate-limit-connections" }}

<--snip-->


Version-Release number of selected component (if applicable):
# openshift version
openshift v1.3.0-alpha.2+8faaa47
kubernetes v1.3.0+57fb9ac
etcd 2.3.0+git
devenv-rhel7_4686 (ami-4cec785b)
openshift/origin-haproxy-router          latest              1ddb86362817

How reproducible:
always

Steps to Reproduce:
1. Create router with latest images ( id 1ddb86362817)
2. create one pod/service/route using userA
   $oc create -f https://raw.githubusercontent.com/openshift-qe/v3-testfiles/master/networking/list_for_pods.json
   $ oc expose svc test-service
3. add the http limite to 5
   $oc annotate route test-service haproxy.router.openshift.io/rate-limit-connections=true
   $oc annotate route test-service haproxy.router.openshift.io/rate-limit-connections.rate-http=5

4. send 10 requests 
  #for i in {1..10} ; do curl --resolve test-service-default.router.default.svc.cluster.local:80:127.0.0.1 http://test-service-default.router.default.svc.cluster.local; done
Hello OpenShift!
Hello OpenShift!
Hello OpenShift!
Hello OpenShift!
Hello OpenShift!
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server

5. set the 'haproxy.router.openshift.io/rate-limit-connections' to false
  $oc annotate route test-service haproxy.router.openshift.io/rate-limit-connections=false --overwrite
6. given 3 seconds pass
7. send 10 http requests
# for i in {1..10} ; do curl --resolve test-service-default.router.default.svc.cluster.local:80:127.0.0.1 http://test-service-default.router.default.svc.cluster.local; done
Hello OpenShift!
Hello OpenShift!
Hello OpenShift!
Hello OpenShift!
Hello OpenShift!
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server
curl: (52) Empty reply from server

Actual results:

 refer to the result of steps

Expected results:

step 7. all 10 http request should return 'Hello OpenShift!' when setting the haproxy.router.openshift.io/rate-limit-connections to false 

Additional info:

Comment 2 Meng Bo 2016-08-25 03:22:25 UTC
The PR merged, should the bug be moved forward?

Comment 3 zhaozhanqi 2017-06-30 02:01:55 UTC
verified this bug on oc v3.6.126


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