You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by kansal <gi...@git.apache.org> on 2016/02/19 12:39:46 UTC
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
GitHub user kansal opened a pull request:
https://github.com/apache/cloudstack/pull/1418
CLOUDSTACK-9261: Query to traffic sentinel requesting for usage stats…
… is too long resulting in traffic sentinel sending HTTP 414 error response - Fixed
Root Cause Analysis:
In the current implementation, we are using GET method to send the request tom the traffic sentinel instance. Thus, if there are many IP's that need to be queried, the request becomes too long and the HTTP Error 414 is thrown.
Fix: Changed the GET request to the POST request.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/kansal/cloudstack CLOUDSTACK-9291
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/cloudstack/pull/1418.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1418
----
commit 96141d3ed00bd57e54ddd98fe4f62f6d51b622f4
Author: Kshitij Kansal <ka...@gmail.com>
Date: 2016-02-19T10:56:47Z
CLOUDSTACK-9261: Query to traffic sentinel requesting for usage stats is too long resulting in traffic sentinel sending HTTP 414 error response - Fixed
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by kansal <gi...@git.apache.org>.
Github user kansal commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-211873904
@GabrielBrascher These adjustments can be done, but I don't see any point of introducing the function calls. Anyhow this code is not used anywhere else in the whole project. As far as readability is concerned, I think with the proper comments it should be just fine.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by GabrielBrascher <gi...@git.apache.org>.
Github user GabrielBrascher commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-212876630
@kansal create methods would also help to test the behavior of this code, using unit test and integration test (to verify if the methods that have unit test are called in the correct order by a more generic method).
For example, you could create a method `queryTrafficSentinel`, this method calls the part 1, 2 and 3 in this exact sequence and one time each (you can use [InOrder](https://mockito.googlecode.com/hg-history/1.6/javadoc/org/mockito/InOrder.html) to ensure the order and times that a method was called). Methods that would do the part 1, 2 and 3 could have unit tests.
At the end, you could create a Javadoc for those methods using all four comment blocks that you created.
Thanks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by kishankavala <gi...@git.apache.org>.
Github user kishankavala commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-212842771
@kansal
LGTM. See if you can add an integration test.
Actual response from traffic sentinel resource in the logs will also help.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by alexandrelimassantana <gi...@git.apache.org>.
Github user alexandrelimassantana commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-186875522
Hi @kansal, can you make a test with this change? Try issuing an request with more than 2048 characters to see if everything still works fine then.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by rhtyd <gi...@git.apache.org>.
Github user rhtyd commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-216224340
@kansal please rebase against latest master
tag:needlove
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by kansal <gi...@git.apache.org>.
Github user kansal commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-217089000
@rhtyd Rebased.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by GabrielBrascher <gi...@git.apache.org>.
Github user GabrielBrascher commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-189941771
@kansal Could you please consider the following adjustments?
- create a method for the "Part 1" (lines 213-219). With the command as parameter and returning the connection to be used for "Part 2" (lines 221-223);
- create a method for "Part 2", returning the output stream and receiving as parameter the connection and post data.
I think that with these two methods, the code would be more readable.
Thanks.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack pull request: CLOUDSTACK-9261: Query to traffic sentine...
Posted by kansal <gi...@git.apache.org>.
Github user kansal commented on the pull request:
https://github.com/apache/cloudstack/pull/1418#issuecomment-187574586
@alexandrelimassantana , I am not sure of how to simulate the actual traffic sentinel resource. I can create a request with 20148 or more, but the actual error is encountered when the request reaches the resource.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] cloudstack issue #1418: CLOUDSTACK-9261: Query to traffic sentinel requestin...
Posted by bvbharatk <gi...@git.apache.org>.
Github user bvbharatk commented on the issue:
https://github.com/apache/cloudstack/pull/1418
### ACS CI BVT Run
**Sumarry:**
Build Number 148
Hypervisor xenserver
NetworkType Advanced
Passed=70
Failed=1
Skipped=3
_Link to logs Folder (search by build_no):_ https://www.dropbox.com/sh/yj3wnzbceo9uef2/AAB6u-Iap-xztdm6jHX9SjPja?dl=0
**Failed tests:**
* test_service_offerings.py
* ContextSuite context=TestServiceOfferings>:setup Failing since 8 runs
**Skipped tests:**
test_vm_nic_adapter_vmxnet3
test_static_role_account_acls
test_deploy_vgpu_enabled_vm
**Passed test suits:**
test_deploy_vm_with_userdata.py
test_affinity_groups_projects.py
test_portable_publicip.py
test_vpc_vpn.py
test_over_provisioning.py
test_global_settings.py
test_scale_vm.py
test_routers_iptables_default_policy.py
test_routers.py
test_reset_vm_on_reboot.py
test_snapshots.py
test_deploy_vms_with_varied_deploymentplanners.py
test_login.py
test_list_ids_parameter.py
test_public_ip_range.py
test_multipleips_per_nic.py
test_regions.py
test_affinity_groups.py
test_network_acl.py
test_pvlan.py
test_volumes.py
test_nic.py
test_deploy_vm_root_resize.py
test_resource_detail.py
test_secondary_storage.py
test_vm_life_cycle.py
test_disk_offerings.py
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---