From bce0f263980444a1231334a790588e44578a1783 Mon Sep 17 00:00:00 2001 From: Atsushi Kawai Date: Tue, 4 Jun 2024 18:35:47 +0900 Subject: [PATCH] Hitachi: fix to initialize a lock counter This patch fixes Hitachi driver to initialize a lock counter, in a method to re-login to REST-API server, for fixing the bug which send unnecessary request to unlock storage resource group. Closes-Bug: #2033448 Change-Id: I8d0da7bf499bc4ac352949c942c41494a51b3874 --- cinder/volume/drivers/hitachi/hbsd_rest_api.py | 2 ++ releasenotes/notes/hitachi-fix-unlock-f4e044807985e60b.yaml | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100644 releasenotes/notes/hitachi-fix-unlock-f4e044807985e60b.yaml diff --git a/cinder/volume/drivers/hitachi/hbsd_rest_api.py b/cinder/volume/drivers/hitachi/hbsd_rest_api.py index d47d779cfe8..8bdcb685d08 100644 --- a/cinder/volume/drivers/hitachi/hbsd_rest_api.py +++ b/cinder/volume/drivers/hitachi/hbsd_rest_api.py @@ -537,6 +537,7 @@ class RestApiClient(): timeout=self.conf.hitachi_lock_timeout) if not err: self.set_my_session(self.Session(rsp["sessionId"], rsp["token"])) + self.nested_count = 0 return True else: return False @@ -574,6 +575,7 @@ class RestApiClient(): retry = self._has_session() if not retry: LOG.debug("Trying to re-login.") + self.nested_count = 0 retry = self._login(do_raise=False) if not retry: self.output_log( diff --git a/releasenotes/notes/hitachi-fix-unlock-f4e044807985e60b.yaml b/releasenotes/notes/hitachi-fix-unlock-f4e044807985e60b.yaml new file mode 100644 index 00000000000..43d46e295b7 --- /dev/null +++ b/releasenotes/notes/hitachi-fix-unlock-f4e044807985e60b.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Hitachi driver `bug #2033448 + `_: Fixed to initialize + lock counter for resource group