From b5eb653bce08e7f89b41d982363f16c4f3b39f84 Mon Sep 17 00:00:00 2001 From: Mike Perez Date: Wed, 11 Mar 2015 12:27:32 -0700 Subject: [PATCH] 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 --- cinder/volume/drivers/datera.py | 4 ++++ 1 file changed, 4 insertions(+) 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, -- 2.45.2