Unit tests fail with permissions error on /etc/neutron/neutron.conf

Bug #1848239 reported by Corey Bryant
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-arista
Expired
Undecided
Unassigned
networking-arista (Ubuntu)
Triaged
Low
Unassigned

Bug Description

We run the same unit tests that the upstream project runs as part of the Ubuntu package builds. 4 tests are failing as they attempt to access /etc/neutron/neutron.conf, which has permissions (-rw-r----- 1 root neutron). In our case, the tests are executed by a non-root user who is not in the neutron group, and therefore the tests fail because the user can't access the neutron.conf file. It seems s if there is some patching that is missing as I don't think access to the config files is necessary for the unit tests to execute.

Revision history for this message
Corey Bryant (corey.bryant) wrote :

Attaching test failures

description: updated
Revision history for this message
Mark McClain (markmcclain) wrote :

Which branch?

Revision history for this message
Corey Bryant (corey.bryant) wrote :

master

Revision history for this message
Mark McClain (markmcclain) wrote :

I've tried to replicate the error on a fresh 18.04 (Bionic) VM, but I have yet to duplicate the error.

The master branch can sometimes fail when the wrong version of Neutron is installed by tox. When run under the Opendev infrastructure, Zuul magically ensures the correct Neutron requirement when running tests. When locally, the tests must be invoked differently:

tox -e py3-dev
tox -e pep8-dev

NOTE: using 'tox -e py3' will pull the latest Neutron from PyPI which yesterday was stable/stein and today is stable/train and could result in bad test results.

Changed in networking-arista:
status: New → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for networking-arista because there has been no activity for 60 days.]

Changed in networking-arista:
status: Incomplete → Expired
Revision history for this message
James Page (james-page) wrote :

Re-opening this bug for tracking in distro - I've set 0755 permissions on /etc/neutron and /etc/neutron/policy.d but there are still a handful of tests that want permission for neutron.conf which we will continue to skip.

James Page (james-page)
Changed in networking-arista (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Corey Bryant (corey.bryant) wrote :

I've dropped the patch from the ubuntu package as it no longer appears to be needed.

Changed in networking-arista (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Corey Bryant (corey.bryant) wrote :

Moved back to triaged/Low. This still occurs in Ubuntu package builds that run as non-root which is how official Launchpad builds are done. Our lpci builds run as root so that is why it didn't show up there.

Changed in networking-arista (Ubuntu):
status: Fix Released → Triaged
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.