diff options
Diffstat (limited to 'heat/engine/service_software_config.py')
-rw-r--r-- | heat/engine/service_software_config.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/heat/engine/service_software_config.py b/heat/engine/service_software_config.py index 36d612ddf..235eda206 100644 --- a/heat/engine/service_software_config.py +++ b/heat/engine/service_software_config.py @@ -11,8 +11,6 @@ # License for the specific language governing permissions and limitations # under the License. -from oslo_db import api as oslo_db_api -from oslo_db import exception as db_exc from oslo_log import log as logging from oslo_serialization import jsonutils from oslo_service import service @@ -26,6 +24,7 @@ from heat.common.i18n import _ from heat.common.i18n import _LI from heat.db import api as db_api from heat.engine import api +from heat.objects import resource as resource_objects from heat.objects import software_config as software_config_object from heat.objects import software_deployment as software_deployment_object from heat.rpc import api as rpc_api @@ -84,7 +83,7 @@ class SoftwareConfigService(service.Service): result = [api.format_software_config(sd.config) for sd in all_sd_s] return result - @oslo_db_api.wrap_db_retry(max_retries=10, retry_on_request=True) + @resource_objects.retry_on_conflict def _push_metadata_software_deployments(self, cnxt, server_id, sd): rs = db_api.resource_get_by_physical_resource_id(cnxt, server_id) if not rs: @@ -95,9 +94,8 @@ class SoftwareConfigService(service.Service): rows_updated = db_api.resource_update( cnxt, rs.id, {'rsrc_metadata': md}, rs.atomic_key) if not rows_updated: - action = "deployments of server %s" % server_id - raise db_exc.RetryRequest( - exception.ConcurrentTransaction(action=action)) + action = _('deployments of server %s') % server_id + raise exception.ConcurrentTransaction(action=action) metadata_put_url = None metadata_queue_id = None |