privsep configuration is invalid

Bug #1652157 reported by Sean M. Collins
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Undecided
Davanum Srinivas (DIMS)
oslo.rootwrap
Fix Released
Undecided
Davanum Srinivas (DIMS)

Bug Description

http://logs.openstack.org/76/414176/6/check/gate-devstack-dsvm-py35-updown-ubuntu-xenial-nv/e100b7f/logs/devstacklog.txt.gz#_2016-12-22_19_44_56_941

2016-12-22 19:44:56.941 | 2016-12-22 19:44:56.940 24861 ERROR neutron.agent.ovsdb.impl_vsctl [-] Unable to execute ['ovs-vsctl', '--timeout=10', '--oneline', '--format=json', '--', '--id=@manager', 'create', 'Manager', 'target="ptcp:6640:127.0.0.1"', '--', 'add', 'Open_vSwitch', '.', 'manager_options', '@manager']. Exception: Failed to spawn rootwrap process.
2016-12-22 19:44:56.941 | stderr:
2016-12-22 19:44:56.941 | b'Traceback (most recent call last):\n File "/usr/local/bin/neutron-rootwrap-daemon", line 10, in <module>\n sys.exit(daemon())\n File "/usr/local/lib/python3.5/dist-packages/oslo_rootwrap/cmd.py", line 57, in daemon\n return main(run_daemon=True)\n File "/usr/local/lib/python3.5/dist-packages/oslo_rootwrap/cmd.py", line 91, in main\n filters = wrapper.load_filters(config.filters_path)\n File "/usr/local/lib/python3.5/dist-packages/oslo_rootwrap/wrapper.py", line 120, in load_filters\n filterconfig.read(os.path.join(filterdir, filterfile))\n File "/usr/lib/python3.5/configparser.py", line 696, in read\n self._read(fp, filename)\n File "/usr/lib/python3.5/configparser.py", line 1089, in _read\n fpname, lineno)\nconfigparser.DuplicateOptionError: While reading from \'/etc/neutron/rootwrap.d/privsep.filters\' [line 32]: option \'privsep\' in section \'Filters\' already exists\n'

https://github.com/openstack/neutron/blob/master/etc/neutron/rootwrap.d/privsep.filters#L32-L36

Revision history for this message
Sean M. Collins (scollins) wrote :

This causes stack.sh to fail and the job to fail.

Revision history for this message
Sean M. Collins (scollins) wrote :

Traced back to this change, which merged this morning https://review.openstack.org/#/c/394741/

Revision history for this message
Sean M. Collins (scollins) wrote :

Note that this is with Python 3.5

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to oslo.rootwrap (master)

Fix proposed to branch: master
Review: https://review.openstack.org/414330

Changed in oslo.rootwrap:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress
Revision history for this message
ChangBo Guo(gcb) (glongwave) wrote :

We'd better to figure out if the content is right in the rootwrap filter config files, we prefer to use strict=True for in the future as described "In previous versions of configparser behaviour matched strict=False." from: https://docs.python.org/3/library/configparser.html

Revision history for this message
John Davidge (john-davidge) wrote :

Is any further action needed to fix this for neutron or does the oslo.rootwrap change cover it?

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

John,

I believe only one of those privsep lines kick in. So i think the default should be in the file and the other one can be in the docs.

-- Dims

Changed in neutron:
assignee: nobody → Davanum Srinivas (DIMS) (dims-v)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to neutron (master)

Reviewed: https://review.openstack.org/414611
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=45ef8997e81c2648c6f8f10aafe427abe7b5730a
Submitter: Jenkins
Branch: master

commit 45ef8997e81c2648c6f8f10aafe427abe7b5730a
Author: Davanum Srinivas <email address hidden>
Date: Fri Dec 23 10:12:00 2016 -0500

    Remove Duplicate line in privsep.filters

    Only one line is picked up by configparser, so we should just
    have one in the default privsep.filters file. This was found when
    a stricter configparser kicked in for a python3.5 test.

    Closes-Bug: #1652157
    Change-Id: Ib7d9aa0e0b74a936002e0eea0b3af05102b06a62

Changed in neutron:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/oslo.rootwrap 5.3.1

This issue was fixed in the openstack/oslo.rootwrap 5.3.1 release.

tags: added: neutron-proactive-backport-potential
tags: removed: neutron-proactive-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/neutron 10.0.0.0b3

This issue was fixed in the openstack/neutron 10.0.0.0b3 development milestone.

Changed in oslo.rootwrap:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.