osprofiler is required but not in requirements.txt

Bug #1667417 reported by Corey O'Brien
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Magnum
Fix Released
Undecided
yatin

Bug Description

It looks like the intention is to have osprofiler be an optional install:
https://github.com/openstack/magnum/blob/32d088b/magnum/conf/profiler.py#L20-L21

However, magnum is explicitly assuming that the configuration options are always available:
https://github.com/openstack/magnum/blob/32d088b/magnum/common/profiler.py#L60

Probably need to fix the requirements.txt to always require it (and remove the conditional logic in magnum.conf.profiler) or fix the setup code in magnum.common.profiler to work even if the profiler configuration options are not defined.

Revision history for this message
Jason Dunsmore (jasondunsmore) wrote :

Please add any error output and instructions on how to reproduce to help with debugging.

Revision history for this message
Corey O'Brien (coreypobrien) wrote :

The instructions for reproducing are "run magnum without osprofiler installed". Here's what you get:

Traceback (most recent call last):
  File "/usr/local/bin/magnum-api", line 10, in <module>
    sys.exit(main())
  File "/usr/local/lib/python2.7/site-packages/magnum/cmd/api.py", line 67, in main
    profiler.setup('magnum-api', CONF.host)
  File "/usr/local/lib/python2.7/site-packages/magnum/common/profiler.py", line 60, in setup
    if CONF.profiler.enabled:
  File "/usr/local/lib/python2.7/site-packages/oslo_config/cfg.py", line 2267, in __getattr__
    raise NoSuchOptError(name)
NoSuchOptError: no such option profiler in group [DEFAULT]

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

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

Changed in magnum:
assignee: nobody → Corey O'Brien (coreypobrien)
status: New → In Progress
Changed in magnum:
assignee: Corey O'Brien (coreypobrien) → yatin (yatinkarel)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to magnum (master)

Reviewed: https://review.openstack.org/437902
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=27c3efa2025826e6f1ab31fcbfb1ad8af7181ebc
Submitter: Jenkins
Branch: master

commit 27c3efa2025826e6f1ab31fcbfb1ad8af7181ebc
Author: Corey O'Brien <email address hidden>
Date: Fri Feb 24 08:41:40 2017 -0500

    Remove reliance on osprofiler configuration section

    Change-Id: I5b06afc0da936c1def04375e9990a20b5d53c3e2
    Closes-Bug: 1667417

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

Fix proposed to branch: stable/ocata
Review: https://review.openstack.org/454812

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

Reviewed: https://review.openstack.org/454812
Committed: https://git.openstack.org/cgit/openstack/magnum/commit/?id=bdddbdf2defd5b8cd4996ee6163746571146ea7c
Submitter: Jenkins
Branch: stable/ocata

commit bdddbdf2defd5b8cd4996ee6163746571146ea7c
Author: Corey O'Brien <email address hidden>
Date: Fri Feb 24 08:41:40 2017 -0500

    Remove reliance on osprofiler configuration section

    Change-Id: I5b06afc0da936c1def04375e9990a20b5d53c3e2
    Closes-Bug: 1667417
    Depends-On: Ia2881f5c6b84993850f2642c7a7f240ce6ad3f73

tags: added: in-stable-ocata
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 4.1.2

This issue was fixed in the openstack/magnum 4.1.2 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/magnum 5.0.0

This issue was fixed in the openstack/magnum 5.0.0 release.

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.