Bug 1080560

Summary: ovs_neutron_plugin.ini not ending up with the neutron group set
Product: [Community] RDO Reporter: James Slagle <jslagle>
Component: openstack-neutronAssignee: Pádraig Brady <pbrady>
Status: CLOSED CURRENTRELEASE QA Contact: Ofer Blaut <oblaut>
Severity: urgent Docs Contact:
Priority: urgent    
Version: unspecifiedCC: afazekas, apevec, augol, chrisw, jlibosva, jslagle, majopela, pbrady, rk, twilson, yeylon
Target Milestone: RCKeywords: Reopened
Target Release: Icehouse   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-2014.1-0.13.rc1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-04-09 10:19:42 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 James Slagle 2014-03-25 17:01:23 UTC
Description of problem:
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
should be set to the neutron group, but it's not.

Results in following error when you try to start neutron-openvswitch-agent:
oslo.config.cfg.ConfigFilesNotFoundError: Failed to read some config files: 
/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini

Version-Release number of selected component (if applicable):
[jslagle@neutron ~]$ rpm -q openstack-neutron openstack-neutron-ml2 openstack-neutron-openvswitch
openstack-neutron-2014.1-0.10.b3.fc21.noarch
openstack-neutron-ml2-2014.1-0.10.b3.fc21.noarch
openstack-neutron-openvswitch-2014.1-0.10.b3.fc21.noarch


How reproducible:
100%

Steps to Reproduce:
1. Start with a clean Fedora 20 system, minimal install. Make sure the neutron group does not exist
2. Enable rdo icehouse: sudo yum install -y http://rdo.fedorapeople.org/openstack-icehouse/rdo-release-icehouse.rpm
3. Install neutron: sudo yum install openstack-neutron openstack-neutron-ml2
4. File is not in the neutron group: 
[jslagle@neutron ~]$ sudo ls -l /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini 
-rw-r-----. 1 root root 6149 Mar  6 11:38 /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
[jslagle@neutron ~]$ sudo rpm -V openstack-neutron-openvswitch
......G..  c /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini

Note that uninstalling the packages, rm -rf /etc/neutron, and re-installing the packages, and then it's fine. The file is in the neutron group. I presume b/c the neutron group exists now. It gets created in %pre, so not sure why it doesn't take effect the first time.

Comment 1 James Slagle 2014-03-25 17:02:32 UTC

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

Comment 2 James Slagle 2014-03-25 20:02:25 UTC
Reopening. Note that this bug is not puppet specific.

Comment 3 Alan Pevec 2014-04-03 16:30:42 UTC
Spec looks fine, not sure what's going on: 
%config(noreplace) %attr(0640, root, neutron) %{_sysconfdir}/neutron/plugins/openvswitch/*.ini

Comment 4 Pádraig Brady 2014-04-03 16:36:51 UTC
mmagr put a work around in packstack to fix perms after the fact
(which must be broken?)

Anyway I've still guessing a puppet race with something creating the ini file (as root), before the package gets installed (which creates but doesn't replace the file with the correct perms).

IIRC jlibosva and mmagr identified a potential race in the neutron puppet stuff

Comment 5 Jakub Libosvar 2014-04-03 16:53:34 UTC
(In reply to Pádraig Brady from comment #4)
> mmagr put a work around in packstack to fix perms after the fact
> (which must be broken?)
> 
> Anyway I've still guessing a puppet race with something creating the ini
> file (as root), before the package gets installed (which creates but doesn't
> replace the file with the correct perms).
> 
> IIRC jlibosva and mmagr identified a potential race in the neutron puppet
> stuff
Weirdest part is that per comment 0 it was reproduced without packstack. 
James, are you sure the ini file haven't existed prior to rpm installation? Is it reproducible with some higher rate?

Comment 6 James Slagle 2014-04-03 17:37:36 UTC
Yes, this reproduces 100% of the time, and has nothing to do with puppet at all. Please see the steps to reproduce in the bug description.

I just reproduced again. Installed brand new Fedora 20 Minimal install using the netinst iso.  Same outcome:

[jslagle@localhost ~]$ sudo ls -l /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini 
-rw-r-----. 1 root root 6149 Mar  6 11:38 /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini
[jslagle@localhost ~]$ sudo rpm -V openstack-neutron-openvswitch
......G..  c /etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini


I also saw this go by during the yum install:
  Installing : python-alembic-0.5.0-2.fc20.noarch                         54/58 
  Installing : python-neutron-2014.1-0.10.b3.fc21.noarch                  55/58 
  Installing : openstack-neutron-openvswitch-2014.1-0.10.b3.fc21.noarch   56/58 
warning: group neutron does not exist - using root
  Installing : openstack-neutron-2014.1-0.10.b3.fc21.noarch               57/58 
  Installing : openstack-neutron-ml2-2014.1-0.10.b3.fc21.noarch           58/58 
  Verifying  : python-babel-1.3-2.fc20.noarch                              1/58

Comment 7 Pádraig Brady 2014-04-04 00:28:08 UTC
Ok thanks James I think I see the issue.
Which would have been obvious had I made this change to the neutron package.
In the icehouse-milestone3 release of neutron there was a hack
placed in the spec for the main package to depend on openstack-neutron-openvswitch. Therefore that gets installed before the main package and before the groups are set up :/
Fixing now...

Comment 8 Jakub Libosvar 2014-04-07 14:33:25 UTC
*** Bug 1080328 has been marked as a duplicate of this bug. ***

Comment 9 Jakub Libosvar 2014-04-07 14:43:43 UTC
*** Bug 1080332 has been marked as a duplicate of this bug. ***

Comment 10 Amit Ugol 2014-04-08 19:20:12 UTC
good eyes ;)
I have ran packstack 3 times. the first 'stuck' was with this bug, 2nd was another thing not related and 3rd time went smooth.
as for the time delta, I took my time.

Comment 11 Ihar Hrachyshka 2014-04-22 14:48:05 UTC
*** Bug 1082449 has been marked as a duplicate of this bug. ***