<div dir="ltr">I just checked with another run and the log shows that the vpnaas.filters file is indeed in the .tox area. So, still stumped as to why the rootwrap daemon is looking for the config file in /etc/neutron/rootwrap.d/<br><div><br></div><div>Any ideas?</div><div><br></div><div>PCM</div><div><br></div></div><br><div class="gmail_quote">On Mon, Apr 27, 2015 at 7:21 AM Paul Michali <<a href="mailto:pc@michali.net">pc@michali.net</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The latter. If you look at Jenkins results for 168115, it shows that there is an invalid config file at /etc/neutron/rootwrap.conf. However, it should be accessing /opt/stack/new/neutron-vpnaas/.tox/dsvm-functional-sswan/etc/neutron/rootwrap.conf.<div><br></div><div>The deploy_rootwrap.sh call in tox.ini should place the files in the .tox area (it does locally), and the OS_ROOTWRAP_CMD (and OS_ROOTWRAP_DAEMON_CMD) are set to these areas as well. It just seems that the rootwrap daemon is not using the right file.<br><div><br></div><div>In the latest run, I dumped out environment variables, which show this:</div><pre style="color:rgb(0,0,0);line-height:normal"><span style="padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_15_499" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_15_499" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:15.499</a> | 2015-04-24 15:19:15.466 | OS_ROOTWRAP_DAEMON_CMD=sudo /opt/stack/new/neutron-vpnaas/.tox/dsvm-functional-sswan/bin/neutron-rootwrap-daemon /opt/stack/new/neutron-vpnaas/.tox/dsvm-functional-sswan/etc/neutron/rootwrap.conf
</span><span style="padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_15_499" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_15_499" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:15.499</a> | 2015-04-24 15:19:15.467 | OS_SUDO_TESTING=1
</span><span style="padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_15_499" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_15_499" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:15.499</a> | 2015-04-24 15:19:15.469 | OS_ROOTWRAP_CMD=sudo /opt/stack/new/neutron-vpnaas/.tox/dsvm-functional-sswan/bin/neutron-rootwrap /opt/stack/new/neutron-vpnaas/.tox/dsvm-functional-sswan/etc/neutron/rootwrap.conf
</span></pre><div><br></div><div>I have added a test case in the module that is failing that shows the value of <span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:normal;white-space:pre-wrap">cfg</span><span style="color:rgb(102,102,0);font-family:monospace;font-size:12px;line-height:normal;white-space:pre-wrap">.</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:normal;white-space:pre-wrap">CONF</span><span style="color:rgb(102,102,0);font-family:monospace;font-size:12px;line-height:normal;white-space:pre-wrap">.</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:normal;white-space:pre-wrap">AGENT</span><span style="color:rgb(102,102,0);font-family:monospace;font-size:12px;line-height:normal;white-space:pre-wrap">.</span><span style="color:rgb(0,0,0);font-family:monospace;font-size:12px;line-height:normal;white-space:pre-wrap">root_helper_daemon</span><span style="line-height:1.5;font-size:13.1999998092651px">. It shows:</span></div><div><br></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:normal;white-space:pre-wrap">sudo /opt/stack/new/neutron-vpnaas/.tox/dsvm-functional-sswan/bin/neutron-rootwrap-daemon /opt/stack/new/neutron-vpnaas/.tox/dsvm-functional-sswan/etc/neutron/rootwrap.conf</span><br></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:normal;white-space:pre-wrap"><br></span></div></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:normal;white-space:pre-wrap">Is that correct?</span></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:normal;white-space:pre-wrap"><br></span></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:normal;white-space:pre-wrap">When the test cases run, there is this error:</span></div><div><span style="color:rgb(0,0,0);font-family:monospace;font-size:medium;line-height:normal;white-space:pre-wrap"><br></span></div><div><pre><span style="color:rgb(0,0,0);line-height:normal;padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_18_536" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_18_536" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:18.536</a> | 2015-04-24 15:19:18.486 |     2015-04-24 15:19:17.986 31628 INFO oslo_rootwrap.client [-] Spawned new rootwrap daemon process with pid=31667
</span><span style="color:rgb(0,0,0);line-height:normal;padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_18_536" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_18_536" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:18.536</a> | 2015-04-24 15:19:18.487 |     2015-04-24 15:19:18.470 31628 ERROR neutron.agent.linux.utils [-] 
</span><span style="color:rgb(0,0,0);line-height:normal;padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_18_536" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_18_536" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:18.536</a> | 2015-04-24 15:19:18.489 |     Command: ['neutron-vpn-netns-wrapper', '--mount_paths=/etc:/var/lib/neutron/vpnaas/func-8f1b728c-6eca-4042-9b6b-6ef66ab9352a/etc,/var/run:/var/lib/neutron/vpnaas/func-8f1b728c-6eca-4042-9b6b-6ef66ab9352a/var/run', '--cmd=nofiltercommand']
</span><span style="color:rgb(0,0,0);line-height:normal;padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_18_537" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_18_537" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:18.537</a> | 2015-04-24 15:19:18.490 |     Exit code: 22
</span><span style="color:rgb(0,0,0);line-height:normal;padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_18_537" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_18_537" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:18.537</a> | 2015-04-24 15:19:18.492 |     Stdin: 
</span><span style="color:rgb(0,0,0);line-height:normal;padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_18_537" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_18_537" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:18.537</a> | 2015-04-24 15:19:18.493 |     Stdout: 
</span><span style="color:rgb(0,0,0);line-height:normal;padding-left:22em;white-space:pre-wrap;display:block"><a name="msg-f:1499603851127550728__2015-04-24_15_19_18_537" href="http://logs.openstack.org/15/168115/29/check/check-neutron-vpnaas-dsvm-functional-sswan/c857bcd/console.html.gz#_2015-04-24_15_19_18_537" style="color:rgb(0,0,0);text-decoration:none" target="_blank">2015-04-24 15:19:18.537</a> | 2015-04-24 15:19:18.495 |     Stderr: 2015-04-24 15:19:18.456 31727 ERROR neutron_vpnaas.services.vpn.common.netns_wrapper [-] Incorrect configuration file: /etc/neutron/rootwrap.conf
</span><div style="color:rgb(0,0,0);line-height:normal"><br></div><div style="color:rgb(0,0,0);line-height:normal">Now, there is a vpnaas.filters file that I copy into the rootwrap.d area, using this command in the tox.ini:</div><div style="color:rgb(0,0,0);line-height:normal"><br></div><div><font color="#000000"><span style="line-height:normal">cp {toxinidir}/etc/neutron/rootwrap.d/vpnaas.filters {envdir}/etc/neutron/rootwrap.d/<br></span></font></div><div><font color="#000000"><span style="line-height:normal"><br></span></font></div><div><font color="#000000"><span style="line-height:normal">The file has the neutorn-vpn-netns-wrapper entry in it. Maybe the copy is failing?</span></font></div><div><font color="#000000"><span style="line-height:normal"><br></span></font></div><div><font color="#000000"><span style="line-height:normal">Regards,</span></font></div><div><font color="#000000"><span style="line-height:normal"><br></span></font></div><div><font color="#000000"><span style="line-height:normal">PCM</span></font></div><div><font color="#000000"><span style="line-height:normal"><br></span></font></div></pre></div></div><br><div class="gmail_quote">On Sun, Apr 26, 2015 at 9:39 PM Angus Lees <<a href="mailto:gus@inodes.org" target="_blank">gus@inodes.org</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">The tox.ini entry for dsvm-fullstack sets OS_ROOTWRAP_CMD=sudo {envbindir}/neutron-rootwrap {envdir}/etc/neutron/rootwrap.conf (and something similar for rootwrap-daemon).<br><div><br></div><div>Is this the answer you were looking for, or are you saying OS_ROOTWRAP_CMD doesn't appear to be honoured in your case?</div><div><br></div><div> - Gus</div></div><div dir="ltr"><br><div class="gmail_quote">On Sat, 25 Apr 2015 at 00:45 Ihar Hrachyshka <<a href="mailto:ihrachys@redhat.com" target="_blank">ihrachys@redhat.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">-----BEGIN PGP SIGNED MESSAGE-----<br>
Hash: SHA256<br>
<br>
On 04/24/2015 04:02 PM, Ihar Hrachyshka wrote:<br>
> On 04/24/2015 03:48 PM, Paul Michali wrote:<br>
>> Hi, I'm floundering a bit, and could use some guidance on<br>
>> this...<br>
><br>
>> For the neutron-vpnaas repo, I am trying to modify the<br>
>> functional jobs (dsvm-functional and dsvm-functional-sswan) to<br>
>> act in a similar manner to neutron, where devstack is configured,<br>
>> but no stacking is performed.<br>
><br>
>> I'm trying to do the same thing and have the jobs doing the<br>
>> configuration only. Side note: there are two jobs, because there<br>
>> are currently two reference implementations of VPN drivers, each<br>
>> of which require a different IPSec package installed.<br>
><br>
>> As part of this setup, in tox.ini, the neutron<br>
>> deploy_rootwrap.sh script is called which places the rootwrap<br>
>> filters and config file in the repo's<br>
>> .tox/dsvm-functional/etc/neutron/ area (or<br>
>> ./tox/dsvm-functional-sswan/etc/neutron/).<br>
><br>
>> Now, the issue I see is that tests trying to run "ip" commands,<br>
>> are failing saying that the config file is invalid:<br>
><br>
>> ERROR neutron_vpnaas.services.vpn.common.netns_wrapper [-]<br>
>> Incorrect configuration file: /etc/neutron/rootwrap.conf<br>
><br>
>> As you can see, this is trying to access the rootwrap.conf in<br>
>> /etc/neutron and not the one in<br>
>> /opt/stack/new/neutron-vpnaas/.tox/dsvm-functioanl-sswan/etc/neutron/<br>
.<br>
><br>
>>  For Neutron, how is the dsvm-functional job directing the<br>
>> rootwrap daemon to use the files in the repo's .tox area?<br>
><br>
> It may be the case that oslo_config.cfg.find_config_files is<br>
> involved, doing its dirty config file autodiscovery job. May I ask<br>
> you to try out [1] that is designed to avoid it, and report back<br>
> with the result?<br>
><br>
> [1]:<br>
> <a href="https://review.openstack.org/#/c/172354/1/neutron/tests/base.py" target="_blank">https://review.openstack.org/#/c/172354/1/neutron/tests/base.py</a><br>
><br>
<br>
Nah, that won't help for rootwrap. It does not even rely on<br>
oslo.config, and the config file is passed with CLI args. I recommend<br>
checking what's cfg.CONF.AGENT.root_helper_daemon value inside your<br>
failing test cases to see whether tox properly passed<br>
OS_ROOTWRAP_DAEMON_CMD, with {envdir} properly substituted.<br>
<br>
Ihar<br>
-----BEGIN PGP SIGNATURE-----<br>
Version: GnuPG v2<br>
<br>
iQEcBAEBCAAGBQJVOlbTAAoJEC5aWaUY1u57zkgH+wa5yvVYqglN+B7qpkIfR5QB<br>
5X+6fh9O2KNV8qkDkSKwfRgqs8UouNGOO39zYcgG/QOlqfRKv9ROGkLyNzRihaRg<br>
ynmDSiXVSiW/wnW+R8ymBSFiU30O88jtlBxlwYYUlz1pdbdQxpVUWPspvYrYU95O<br>
zdBkifNEvDpYhb/DySq6dlOJB+VQ2IlnCsBhkZeiKQz/T2fnYDoTNZ05beLZez2s<br>
kntPkYXG11dYRDYQxF76A3fFSboiy2TkX7wl8wK29WQI350gk3Fc/ob0QlMYR0Kf<br>
IcvEHh+g7cvkZkcX3vn3dDTnI9WUorDUjvnvfw8PGvJaB/edniUBjSC6HHmhBv8=<br>
=Pg+J<br>
-----END PGP SIGNATURE-----<br>
<br>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></div>
__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
</blockquote></div></blockquote></div>