Notifier fails to start when old config params are used and there are missing dependencies

Bug #1302661 reported by Flavio Percoco
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Critical
Flavio Percoco

Bug Description

The current implementation always tries to get a transport from oslo.messaging assuming the transport_url option has been set. This is done to keep backwards compatibility. However, since the default `rpc_backend` is rabbit, it'll always try to load such driver. The problem raises when `kombu` is not installed and the `notifier_strategy` is set to qpid. This will make glance-api fail because it'll try to load the rabbit driver *before* loading the qpid one.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

Fix proposed to branch: master
Review: https://review.openstack.org/85382

Changed in glance:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/85382
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=164d1ab46f06141e2c12b944e15ae10f20dace38
Submitter: Jenkins
Branch: master

commit 164d1ab46f06141e2c12b944e15ae10f20dace38
Author: Flavio Percoco <email address hidden>
Date: Fri Apr 4 17:16:32 2014 +0200

    Catch loading failures if transport_url is not set

    The current implementation always tries to get a transport from
    oslo.messaging assuming the transport_url option has been set. This is
    done to keep backwards compatibility. However, since the default
    `rpc_backend` is rabbit, it'll always try to load such driver. The
    problem raises when `kombu` is not installed and the `notifier_strategy`
    is set to qpid. This will make glance-api fail because it'll try to load
    the rabbit driver *before* loading the qpid one.

    This patch puts the first load attempt in a try / except block. The
    error caught (if any) will be re-raised *just* if transport_url has been
    configured, otherwise it'll move forward and try to load the notifier
    driver using the old configuration options.

    The patch also removes an obsolete test.

    Change-Id: I00e653704463ea8245e2960050e0d5e6839f278a
    Closes-bug: #1302661

Changed in glance:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/85664

Thierry Carrez (ttx)
tags: added: icehouse-rc-potential
Thierry Carrez (ttx)
Changed in glance:
milestone: none → icehouse-rc2
no longer affects: glance/icehouse
tags: removed: icehouse-rc-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (milestone-proposed)

Reviewed: https://review.openstack.org/85664
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=69fdd19cf1f780a24c48efa5fc3f317f6b451f9c
Submitter: Jenkins
Branch: milestone-proposed

commit 69fdd19cf1f780a24c48efa5fc3f317f6b451f9c
Author: Flavio Percoco <email address hidden>
Date: Fri Apr 4 17:16:32 2014 +0200

    Catch loading failures if transport_url is not set

    The current implementation always tries to get a transport from
    oslo.messaging assuming the transport_url option has been set. This is
    done to keep backwards compatibility. However, since the default
    `rpc_backend` is rabbit, it'll always try to load such driver. The
    problem raises when `kombu` is not installed and the `notifier_strategy`
    is set to qpid. This will make glance-api fail because it'll try to load
    the rabbit driver *before* loading the qpid one.

    This patch puts the first load attempt in a try / except block. The
    error caught (if any) will be re-raised *just* if transport_url has been
    configured, otherwise it'll move forward and try to load the notifier
    driver using the old configuration options.

    The patch also removes an obsolete test.

    Change-Id: I00e653704463ea8245e2960050e0d5e6839f278a
    Closes-bug: #1302661
    (cherry picked from commit 164d1ab46f06141e2c12b944e15ae10f20dace38)

Changed in glance:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in glance:
milestone: icehouse-rc2 → 2014.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.