From: John Griffith Date: Mon, 26 Jan 2015 22:21:30 +0000 (-0700) Subject: Create SolidFire Template account on init X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=a36100bd34a22ddc3b620947809a41d328b1e949;p=openstack-build%2Fcinder-build.git Create SolidFire Template account on init The standard flow in the SolidFire volume is to create accounts dynamically as needed based on project id. Unfortunately the clone_image method "forgot" about this detail and calls the private clone_volume method without a valid account resulting in an AccountNotFound Exception. The clone_image method is enabled using a specific account provided via the configuration file. Rather than worry about dynamic account creation on clone_image call, this patch just makes it part of the init phase. We check to see if template caching is enabled and if it is, just go ahead and check/create the account on startup. Closes-Bug: #1414760 Change-Id: I62f3f7aff958c097ae662d21b2c0f55a8d08f784 --- diff --git a/cinder/volume/drivers/solidfire.py b/cinder/volume/drivers/solidfire.py index c824f3be7..bbe248dba 100644 --- a/cinder/volume/drivers/solidfire.py +++ b/cinder/volume/drivers/solidfire.py @@ -147,6 +147,9 @@ class SolidFireDriver(SanISCSIDriver): self._update_cluster_status() except exception.SolidFireAPIException: pass + if self.configuration.sf_allow_template_caching: + account = self.configuration.sf_template_account_name + self._create_sfaccount(account) def _build_endpoint_info(self, **kwargs): endpoint = {}