publish_errors cfg option is broken

Bug #1240349 reported by kaitian521
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Wishlist
ChangBo Guo(gcb)
OpenStack Compute (nova)
Fix Released
Wishlist
kaitian521
Havana
Fix Released
Wishlist
Chen Xiao
OpenStack Identity (keystone)
Fix Released
Wishlist
ChangBo Guo(gcb)
Havana
Fix Released
Wishlist
Adam Gandelman
neutron
Fix Released
Wishlist
ChangBo Guo(gcb)

Bug Description

Our nova.conf contains a publish_errors option, which doesn't work because we don't have the necessary oslo modules:

# publish error events (boolean value)
publish_errors=true

[root@ip9-12-17-141 ˜]# Traceback (most recent call last):
  File "/usr/bin/nova-api", line 10, in <module>
    sys.exit(main())
  File "/usr/lib/python2.6/site-packages/nova/cmd/api.py", line 41, in main
    logging.setup("nova")
  File "/usr/lib/python2.6/site-packages/nova/openstack/common/log.py", line 372, in setup
    _setup_logging_from_conf()
  File "/usr/lib/python2.6/site-packages/nova/openstack/common/log.py", line 472, in _setup_logging_from_conf
    logging.ERROR)
  File "/usr/lib/python2.6/site-packages/nova/openstack/common/importutils.py", line 40, in import_object
    return import_class(import_str)(*args, **kwargs)
  File "/usr/lib/python2.6/site-packages/nova/openstack/common/importutils.py", line 30, in import_class
    __import__(mod_str)
ImportError: No module named log_handler

Tags: log
kaitian521 (kaitian521)
tags: added: log
Revision history for this message
kaitian521 (kaitian521) wrote :
Revision history for this message
David Jia (jiataotj) wrote :

according to bug description, this must be a bug against oslo

affects: nova → oslo
Revision history for this message
David Jia (jiataotj) wrote :

reassign this issue to nova

affects: oslo → nova
kaitian521 (kaitian521)
Changed in nova:
assignee: nobody → kaitian521 (kaitian521)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (master)

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

Changed in neutron:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (master)

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

Changed in keystone:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to trove (master)

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

Changed in trove:
assignee: nobody → ChangBo Guo (guochbo)
status: New → In Progress
Revision history for this message
David Stanek (dstanek) wrote :

I've just push a commit[1] to Gerrit that would fix this for all projects. I'm curious to see what people think of the approach because it does not require and changes to a project's openstack-common.conf.

1. https://review.openstack.org/55458

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

Reviewed: https://review.openstack.org/53057
Committed: http://github.com/openstack/nova/commit/1c4e279e187d1b864680c9be7849130cb7f12801
Submitter: Jenkins
Branch: master

commit 1c4e279e187d1b864680c9be7849130cb7f12801
Author: chenxiao <email address hidden>
Date: Tue Oct 22 13:58:18 2013 +0800

    Add log_handler to implement the publish_errors config option

    Synced from Olso.
    Commit Id is Ibf28ba17f81b5ddeda653f6a3501ecac18ffcd42

    This handler sends all error logs as rpc notifications.
    Note: when using publish_errors you also need to set the
    notification_driver option too.

    Change-Id: Ic97b9c8b84d51c84a53ace5b86cc2e72c744f136
    Closes-bug: #1240349

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/56148

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

Reviewed: https://review.openstack.org/55346
Committed: http://github.com/openstack/neutron/commit/932d3549910a8d8dba4620e5b5371c56faea9032
Submitter: Jenkins
Branch: master

commit 932d3549910a8d8dba4620e5b5371c56faea9032
Author: Chang Bo Guo <email address hidden>
Date: Tue Nov 5 22:37:57 2013 -0800

    Fix import log_handler error with publish_errors set

    Sync from Olso.
    Commit Id is Ibf28ba17f81b5ddeda653f6a3501ecac18ffcd42

    This handler sends all error logs as rpc notifications.
    Note: when using publish_errors you also need to set the
    notification_driver option too.

    Closes-bug: #1240349
    Change-Id: Ie66b23af8da2e439e0ac2f5677f6a064e3dd3133

Changed in neutron:
status: In Progress → Fix Committed
Dolph Mathews (dolph)
Changed in keystone:
importance: Undecided → Wishlist
Changed in neutron:
importance: Undecided → Wishlist
milestone: none → icehouse-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to keystone (master)

Reviewed: https://review.openstack.org/55350
Committed: http://github.com/openstack/keystone/commit/1a961bf7e64e7a1610b6be0a5d68bda242352ec4
Submitter: Jenkins
Branch: master

commit 1a961bf7e64e7a1610b6be0a5d68bda242352ec4
Author: Chang Bo Guo <email address hidden>
Date: Tue Nov 5 23:05:50 2013 -0800

    Sync log_handler module from Oslo

    Ibf28ba17f Remove the notifier and its dependencies from log.py

    Move the code related to the publish error handler out of the
    log module so its easier for other projects to consume it

    Closes-bug: #1240349
    Change-Id: Ib97bc01b60d7ea6c2e6bc3f0229deffbadbf18cc

Changed in keystone:
status: In Progress → Fix Committed
Changed in nova:
milestone: none → icehouse-1
Thierry Carrez (ttx)
Changed in keystone:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in neutron:
status: Fix Committed → Fix Released
Changed in cinder:
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/55348
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=f29f812bc64726b01a50590894d6d430c5f3d30d
Submitter: Jenkins
Branch: master

commit f29f812bc64726b01a50590894d6d430c5f3d30d
Author: Chang Bo Guo <email address hidden>
Date: Tue Nov 5 22:56:36 2013 -0800

    Fix import log_handler error with publish_errors set

    Sync latest module log_handler from Oslo.
    Commit Id is 2843a92a0e4007f50d5ad63d51fe574e1ba5e280

    This handler sends the error to configured notifier.
    The notifier could be any kind (log, RPC, no_op, None).

    Note: when using publish_errors you also need to set the
    notification_driver option too.

    Closes-bug: #1240349
    Change-Id: I4f759b049b8f34904ba11382a2e8fc1578677a8f

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

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/69719

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to keystone (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/69720

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron (stable/havana)

Fix proposed to branch: stable/havana
Review: https://review.openstack.org/69721

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/havana)

Reviewed: https://review.openstack.org/56148
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=381f241fc781022bc5e805e5ae592f44c9277e5a
Submitter: Jenkins
Branch: stable/havana

commit 381f241fc781022bc5e805e5ae592f44c9277e5a
Author: chenxiao <email address hidden>
Date: Tue Oct 22 13:58:18 2013 +0800

    Add log_handler to implement the publish_errors config option

    Synced from Olso.
    Commit Id is Ibf28ba17f81b5ddeda653f6a3501ecac18ffcd42

    This handler sends all error logs as rpc notifications.
    Note: when using publish_errors you also need to set the
    notification_driver option too.

    Change-Id: Ic97b9c8b84d51c84a53ace5b86cc2e72c744f136
    Closes-bug: #1240349
    (cherry picked from commit 1c4e279e187d1b864680c9be7849130cb7f12801)

tags: added: in-stable-havana
Alan Pevec (apevec)
Changed in nova:
importance: Undecided → Wishlist
Changed in trove:
importance: Undecided → Wishlist
Alan Pevec (apevec)
tags: removed: in-stable-havana
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → icehouse-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in keystone:
milestone: icehouse-1 → 2014.1
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-1 → 2014.1
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-3 → 2014.1
Thierry Carrez (ttx)
Changed in neutron:
milestone: icehouse-1 → 2014.1
Revision history for this message
Nikhil Manchanda (slicknik) wrote :

The publish_errors option do not exist in any of the trove CONF files.

Changed in trove:
status: In Progress → Invalid
no longer affects: trove
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.