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.
This blocks CI effort for lbaas.
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.
Test only change, no need for doc text.
openstack-neutron-2015.1.0-12.el7ost.noarch verified.
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