From: Mike Perez Date: Wed, 11 Mar 2015 19:27:32 +0000 (-0700) Subject: Unset auth token before trying to login to Datera X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=b5eb653bce08e7f89b41d982363f16c4f3b39f84;p=openstack-build%2Fcinder-build.git Unset auth token before trying to login to Datera After a token expires, the Datera driver would try to login, and pass along the expired token. This would fail because the receiving server will authorize anytime it's given an auth token, even for endpoints that don't require it. This change unsets the auth token when logging in, so it's not passed a long. Closes-Bug: #1430978 Change-Id: Id445718e3e73b676e3af8005b8fdd1a028ef2b0e --- diff --git a/cinder/volume/drivers/datera.py b/cinder/volume/drivers/datera.py index f556afcc5..47d6a6d50 100644 --- a/cinder/volume/drivers/datera.py +++ b/cinder/volume/drivers/datera.py @@ -258,6 +258,10 @@ class DateraDriver(san.SanISCSIDriver): 'password': self.password } + # Unset token now, otherwise potential expired token will be sent + # along to be used for authorization when trying to login. + self.auth_token = None + try: LOG.debug('Getting Datera auth token.') results = self._issue_api_request('login', 'post', body=data,