Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1115408

Summary: Neutron packaging attempts to update sudoers config file avoiding usual procedure
Product: Red Hat OpenStack Reporter: Ihar Hrachyshka <ihrachys>
Component: openstack-neutronAssignee: Ihar Hrachyshka <ihrachys>
Status: CLOSED ERRATA QA Contact: Ofer Blaut <oblaut>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.0CC: chrisw, ihrachys, lpeer, nyechiel, sclewis, yeylon
Target Milestone: rc   
Target Release: 5.0 (RHEL 6)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: openstack-neutron-2014.1.1-2.el6ost Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 1115406 Environment:
Last Closed: 2014-07-28 18:58:48 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:
Bug Depends On: 1115406    
Bug Blocks:    

Description Ihar Hrachyshka 2014-07-02 10:05:47 UTC
+++ This bug was initially created as a clone of Bug #1115406 +++

Description of problem:

In neutron spec, we have the following 'magic fix' for incorrect sudoers file:

%postun
...
    # Fix sudoers file on old installations
    sed -i 's/^neutron ALL = (root) NOPASSWD: SETENV: \/usr\/bin\/neutron-rootwrap$/neutron ALL = (root) NOPASSWD: \/usr\/bin\/neutron-rootwrap \/etc\/neutron\/ro
...

This is to enforce update for sudoers file that had a security issue before bug 1039817 was fixed.

This 'magic fix' makes TPS test fail as in: http://nest.test.redhat.com/mnt/qa/scratch/stable-rhos5-rhel6-01/2014:17999/tps/tps-rpmtest.html

The sudoers file is a config file with 'noreplace' tag, meaning that it's not replaced on package update in case that it was touched by a user. In that case, an .rpmnew file is created, and a user is expected to merge new changes back to the config file. We should not change that. So the fix cited above should be removed.

Steps to Reproduce:
- install openstack-neutron-2013.2.1-1 or earlier.
- modify /etc/sudoers.d/neutron.
- upgrade it to openstack-neutron-2013.2.1-2.
- check that /etc/sudoers.d/neutron was modified on package update.

Expected results:
- /etc/sudoers.d/neutron should not be touched on package update. Instead, .rpmnew file is created, and a user is expected to update the config file manually.

Comment 1 Ihar Hrachyshka 2014-07-02 10:06:35 UTC
Steps to Reproduce adopted for Icehouse:
- install openstack-neutron-2013.2.1-1 or earlier.
- modify /etc/sudoers.d/neutron.
- upgrade it to openstack-neutron-2014.1-1.
- check that /etc/sudoers.d/neutron was modified on package update.

Comment 2 Ihar Hrachyshka 2014-07-02 15:48:13 UTC
OK, later discussion turned out that we probably want the file not to have noreplace tag, so expected result now is:

(for argumentation see bug 1039817 comment 16)
- /etc/sudoers.d/neutron should updated with the new RPM content, ensuring security issue is fixed
- .rpmsave file is created in case there were local changes, user is expected to use separate sudoers file for custom changes

Comment 5 Ihar Hrachyshka 2014-07-17 08:00:26 UTC
Everything before openstack-neutron-2014.1.1-2.el6ost that is 'Fixed in Version'?

Comment 9 errata-xmlrpc 2014-07-28 18:58:48 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.

http://rhn.redhat.com/errata/RHEA-2014-0953.html