diff --git a/astara/cli/message.py b/astara/cli/message.py index 3035d3b4..f4230bf9 100644 --- a/astara/cli/message.py +++ b/astara/cli/message.py @@ -19,6 +19,8 @@ """ import abc import logging +import os +import sys from cliff import command @@ -39,14 +41,12 @@ class MessageSending(command.Command): return {} def take_action(self, parsed_args): - self.log.info( - 'using amqp at %r exchange %r', - self.app.rug_ini.amqp_url, - self.app.rug_ini.outgoing_notifications_exchange, - ) self.send_message(self.make_message(parsed_args)) def send_message(self, payload): sender = notifications.Sender() - self.log.debug('sending %r', payload) + cmd = payload.get('command') + argv = os.path.basename(sys.argv[0]) + self.log.info('%s: sending %s instruction.' % (argv, cmd)) + self.log.debug('payload: %r', payload) sender.send(event_type='astara.command', message=payload) diff --git a/astara/cli/poll.py b/astara/cli/poll.py index 202c29bf..94c7648c 100644 --- a/astara/cli/poll.py +++ b/astara/cli/poll.py @@ -28,10 +28,6 @@ class Poll(message.MessageSending): log = logging.getLogger(__name__) def make_message(self, parsed_args): - self.log.info( - 'sending %s instruction', - commands.POLL, - ) return { 'command': commands.POLL, } diff --git a/astara/notifications.py b/astara/notifications.py index 42d583db..a7a9bb60 100644 --- a/astara/notifications.py +++ b/astara/notifications.py @@ -57,9 +57,6 @@ NOTIFICATIONS_OPTS = [ cfg.StrOpt('incoming-notifications-exchange', default='neutron', help='name of the exchange where we receive notifications'), - cfg.StrOpt('outgoing-notifications-exchange', - default='neutron', - help='name of the exchange where we send notifications'), cfg.StrOpt('rpc-exchange', default='l3_agent_fanout', help='name of the exchange where we receive RPC calls'), diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 852ef48b..70acc6a7 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -66,7 +66,8 @@ function configure_astara() { cp $ASTARA_DIR/etc/orchestrator.ini $ASTARA_CONF iniset $ASTARA_CONF DEFAULT verbose True configure_auth_token_middleware $ASTARA_CONF $Q_ADMIN_USERNAME $ASTARA_CACHE_DIR - iniset $ASTARA_CONF DEFAULT amqp_url "amqp://$RABBIT_USERID:$RABBIT_PASSWORD@$RABBIT_HOST:$RABBIT_PORT/" + iniset_rpc_backend astara $ASTARA_CONF + iniset $ASTARA_CONF DEFAULT control_exchange "neutron" iniset $ASTARA_CONF DEFAULT boot_timeout "6000" iniset $ASTARA_CONF DEFAULT num_worker_processes "2" diff --git a/etc/orchestrator.ini b/etc/orchestrator.ini index 20901e55..4dc58651 100644 --- a/etc/orchestrator.ini +++ b/etc/orchestrator.ini @@ -43,12 +43,13 @@ router_ssh_public_key=/etc/astara/astara.pub interface_driver=astara.common.linux.interface.OVSInterfaceDriver ovs_integration_bridge=br-int -# URL for connecting to oslo.messaging backend -amqp_url = amqp://rabbit:astara@127.0.0.1:/ +# oslo_messaging backend configuration, rabbitmq client credentials +# configured in [oslo_messaging_rabbit] section. +rpc_backend = rabbit -# *Deprecated* use amqp_url instead. -rabbit_password = yetanothersecret -rabbit_host = 192.168.57.200 +# *Deprecated* Use [oslo_messaging_rabbit] for configuring amqp +# client credentials. +#amqp_url = amqp://rabbit:astara@127.0.0.1:/ provider_rules_path=/opt/stack/astara/etc/provider_rules.json control_exchange = quantum @@ -80,6 +81,12 @@ username = neutron auth_url = http://127.0.0.1:35357 auth_plugin = password +# This section should be updated as per rabbitmq credentials +[oslo_messaging_rabbit] +rabbit_userid = rabbit +rabbit_password = secret +rabbit_hosts = 127.0.0.1 + # Driver configuration [router] image_uuid = aa7bcd8e-7364-11e5-a721-a35eacf37e3b diff --git a/releasenotes/notes/deprecated-amqp-url-6e988fd7d33a9305.yaml b/releasenotes/notes/deprecated-amqp-url-6e988fd7d33a9305.yaml new file mode 100644 index 00000000..27395b6f --- /dev/null +++ b/releasenotes/notes/deprecated-amqp-url-6e988fd7d33a9305.yaml @@ -0,0 +1,5 @@ +--- +deprecations: + - The ``amqp_url`` config option has been deprecated in favor using ``oslo.messaging`` backend specific configution. See example configuration file for an example. The pre-Liberty rabbit options have been removed. +fixes: + - Bug `1524595 `_ astara-ctl warning message for deprecated AMQP configuration