Nonexistent module in allowed_rpc_exception_modules property of ironic.conf.sample

Bug #1250575 reported by Max Lobur
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ironic
Fix Released
Medium
Max Lobur

Bug Description

Need to regenerate this sample in order to get acceptable list of exceptions
1. ironic.openstack.common.exception does not exist;
2. I'm not sure if we're able to get nova.exception or cinder.exception on Conductor side;
3. Need to add ironic.common.exception since this one is widely used across Conductor;

There is wrong default value in ironic/openstack/common/rpc/__init__.py, that's where the wrong sample comes from. Since it's under openstack/common we need to override this option somewhere, f.e. in /ironic/conductor/rpcapi.py, and regenerate the sample config.

The wrong config leads to improper deserialization of remote exceptions. As a result for our Ironic exceptions we're always getting instance of rpc.common:RemoteError which doesn't inherit IronicException and therefore bypassed by our except blocks. (see ironic/openstack/common/rpc/common.py: deserialize_remote_exception)

Max Lobur (max-lobur)
Changed in ironic:
assignee: nobody → Max Lobur (max-lobur)
Max Lobur (max-lobur)
description: updated
description: updated
Max Lobur (max-lobur)
description: updated
Changed in ironic:
status: New → In Progress
Revision history for this message
aeva black (tenbrae) wrote :

Problem seems to stem from
  http://git.openstack.org/cgit/openstack/ironic/tree/ironic/openstack/common/rpc/__init__.py#n59

Solution, if I understand correctly, is that we need to add "ironic.common.exception" to that list. I see that some other projects have manually added their exception module to the allowed list. See Heat:
  http://git.openstack.org/cgit/openstack/heat/commit/?id=d0765af7c8b17d48b2fe3c70e87383af4bd0c5c9

Changed in ironic:
importance: Undecided → Medium
Revision history for this message
aeva black (tenbrae) wrote :

Discussed with Doug on IRC, and he commented that the oslo.rpc stuff may be getting replaced by oslo.messaging soon. In the mean time, we could override the default with a set_default() call inside of Ironic. It wouldn't change the sample.conf line, but this probably shouldn't be an option anyway.

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

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

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

Reviewed: https://review.openstack.org/56650
Committed: http://github.com/openstack/ironic/commit/0c9b53b2a3d20f70b3024c1ae19776a4fecf576c
Submitter: Jenkins
Branch: master

commit 0c9b53b2a3d20f70b3024c1ae19776a4fecf576c
Author: Max Lobur <email address hidden>
Date: Fri Nov 15 18:38:09 2013 +0200

    Redefined default value of allowed_rpc_exception_modules

    Redefined allowed_rpc_exception_modules in ironic code since initial
    setting is set in Oslo (ironic.openstack.common.rpc.__init__). This
    will force RPC exception deserialization work with Ironic exceptions
    instead of RemoteError.

    Change-Id: Ibb10dc5d0dd58ae407980d97bd4f86ed22c7988b
    Closes-Bug: #1250575

Changed in ironic:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in ironic:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in ironic:
milestone: icehouse-1 → 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.