[ 
https://issues.apache.org/jira/browse/CLOUDSTACK-4846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13796605#comment-13796605
 ] 

Santhosh Kumar Edukulla commented on CLOUDSTACK-4846:
-----------------------------------------------------


1/ Can you please add the server GET\POST calls with params received at the 
server information to the bug? This will help to know for which GET/POST call 
this issue has appeared?


2/ Under tools/marvin/marvin/cloudstackConnection.py, there is a member 
function "request" under cloudConnection class. If this exception is appearing 
quiet a good number of times. Can you please add this specific exception( 
BadStatusLine ) to be caught and collect few specific information for request 
sent,response recieved when that exception is caught in your next run? The 
total url with args and body to be dumped etc in a file?

3/  We are using requests library to make http calls under marvin, it seems 
there is a way to enable debug information for this library, check the below 
link. Please enable  the debug information for this library and run the tests 
again to see by catching the complete request payload when this specific 
exception is raised. 

http://docs.python-requests.org/en/master/api/#api-changes

# these two lines enable debugging at httplib level (requests->urllib3->httplib)
# you will see the REQUEST, including HEADERS and DATA, and RESPONSE with 
HEADERS but without DATA.
# the only thing missing will be the response.body which is not logged.
import httplib
httplib.HTTPConnection.debuglevel = 1


4/ One of the link suggests a trailing new line character for the request as 
the cause for this issue. Adding complete server calls and debug information 
will  help to debug more i believe?

http://stackoverflow.com/questions/1767934/why-am-i-getting-this-error-in-python-httplib

Check above and you can get more information for this issue to delve further.


> Http connection error in marvin
> -------------------------------
>
>                 Key: CLOUDSTACK-4846
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-4846
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>          Components: Automation, marvin
>            Reporter: Girish Shilamkar
>            Assignee: Girish Shilamkar
>
> The connection fails with httplib.BadStatusLine which means that the error 
> code returned by http server was not recognised by marvin and therefore it 
> breaks.
> ======================================================================
> ERROR: test_11_egress_fr11 (test_egress_fw_rules.TestEgressFWRules)
> Test Regression on Firewall + PF + LB + SNAT
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/root/girish-1/test_egress_fw_rules.py", line 778, in 
> test_11_egress_fr11
>     self.create_vm(pfrule=True)
>   File "/root/girish-1/test_egress_fw_rules.py", line 202, in create_vm
>     self.create_network_offering(egress_policy, RR)
>   File "/root/girish-1/test_egress_fw_rules.py", line 193, in 
> create_network_offering
>     conservemode=True)
>   File 
> "/usr/local/lib/python2.7/site-packages/marvin/integration/lib/base.py", line 
> 1525, in create
>     return NetworkOffering(apiclient.createNetworkOffering(cmd).__dict__)
>   File 
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackAPI/cloudstackAPIClient.py",
>  line 1690, in createNetworkOffering
>     response = self.connection.marvin_request(command, 
> response_type=response, method=method)
>   File 
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py", line 
> 218, in marvin_request
>     cmdname, self.auth, payload=payload, method=method)
>   File 
> "/usr/local/lib/python2.7/site-packages/marvin/cloudstackConnection.py", line 
> 153, in request
>     raise c
> ConnectionError: HTTPConnectionPool(host='10.147.38.166', port=8080): Max 
> retries exceeded with url: 
> /client/api?apiKey=nVogzlRMdVgV78_e8egxMjqHCgAnAcnvUZkBWdldBFu18q-rjH6yxjGM3XqobvNTn4RvYbv9jl_GSWSczzm5aw&egressdefaultpolicy=true&serviceproviderlist%5B2%5D.provider=VirtualRouter&serviceproviderlist%5B5%5D.service=Dhcp&displaytext=Network+offering-VR+services-IRI2NS&specifyVlan=False&serviceproviderlist%5B4%5D.provider=VirtualRouter&serviceproviderlist%5B1%5D.provider=VirtualRouter&availability=Optional&conservemode=True&servicecapabilitylist%5B1%5D.capabilitytype=SupportedSourceNatTypes&serviceproviderlist%5B3%5D.service=Dns&serviceproviderlist%5B5%5D.provider=VirtualRouter&response=json&serviceproviderlist%5B0%5D.provider=VirtualRouter&servicecapabilitylist%5B0%5D.capabilitytype=RedundantRouter&serviceproviderlist%5B8%5D.provider=VirtualRouter&serviceproviderlist%5B1%5D.service=Lb&servicecapabilitylist%5B0%5D.service=SourceNat&serviceproviderlist%5B4%5D.service=Firewall&supportedservices=Dhcp%2CDns%2CSourceNat%2CPortForwarding%2CVpn%2CFirewall%2CLb%2CUserData%2CStaticNat&traffictype=GUEST&servicecapabilitylist%5B1%5D.service=SourceNat&serviceproviderlist%5B6%5D.provider=VirtualRouter&serviceproviderlist%5B8%5D.service=StaticNat&serviceproviderlist%5B3%5D.provider=VirtualRouter&name=Network+offering-VR+services-4O5XR6&guestiptype=Isolated&serviceproviderlist%5B7%5D.provider=VirtualRouter&servicecapabilitylist%5B1%5D.capabilityvalue=peraccount&serviceproviderlist%5B7%5D.service=SourceNat&serviceproviderlist%5B2%5D.service=PortForwarding&servicecapabilitylist%5B0%5D.capabilityvalue=true&serviceproviderlist%5B6%5D.service=Vpn&command=createNetworkOffering&signature=HRgb20smMpvPN6J1Eay3ySPGbxs%3D&serviceproviderlist%5B0%5D.service=UserData
>  (Caused by <class 'httplib.BadStatusLine'>: '')



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to