[Swan-dev] namespace not working anymore on centos8

Paul Wouters paul at nohats.ca
Fri Apr 9 01:16:15 UTC 2021


I see this in basic-pluto-01:

--- east.console.txt    2021-04-07 10:42:21.375906389 -0400
+++ OUTPUT/east.console.txt     2021-04-08 21:00:49.133801226 -0400
@@ -1,23 +1,25 @@
  /testing/guestbin/swan-prep
+Traceback (most recent call last):
+  File "/testing/guestbin/swan-prep", line 301, in <module>
+    nssdir = get_configsetup("nssdir")
+  File "/testing/guestbin/swan-prep", line 188, in get_configsetup
+    o = subprocess.run(cmd, shell=True, capture_output=True, encoding="ascii", check=True,)
+  File "PATH/lib64/python3.6/subprocess.py", line 423, in run
+    with Popen(*popenargs, **kwargs) as process:
+TypeError: __init__() got an unexpected keyword argument 'capture_output'
  east #
   ipsec start
  Redirecting to: [initsystem]
  east #
   ../../guestbin/wait-until-pluto-started
+pluto in namespace failed to start - check logs or output
  east #
   ipsec auto --add westnet-eastnet


It seems this is caused by an older python version 3.6.8 ?

So this does not work:

o = subprocess.run('ip netns identify', shell=True, capture_output=True, encoding="ascii", check=True,)

Some hints to replace capture_output= seem to only work if we change the
subprocess.run() to not be run with shell=True

This makes things not run on centos8. I'm pretty sure it ran before so
something changed recently-ish ? Git blame is pointing to a commit from
October:

commit 19607eeac96c229cefb80dc0cb5f8566f1f49b60
Author: Antony Antony <antony at phenome.org>
Date:   Wed Oct 14 17:36:27 2020 +0000

     testing: swan-prep use addconn configsetup to detect paths


Paul


More information about the Swan-dev mailing list