Delay in re-establishing api session
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
oslo.vmware |
Incomplete
|
Wishlist
|
Unassigned |
Bug Description
When we make invoke_api call and the session is in-active, we check if the session is active multiple times and then create a new session. Even after creating a new session, we wait for the 10 seconds before re-trying. I believe we should optimize this to avoid the delay due to session in-activeness.
2016-08-02 10:54:14.654 DEBUG oslo_vmware.api [req-6764c93c-
1299c158026bb37
e/api.py:122
/usr/local/
st is being made. Adding certificate verification is strongly advised. See: https:/
InsecureReque
2016-08-02 10:54:14.942 WARNING suds.client [-] Web service reported a SOAP processing fault using an unexpected HTTP status code 200.
Reporting as an internal server error.
2016-08-02 10:54:14.943 ERROR suds.client [-] <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0=
hema-instance" xmlns:SOAP-ENV="http://
<ns1:Body>
<
<ns0:_this type="SearchInd
<
</ns1:Body>
</SOAP-
2016-08-02 10:54:14.943 DEBUG oslo_vmware.api [-] Checking if the current session: 5f427 is active. from (pid=16356) is_current_sessio
n_active /opt/vio/
/usr/local/
st is being made. Adding certificate verification is strongly advised. See: https:/
InsecureReque
2016-08-02 10:54:14.951 WARNING suds.client [-] Web service reported a SOAP processing fault using an unexpected HTTP status code 200.
Reporting as an internal server error.
2016-08-02 10:54:14.951 ERROR suds.client [-] <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0=
<ns1:Body>
<
<ns0:_this type="SessionMa
<
</ns1:Body>
</SOAP-
2016-08-02 10:54:14.952 DEBUG oslo_vmware.api [-] Error: The session is not authenticated.
Cause: Server raised fault: 'The session is not authenticated.'
Faults: [NotAuthenticated]
Details: {'privilegeId': 'Sessions.
2016-08-02 10:54:14.953 DEBUG oslo_vmware.api [-] Current session: 5f427 is inactive; re-creating the session while invoking method VIM Object.
2016-08-02 10:54:14.953 DEBUG oslo_vmware.api [-] Waiting for function oslo_vmware.
2016-08-02 10:54:14.953 DEBUG oslo_concurrenc
2016-08-02 10:54:14.954 DEBUG oslo_vmware.api [-] Checking if the current session: 5f427 is active. from (pid=16356) is_current_
/usr/local/
InsecureReque
2016-08-02 10:54:14.962 WARNING suds.client [-] Web service reported a SOAP processing fault using an unexpected HTTP status code 200. Reporting as an internal server error.
2016-08-02 10:54:14.962 ERROR suds.client [-] <?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:ns0=
<ns1:Body>
<
<ns0:_this type="SessionMa
<
</ns1:Body>
</SOAP-
2016-08-02 10:54:14.963 DEBUG oslo_vmware.api [-] Error: The session is not authenticated.
Cause: Server raised fault: 'The session is not authenticated.'
Faults: [NotAuthenticated]
Details: {'privilegeId': 'Sessions.
2016-08-02 10:54:14.963 DEBUG oslo_vmware.api [-] Logging into host: 10.20.116.124. from (pid=16356) _create_session /opt/vio/
/usr/local/
InsecureReque
2016-08-02 10:54:15.178 INFO oslo_vmware.api [-] Successfully established new session; session ID is afcae.
2016-08-02 10:54:15.178 DEBUG oslo_concurrenc
2016-08-02 10:54:15.179 WARNING oslo_vmware.api [-] Exception which is in the suggested list of exceptions occurred while invoking function: oslo_vmware.
2016-08-02 10:54:15.179 TRACE oslo_vmware.api Traceback (most recent call last):
2016-08-02 10:54:15.179 TRACE oslo_vmware.api File "/opt/vio/
2016-08-02 10:54:15.179 TRACE oslo_vmware.api result = f(*args, **kwargs)
2016-08-02 10:54:15.179 TRACE oslo_vmware.api File "/opt/vio/
2016-08-02 10:54:15.179 TRACE oslo_vmware.api excep)
2016-08-02 10:54:15.179 TRACE oslo_vmware.api VimConnectionEx
2016-08-02 10:54:15.179 TRACE oslo_vmware.api Cause: The session is not authenticated.
2016-08-02 10:54:15.179 TRACE oslo_vmware.api Cause: Server raised fault: 'The session is not authenticated.'
2016-08-02 10:54:15.179 TRACE oslo_vmware.api Faults: [NotAuthenticated]
2016-08-02 10:54:15.179 TRACE oslo_vmware.api Details: {'privilegeId': 'System.View', 'object': 'group-d1'}
2016-08-02 10:54:15.179 TRACE oslo_vmware.api
2016-08-02 10:54:15.180 DEBUG oslo_vmware.
http:// paste.openstack .org/show/ 545746/ for more clarity.