]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
vmware: Use SessionIsActive to find stale session
authorVipin Balachandran <vbala@vmware.com>
Wed, 19 Mar 2014 12:12:56 +0000 (17:42 +0530)
committerVipin Balachandran <vbala@vmware.com>
Thu, 20 Mar 2014 06:53:12 +0000 (12:23 +0530)
commit7ca4bea7e3d8688c847bdbcfe3e60900c61c297c
tree62b0692e8a42e5c0500cd83dfea068b0431a3b38
parent2ba4af4de5653bf619f2bfb12ec7564ff21fd4c0
vmware: Use SessionIsActive to find stale session

An API invocation with a stale session returns an empty response. In order
to distinguish it from an API returning valid empty response, the session
is recreated and the API is retried. If an empty response is received even
after the retry, it can be assumed that the API response is actually empty.
But this behavior results in authentication error from the VMware server
when there is an active session and the API response is actually empty.
This change fix this behavior by using the SessionIsActive check to
identify stale session.

Change-Id: I6ddc4028bc5319cd22006de0590c13d6868c3494
Closes-Bug: #1284979
cinder/tests/test_vmware_api.py [new file with mode: 0644]
cinder/tests/test_vmware_vmdk.py
cinder/volume/drivers/vmware/api.py