[openstack-dev] [keystone]

Ryan Hallisey rhallise at redhat.com
Mon Apr 14 21:42:18 UTC 2014


I retested by adding the '.info' suffix then looked at the message queue and it still isn't there.

The line notifier.info({}, "some type", "some payload") labels it so that it should be
sent to notifications.info. For example if I changed it to notifier.warn it should appear
in the queue as notifier.warn.

I can successfully send a message from nova with: 

#!/usr/bin/env python                                                                                   
from nova import config
from oslo.config import cfg
from nova.openstack.common import log as logging
from oslo import messaging
import sys

CONF = cfg.CONF
config.parse_args(sys.argv)
logging.setup("nova")

transport = messaging.get_transport(CONF)

notifier = messaging.Notifier(transport,
                              'test_pub_id')

notifier.info({}, "some type", "some payload")



----- Original Message -----
From: "Nader Lahouti" <nader.lahouti at gmail.com>
To: "OpenStack Development Mailing List (not for usage questions)" <openstack-dev at lists.openstack.org>
Sent: Monday, April 14, 2014 5:10:03 PM
Subject: Re: [openstack-dev] [keystone]

Are you sure that Notifier adds '.info' suffix to the topic that you provided? 
I think you should use topic=' notification.info '. 

Thanks, 
Nader. 



On Mon, Apr 14, 2014 at 12:02 PM, Ryan Hallisey < rhallise at redhat.com > wrote: 


Hello, 

I am unable to send a keystone notification with these parameters in keystone.conf: 

rabbit_password = stack 
rabbit_hosts = localhost 
rpc_backend = rabbit 
notification_driver = messaging 

When I look at the message queues: sudo /usr/sbin/rabbitmqctl list_queues 

notifications.audit 0 
notifications.critical 0 
notifications.debug 0 
notifications.error 0 
notifications.info 0 
notifications.sample 0 
notifications.warn 0 
notifications_bis.audit 0 
notifications_bis.critical 0 
notifications_bis.debug 0 
notifications_bis.error 0 
notifications_bis.info 0 
notifications_bis.sample 0 
notifications_bis.warn 0 

I don't get a 1 under notifications.info . Any thoughts about why I am not seeing the notification? 

I send the notification by: 

import os 
import sys 
from keystone import config 
from oslo import messaging 
import pbr.version 

CONF = config.CONF 
transport = messaging.get_transport(CONF) 
notifier = messaging.Notifier(transport, 
'test_pub_id', 
driver='messaging', 
topic='notifications') 

notifier.info ({}, "some type", "some payload") 



Thanks, 
Ryan Hallisey 

_______________________________________________ 
OpenStack-dev mailing list 
OpenStack-dev at lists.openstack.org 
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev 


_______________________________________________
OpenStack-dev mailing list
OpenStack-dev at lists.openstack.org
http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev



More information about the OpenStack-dev mailing list