frr icon indicating copy to clipboard operation
frr copied to clipboard

topotests: micronet/nsenter issue with non-existing types of namespace

Open eqvinox opened this issue 3 years ago • 1 comments

micronet currently uses nsenter with -a indicating "all" namespaces of a target process should be joined. This unfortunately breaks on some combinations of nsenter + kernel when the set of namespaces known by nsenter does not match the kernel's supported namespaces:

# /usr/bin/nsenter -a -t $$ -F --wd=/tmp ls
nsenter: cannot open /proc/45361/ns/time: No such file or directory
# nsenter -V
nsenter from util-linux 2.37.2
# uname -r
5.4.0-122-generic
# grep PRETTY /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.1 LTS"

Why nsenter considers "all" to refer to its own notion of "all" rather than the kernel's "all" is beyond me (it should really just do "all possible" IMHO), but it is what it is… so micronet probably needs to stop using -a and just list the namespace types it needs explicitly (presumably -n -m -u, maybe -i -p -U — not sure on the latter.)

eqvinox avatar Sep 08 '22 11:09 eqvinox

I've fixed this is munet, need to backport.

choppsv1 avatar Sep 19 '22 12:09 choppsv1

Hi,

What is the status on this issue ? i am trying to run topotests on a CentOS 7 machine but the -a option doesn't come in nsenter until v2.38.1 which is compatible with CentOS 9+ only. Addressing this issue could potentially make topotests work on CentOS 7 if there aren't any other problems with CentOS 7 and micronet that I can't see yet

mxyns avatar Dec 15 '22 16:12 mxyns