Merge "HPE: Fix keyerror seen during volume migration"

This commit is contained in:
Zuul 2023-03-27 14:24:38 +00:00 committed by Gerrit Code Review
commit 482ab2c63b
2 changed files with 8 additions and 1 deletions

View File

@ -3092,7 +3092,7 @@ class HPE3PARCommon(object):
def _get_updated_comment(self, vol_name, **values):
vol = self.client.getVolume(vol_name)
comment = json.loads(vol['comment']) if vol['comment'] else {}
comment = json.loads(vol['comment']) if vol.get('comment') else {}
comment.update(values)
def _update_comment(self, vol_name, **values):

View File

@ -0,0 +1,7 @@
---
fixes:
- |
HPE 3PAR driver `bug #2008931
<https://bugs.launchpad.net/cinder/+bug/2008931>`_: Fixed
issue when performing migrate volume operation when `comment`
attribute is missing from the volume.