From 27a9ed5ace86e8d6aabc564f4a364d9b45b5124f Mon Sep 17 00:00:00 2001 From: Kurt Martin Date: Thu, 22 Aug 2013 09:28:37 -0700 Subject: [PATCH] 3PAR driver add missing domain check on QOS cmd The 3PAR drivers need to support CPGs that are not part of a virtual domain on the 3PAR backend. This patch now checks if the domain is set before calling the createvvset command. This instance was overlooked in the following patch that has already been merged: https://review.openstack.org/#/c/42697/ Also fixes: bug 1212328 Change-Id: I0375dfc89104775582b9258f18f97c683e6148b1 --- cinder/volume/drivers/san/hp/hp_3par_common.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cinder/volume/drivers/san/hp/hp_3par_common.py b/cinder/volume/drivers/san/hp/hp_3par_common.py index 9cce016bc..15350a28c 100644 --- a/cinder/volume/drivers/san/hp/hp_3par_common.py +++ b/cinder/volume/drivers/san/hp/hp_3par_common.py @@ -632,7 +632,10 @@ exit else: vvs_name = self._get_3par_vvs_name(volume['id']) domain = self.get_domain(cpg) - self._cli_run(['createvvset', '-domain', domain, vvs_name]) + if domain is not None: + self._cli_run(['createvvset', '-domain', domain, vvs_name]) + else: + self._cli_run(['createvvset', vvs_name]) self._set_qos_rule(qos, vvs_name) self._cli_run(['createvvset', '-add', vvs_name, volume_name]) -- 2.45.2