AttributeError: 'module' object has no attribute '_logger'

Bug #1708190 reported by Matt Riedemann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack DBaaS (Trove)
Fix Released
Undecided
Matt Riedemann

Bug Description

Seeing this here:

http://logs.openstack.org/42/490042/1/check/gate-trove-tox-apiexamples-ubuntu-xenial/97ab5c7/console.html#_2017-08-02_14_33_34_186648

2017-08-02 14:33:34.186056 | Traceback (most recent call last):
2017-08-02 14:33:34.186252 | File "/home/jenkins/workspace/gate-trove-tox-apiexamples-ubuntu-xenial/run_tests.py", line 251, in main
2017-08-02 14:33:34.186301 | import_func()
2017-08-02 14:33:34.186375 | File "generate_examples.py", line 26, in import_tests
2017-08-02 14:33:34.186428 | from trove.tests.examples import snippets
2017-08-02 14:33:34.186533 | File "/home/jenkins/workspace/gate-trove-tox-apiexamples-ubuntu-xenial/trove/tests/examples/snippets.py", line 36, in <module>
2017-08-02 14:33:34.186589 | trove_client._logger.setLevel(logging.CRITICAL)
2017-08-02 14:33:34.186648 | AttributeError: 'module' object has no attribute '_logger'

http://logstash.openstack.org/#dashboard/file/logstash.json?query=message%3A%5C%22trove_client._logger.setLevel(logging.CRITICAL)%5C%22%20AND%20tags%3A%5C%22console%5C%22&from=7d

32 hits in 7 days, check and gate, all failures.

Matt Riedemann (mriedem)
Changed in python-troveclient:
status: New → Confirmed
Revision history for this message
Matt Riedemann (mriedem) wrote :

I don't know how this even works in trove, but this was broken by this change in python-troveclient:

https://github.com/openstack/python-troveclient/commit/ccceffa7f56bfcc2ff42f98a6272ace866993d09

no longer affects: python-troveclient
Changed in trove:
status: New → Confirmed
assignee: nobody → Matt Riedemann (mriedem)
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/490061

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

Reviewed: https://review.openstack.org/490061
Committed: https://git.openstack.org/cgit/openstack/trove/commit/?id=0fb67d459baa0fb22391b1b1da3dba5349666bb7
Submitter: Jenkins
Branch: master

commit 0fb67d459baa0fb22391b1b1da3dba5349666bb7
Author: Matt Riedemann <email address hidden>
Date: Wed Aug 2 11:46:16 2017 -0400

    Fix AttributeError in api example snippets tests

    Change I3f020b6bcb1b9bf6d18a3b4f738c13cccd1bbff8 in
    python-troveclient 2.11.0 changed the
    troveclient.compat.client._logger variable to be a LOG
    variable.

    I have no idea how this hasn't been breaking the Trove
    API examples CI job since python-troveclient 2.11.0 was
    released. Maybe it has an no one has noticed or cared to
    fix it.

    Anyway, this adds hasattr checking in the test code to
    set the log level on the correct variable based on which
    version of troveclient is being used.

    Also - no idea why setting the log level in the client
    for these API tests is even necessary, but this dates back
    to a change in 2014 so who knows. Not me.

    --

    This also fixes bug 1708171 by making nova run in
    singleconductor mode so the affinity/anti-affinity
    scheduling tests work. Trove CI is blocked by both
    changes so they have to go together.

    Change-Id: Iaf00fc55336a8049c8303b8fa2849df2366115e6
    Closes-Bug: #1708190
    Closes-Bug: #1708171

Changed in trove:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/trove 8.0.0.0rc1

This issue was fixed in the openstack/trove 8.0.0.0rc1 release candidate.

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.