diff --git a/cinder/volume/drivers/hpe/hpe_3par_common.py b/cinder/volume/drivers/hpe/hpe_3par_common.py index ba4d4ea5ceb..971fac3e859 100644 --- a/cinder/volume/drivers/hpe/hpe_3par_common.py +++ b/cinder/volume/drivers/hpe/hpe_3par_common.py @@ -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): diff --git a/releasenotes/notes/bug-2008931-hpe-keyerror-on-migration-71d31e6c0a8ab0d9.yaml b/releasenotes/notes/bug-2008931-hpe-keyerror-on-migration-71d31e6c0a8ab0d9.yaml new file mode 100644 index 00000000000..1e5f09f860f --- /dev/null +++ b/releasenotes/notes/bug-2008931-hpe-keyerror-on-migration-71d31e6c0a8ab0d9.yaml @@ -0,0 +1,7 @@ +--- +fixes: + - | + HPE 3PAR driver `bug #2008931 + `_: Fixed + issue when performing migrate volume operation when `comment` + attribute is missing from the volume.