Bug 1082449

Summary: neutron-openvswitch wrong config file permission
Product: [Community] RDO Reporter: Attila Fazekas <afazekas>
Component: openstack-neutronAssignee: Ihar Hrachyshka <ihrachys>
Status: CLOSED DUPLICATE QA Contact: Ofer Blaut <oblaut>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: chrisw, ihrachys, yeylon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-2014.1.0.13.rc1.fc21 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-22 14:48:05 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Attila Fazekas 2014-03-31 06:02:36 UTC
Description of problem:

When I installed all rdo packages in single command I noticed the following warning.

 Installing : openstack-neutron-openvswitch-2014.1-0.10.b3.fc21.noar   243/325
 warning: group neutron does not exist - using root

I also noticed the service was not able to start because of the wrong permissions of 
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini

Version-Release number of selected component (if applicable):
openstack-neutron-openvswitch-2014.1-0.10.b3.fc21.noarch

How reproducible:
always

Steps to Reproduce:
1. yum install -y openstack-neutron-openvswitch # before any other neutron package
2. ls -l /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
-rw-r-----. 1 root root 6149 Mar  6 16:38 /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini

3.$ service neutron-openvswitch-agent start

Actual results:
Redirecting to /bin/systemctl status  neutron-openvswitch-agent.service
neutron-openvswitch-agent.service - OpenStack Neutron Open vSwitch Agent
   Loaded: loaded (/usr/lib/systemd/system/neutron-openvswitch-agent.service; disabled)
   Active: failed (Result: exit-code) since Mon 2014-03-31 05:48:19 UTC; 18s ago
  Process: 937 ExecStart=/usr/bin/neutron-openvswitch-agent --config-file /usr/share/neutron/neutron-dist.conf --config-file /etc/neutron/neutron.conf --config-file /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini --log-file /var/log/neutron/openvswitch-agent.log (code=exited, status=1/FAILURE)
 Main PID: 937 (code=exited, status=1/FAILURE)

Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: Traceback (most recent call last):
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: File "/usr/bin/neutron-openvswitch-agent", line 10, in <module>
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: sys.exit(main())
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: File "/usr/lib/python2.7/site-packages/neutron/plugins/openvswitch/agent/ovs_neutron_agent.py", line 1297, in main
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: cfg.CONF(project='neutron')
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: File "/usr/lib/python2.7/site-packages/oslo/config/cfg.py", line 1599, in __call__
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: raise ConfigFilesNotFoundError(self._namespace.files_not_found)
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom neutron-openvswitch-agent[937]: oslo.config.cfg.ConfigFilesNotFoundError: Failed to read some config files: /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom systemd[1]: neutron-openvswitch-agent.service: main process exited, code=exited, status=1/FAILURE
Mar 31 05:48:19 turul-1396244601-fedora-20-up-custom systemd[1]: Unit neutron-openvswitch-agent.service entered failed state.

Expected results:
 - The service is able to read the sample config file.
 - I should not get a warning message on installation.

Additional info:
 $ getent passwd neutron
neutron:x:999:998:OpenStack Neutron Daemons:/var/lib/neutron:/sbin/nologin
 $ getent group neutron
neutron:x:998:

neutron user and group was created during the installation.

I wonder isn't the neutron-openvswitch-agent should use the /etc/neutron/plugin.ini symbolic link as default config file, 
and as the user I need to create the correct symbolic link as described here: http://openstack.redhat.com/ML2_plugin

Comment 1 Ihar Hrachyshka 2014-04-22 14:11:54 UTC
Should be fixed as of openstack-neutron-2014.1.0.13.rc1.fc21 (commit that allegedly fixed the issue is cf6f6591ef71ab7f2d94ac05c5f73f1378c64979).

Comment 2 Ihar Hrachyshka 2014-04-22 14:27:32 UTC
As for your concern regarding not using plugin.ini symlink, there is a separate bug for this: bug 1087647

Comment 3 Ihar Hrachyshka 2014-04-22 14:48:05 UTC

*** This bug has been marked as a duplicate of bug 1080560 ***