Currently glance seems to have separate notification mechanisms in glance/notifier and glance/openstack/common/notifier The former at least is cofigured through the notifier_strategy config option. If however one sets that to rabbit, but default you'll get very confusing error messages. Nothing direct, nor even an import error message. To support "rabbit", one needs to install python-kombu, python-anyjson, and python-amqplib So perhaps we should hard depend on them? Note python-nova depends on them and so will mask this issue when clance and nova are on the same system. Note python-kombu was removed as a glance hard dep in: http://pkgs.fedoraproject.org/cgit/openstack-glance.git/commit/?id=a3de523df99 If we don't add a hard dep, then perhaps we could improve the error message presented in this case.
John, any input on this?
I think we should certainly improve the error message. kombu and anyjson are both in the requirements.txt file of Glance, so I think that the rpm should depend on them (amqplib is not in there). In general I do not like how Glance handles plugins and dependencies. It seems to me that if the base distribution has options like 'rabbit_host' that when installed such features should work.
(In reply to John Bresnahan from comment #2) > kombu and anyjson > are both in the requirements.txt file of Glance, so I think that the rpm > should depend on them (amqplib is not in there). I wouldn't follow requirements blindly, in this case this is really a soft dep and should be handled gracefully i.e. try_import with the appropriate message when notifier config option is set.
There are more issues related to soft deps on Glance startup, here's api.log from a smoketest again default Packstack allinone installation, which should be all defaults in glance config except notifier_strategy which is set to qpid: ERROR glance.store.sheepdog [-] Error in store configuration: Unexpected error while running command. Command: collie Exit code: 127 Stdout: '' Stderr: '/bin/sh: collie: command not found\n' WARNING glance.store.base [-] Failed to configure store correctly: Store sheepdog could not be configured correctly. Reason: Error in store configuration: Unexpected error while running command. Command: collie Exit code: 127 Stdout: '' Stderr: '/bin/sh: collie: command not found\n' Disabling add method. WARNING glance.store.base [-] Failed to configure store correctly: Store cinder could not be configured correctly. Reason: Cinder storage requires a context. Disabling add method. CRITICAL glance [-] 'glance.notifier.notify_qpid.QpidStrategy' is not an available notifier strategy. BTW ^^^ qpid failed 1st time, but on 2nd run it worked, is that dependency issue with puppet-qpid?
re. sheepdog and cinder store errors: Glance tries to configure all stores listed in known_stores config parameter and by default that's all of them: # glance.store.filesystem.Store, # glance.store.http.Store, # glance.store.rbd.Store, # glance.store.s3.Store, # glance.store.swift.Store, # glance.store.sheepdog.Store, # glance.store.cinder.Store, This should be restricted in glance-api-dist.conf to avoid above errors on startup.
Agreed, stores should be restricted in glance-api-dist.conf. As for the notification code, it'll be aligned with Oslo's during Icehouse.
So there are 3 things in this bug: 1. improve warnings with "rabbit" selected but dependent packages not installed 2. Set an appropriate default list of "known_stores" 3. Fix the qpid "notifier_strategy" strategy. 2 and 3 are tracked at bug 1006783
Small update: The list of known_stores will be limited in glance itself[0]. The default stores will be file / http, which don't require any configuration. [0] https://review.openstack.org/#/c/59150/
Glance no longer implements its own notifier. It now relies on oslo.messaging
The patch was merged upstream. Only the filesystem store and the http store are enabled by default. All other stores will need to be enabled explicitly.
Verified on: RHEL7 python-glance-2014.1-4.el7ost.noarch python-glanceclient-0.12.0-1.el7ost.noarch openstack-glance-2014.1-4.el7ost.noarch 1. Installed deployment 2. Enabled log 3. Restarted Glance service 4. Checked log no mention of start up errors for none default store. Only http and filesystem stores enabled by default.
Created attachment 908127 [details] Glance api.log
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2014-0851.html
Cancelling old needinfo request.