Bug 1229559 - oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config files: /etc/neutron/neutron.conf
Summary: oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config ...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-neutron
Version: 7.0 (Kilo)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: ga
: 7.0 (Kilo)
Assignee: Ihar Hrachyshka
QA Contact: Ofer Blaut
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-09 05:32 UTC by Arie Bregman
Modified: 2023-02-22 23:02 UTC (History)
9 users (show)

Fixed In Version: openstack-neutron-2015.1.0-6.el7ost
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-05 13:25:10 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Launchpad 1442543 0 None None None Never
Red Hat Product Errata RHEA-2015:1548 0 normal SHIPPED_LIVE Red Hat Enterprise Linux OpenStack Platform Enhancement Advisory 2015-08-05 17:07:06 UTC

Description Arie Bregman 2015-06-09 05:32:24 UTC
Description of problem:

When running lbaas unit tests on a system where neutron.conf is installed into /etc/neutron, and if the file does not have read permissions for the user running unit tests, I get the following error:

{0} neutron_lbaas.tests.unit.services.loadbalancer.agent.test_agent.TestLbaasService.test_main [0.113960s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "neutron_lbaas/tests/unit/services/loadbalancer/agent/test_agent.py", line 45, in test_main
        agent.main()
      File "neutron_lbaas/services/loadbalancer/agent/agent.py", line 58, in main
        common_config.init(sys.argv[1:]){0} neutron_lbaas.tests.unit.services.loadbalancer.agent.test_agent.TestLbaasService.test_main [0.113960s] ... FAILED

Captured traceback:
~~~~~~~~~~~~~~~~~~~
    Traceback (most recent call last):
      File "neutron_lbaas/tests/unit/services/loadbalancer/agent/test_agent.py", line 45, in test_main
        agent.main()
      File "neutron_lbaas/services/loadbalancer/agent/agent.py", line 58, in main
        common_config.init(sys.argv[1:])
      File "/home/ihrachyshka/proj/openstack/neutron-lbaas/.tox/py27/src/neutron/neutron/common/config.py", line 185, in init
        **kwargs)
      File "/home/ihrachyshka/proj/openstack/neutron-lbaas/.tox/py27/lib/python2.7/site-packages/oslo_config/cfg.py", line 1856, in __call__
        self._namespace._files_permission_denied)
    oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config files: /etc/neutron/neutron.conf

      File "/home/ihrachyshka/proj/openstack/neutron-lbaas/.tox/py27/src/neutron/neutron/common/config.py", line 185, in init
        **kwargs)
      File "/home/ihrachyshka/proj/openstack/neutron-lbaas/.tox/py27/lib/python2.7/site-packages/oslo_config/cfg.py", line 1856, in __call__
        self._namespace._files_permission_denied)
    oslo_config.cfg.ConfigFilesPermissionDeniedError: Failed to open some config files: /etc/neutron/neutron.conf

This is because oslo.config tries to autodiscover config files, and read them, in case they exist. Unit tests should be isolated from those files.

Comment 3 Ihar Hrachyshka 2015-06-09 10:43:41 UTC
This blocks CI effort for lbaas.

Comment 4 Ihar Hrachyshka 2015-06-09 14:37:24 UTC
For QE: this is a test only change, so we can even safely merge it before ga. Not sure whether any QE involvement is need here at all.

Comment 6 Ihar Hrachyshka 2015-06-15 12:34:09 UTC
Test only change, no need for doc text.

Comment 7 Leonid Natapov 2015-07-21 12:50:08 UTC
openstack-neutron-2015.1.0-12.el7ost.noarch

verified.

Comment 9 errata-xmlrpc 2015-08-05 13:25:10 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2015:1548


Note You need to log in before you can comment on or make changes to this bug.