Windows syslog import error

Bug #1459187 reported by Lucian Petrut
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
oslo.log
Fix Released
Medium
Julien Danjou

Bug Description

In this commit 33f5c6f94d94d5464fea38229d880f177b05aff7 , the syslog module is imported although it might not be used. In fact, this will raise an ImportError on Windows.

For this reason, services such as Nova Compute or Neutron Hyper-V Agent will fail to start on Windows when using oslo.log 1.2.0.

This can be avoided by simply checking the platform or catching ImportError, in which case we should make sure that the syslog handler will not be used.

Revision history for this message
Julien Danjou (jdanjou) wrote :

looks like we have more work to do to also support Windows, but this does not seem to be a regression in functionality, just a problem with import so the workaround suggested looks good

Changed in oslo.log:
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Julien Danjou (jdanjou)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.log (master)

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

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

Reviewed: https://review.openstack.org/186037
Committed: https://git.openstack.org/cgit/openstack/oslo.log/commit/?id=1d64c9184214f3a7f2888d85acee93247278a0ec
Submitter: Jenkins
Branch: master

commit 1d64c9184214f3a7f2888d85acee93247278a0ec
Author: Julien Danjou <email address hidden>
Date: Wed May 27 17:21:43 2015 +0200

    Do not fail if syslog is not available

    Some platforms (e.g. Windows) do not have the syslog module and
    therefore fails when importing it. Handle that case

    Change-Id: I86ca0ff2bb3fbfbcaf4a04692ff7871654add5bc
    Closes-Bug: #1459187

Changed in oslo.log:
status: In Progress → Fix Committed
Changed in oslo.log:
milestone: none → 1.4.0
status: Fix Committed → Fix Released
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.