g-api complaining about 'connection_errors' in 'RabbitStrategy'

Asked by Marc PINHEDE


When I tried to setup a new devstack this morning, the script 'stack.sh' failed on starting glance-api.

+ screen -S stack -p g-api -X stuff 'cd /opt/stack/glance; /usr/local/bin/glance-api --config-file=/etc/glance/glance-api.conf '| touch "/opt/stack/status/stack/g-api.failure"
+ echo 'Waiting for g-api ( to start...'
Waiting for g-api ( to start...
+ timeout 60 sh -c 'while ! http_proxy= wget -q -O-; do sleep 1; done'
+ die 191 'g-api did not start'
+ local exitcode=0
+ set +o xtrace
[ERROR] stack.sh:191 g-api did not start

I then tried to start glance-api manually:
/opt/stack/devstack$ cd /opt/stack/glance; /usr/local/bin/glance-api --config-file=/etc/glance/glance-api.conf

After some debug lines, I got a critical error: 'RabbitStrategy' object has no attribute 'connection_errors'

Last log lines:
2013-06-19 10:56:58.727 16957 DEBUG glance.common.config [-] Loading glance-api-keystone+cachemanagement from /etc/glance/glance-api-paste.ini load_paste_app /opt/stack/glance/glance/common/config.py:210
2013-06-19 10:56:58.763 16957 WARNING glance.api.v2.images [-] Could not find schema properties file schema-image.json. Continuing without custom properties
2013-06-19 10:56:58.861 16957 DEBUG glance.notifier [-] Converted strategy alias rabbit to glance.notifier.notify_kombu.RabbitStrategy __init__ /opt/stack/glance/glance/notifier/__init__.py:63
2013-06-19 10:56:58.870 16957 INFO glance.notifier.notify_kombu [-] Connecting to AMQP server on localhost:5672
2013-06-19 10:56:58.896 16957 CRITICAL glance [-] 'RabbitStrategy' object has no attribute 'connection_errors'

Considering this bug only seems to affect me, and git is up-to-date on my computer, have you any ideas of what could cause this error?

Thanks in advance!

Question information

English Edit question
Glance Edit question
No assignee Edit question
Solved by:
Last query:
Last reply:
Revision history for this message
Marc PINHEDE (pinhede-marc) said :

The error is generated by line 123, file glance/notifier/notify_kombu.py
Indeed, 'connection_errors' is not an attribute of RabbitStrategy.

Revision history for this message
Marc PINHEDE (pinhede-marc) said :

Hi again,

Fixed temporarily by modifying direclty sources: file glance/notifier/notify_kombu.py, l123

'self.connection_errors = self.connection.connection_errors'
replaced by
'self.connection_errors = Exception'

Maybe not very accurate but it works.