Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

2 messages, 2 authors, 2016-09-16 · open the first message on its own page

Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

From: Vadim Kochan <hidden>
Date: 2016-09-16 11:25:42

On Fri, Sep 16, 2016 at 2:21 PM, Anton Aksola [off-list ref] wrote:
Ok, I will post a new patch version. Should tests be posted in a separate
patch?

2016-09-16 12:44 GMT+03:00 Nicolas Dichtel [off-list ref]:
quoted
Le 16/09/2016 à 11:23, Vadim Kochan a écrit :
[snip]
quoted
Would it be useful to add test for this case into testsuite/ ?
Yes, it's a good idea.

Regards,
Nicolas
Anton, I just looked into tests after when I did post here. I am not
sure it will be trivial,
currently tests are running within separated network namespace by
default (which I did) via
'unshare' tool, and now I see that it is better to call it explicitly
from the each test case. So
I am not sure netns related  tests might be valid if they will be ran
after 'unshare -n', if yes - then there is no problem, otherwise
it needs to be fixed somehow - I will try to do this.

Regards,
Vadim Kochan

Re: [PATCH v2] iproute2: build nsid-name cache only for commands that need it

From: Anton Aksola <hidden>
Date: 2016-09-16 12:02:50

On Fri, Sep 16, 2016 at 02:25:40PM +0300, Vadim Kochan wrote:
Anton, I just looked into tests after when I did post here. I am not
sure it will be trivial,
currently tests are running within separated network namespace by
default (which I did) via
'unshare' tool, and now I see that it is better to call it explicitly
from the each test case. So
I am not sure netns related  tests might be valid if they will be ran
after 'unshare -n', if yes - then there is no problem, otherwise
it needs to be fixed somehow - I will try to do this.
(excuse my duplicate emails if any received)

It seems that mounts made after 'unshare -n' will propagate back:

[root@toys iproute2]# ip netns
[root@toys iproute2]# unshare -n
[root@toys iproute2]# ip netns add foo
[root@toys iproute2]# ip netns exec foo ip link add type dummy
[root@toys iproute2]# exit
logout
[root@toys iproute2]# ip netns
foo
[root@toys iproute2]# ip netns exec foo ip link show dev dummy0
6: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop state DOWN mode DEFAULT
    link/ether ba:cc:6c:ca:2d:41 brd ff:ff:ff:ff:ff:ff

This doesn't seem to work with 'ip netns exec' as it makes sure mounts
do not propagate.

BR, Anton
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help