From d0765af7c8b17d48b2fe3c70e87383af4bd0c5c9 Mon Sep 17 00:00:00 2001 From: "Luis A. Garcia" Date: Tue, 23 Jul 2013 23:59:32 +0000 Subject: [PATCH] Small tweaks to recreation of remote errors The patch adds heat common exceptions to the list of trusted exceptions that can be re-spawned across RPC calls (this is the default behavior for all OS components). The patch adds the corresponding package to the declaration of the allowed_rpc_exception_modules as well as to the conf sample. Change-Id: Ib89d0bd4dd8f5240a9f3e973b8a04d0a5bfe2193 --- etc/heat/heat.conf.sample | 2 +- heat/common/config.py | 8 -------- heat/openstack/common/rpc/__init__.py | 1 + 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/etc/heat/heat.conf.sample b/etc/heat/heat.conf.sample index f1fc6ff7..bc70bfcb 100644 --- a/etc/heat/heat.conf.sample +++ b/etc/heat/heat.conf.sample @@ -277,7 +277,7 @@ # Modules of exceptions that are permitted to be recreatedupon # receiving exception data from an rpc call. (list value) -#allowed_rpc_exception_modules=heat.openstack.common.exception,nova.exception,cinder.exception,exceptions +#allowed_rpc_exception_modules=heat.openstack.common.exception,heat.common.exception,nova.exception,cinder.exception,exceptions # If passed, use a fake RabbitMQ provider (boolean value) #fake_rabbit=false diff --git a/heat/common/config.py b/heat/common/config.py index 8113ec12..d32025a6 100644 --- a/heat/common/config.py +++ b/heat/common/config.py @@ -116,14 +116,6 @@ cfg.CONF.register_opts(rpc_opts) cfg.CONF.register_group(paste_deploy_group) cfg.CONF.register_opts(paste_deploy_opts, group=paste_deploy_group) -# TODO(jianingy): I'll set allowed_rpc_exception_modules here for now. -# after figure out why rpc_set_default was not called, -# I'll move these settings into rpc_set_default() -allowed_rpc_exception_modules = cfg.CONF.allowed_rpc_exception_modules -allowed_rpc_exception_modules.append('heat.common.exception') -cfg.CONF.set_default(name='allowed_rpc_exception_modules', - default=allowed_rpc_exception_modules) - def rpc_set_default(): rpc.set_defaults(control_exchange='heat') diff --git a/heat/openstack/common/rpc/__init__.py b/heat/openstack/common/rpc/__init__.py index 9b12d323..6907f726 100644 --- a/heat/openstack/common/rpc/__init__.py +++ b/heat/openstack/common/rpc/__init__.py @@ -57,6 +57,7 @@ rpc_opts = [ 'Only supported by impl_zmq.'), cfg.ListOpt('allowed_rpc_exception_modules', default=['heat.openstack.common.exception', + 'heat.common.exception', 'nova.exception', 'cinder.exception', 'exceptions', -- 2.45.2