After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 767846 - nmcli down of a tun interface followed by nmcli up fails
nmcli down of a tun interface followed by nmcli up fails
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2016-06-20 00:07 UTC by Joe Harvell
Modified: 2016-06-27 11:23 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH] tun,vxlan: add the CAP_IS_SOFTWARE capability (3.67 KB, patch)
2016-06-21 11:35 UTC, Beniamino Galvani
none Details | Review

Description Joe Harvell 2016-06-20 00:07:52 UTC
1. Create a connection of type tun mode tap
2. Down the connection
3. Up the connection

Expected Results:
    Up operation succeeds
    After step 3, a usable tun network interface of mode tap exists in the system

Actual Results:
    Up operation fails: reason="Failed to find a compatible device for this connection"
    No network interface exists

Details:


Step 1:

joey@akita ~ $ nmcli c add ifname test-tap con-name test-tap type tun mode tap -- ipv4.method disabled ipv6.method ignore
Connection 'test-tap' (258ebb7c-f68e-4356-8d47-5af5d7d63456) successfully added.
joey@akita ~ $ ip link ls dev test-tap
377: test-tap: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN mode DEFAULT group default qlen 1000
    link/ether 42:7d:6a:0e:8a:46 brd ff:ff:ff:ff:ff:ff


Step 2:

joey@akita ~ $ nmcli c down test-tap
Connection 'test-tap' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/185)
joey@akita ~ $ ip link ls dev test-tap
Device "test-tap" does not exist.


Step 3:

joey@akita ~ $ nmcli c up test-tap
Error: Connection activation failed: Failed to find a compatible device for this connection


NetworkManager Logs:


Step 1:

juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0553] keyfile: add connection /etc/NetworkManager/system-connections/test-tap (258ebb7c-f68e-4356-8d47-5af5d7d63456,"test-tap")
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0562] manager: (test-tap): new Tun device (/org/freedesktop/NetworkManager/Devices/15)
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0573] audit: op="connection-add" uuid="258ebb7c-f68e-4356-8d47-5af5d7d63456" name="test-tap" pid=29735 uid=503 result="success"
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0621] device (test-tap): state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0634] device (test-tap): state change: unavailable -> disconnected (reason 'none') [20 30 0]
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0638] policy: auto-activating connection 'test-tap'
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0645] device (test-tap): Activation: starting connection 'test-tap' (258ebb7c-f68e-4356-8d47-5af5d7d63456)
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0646] device (test-tap): state change: disconnected -> prepare (reason 'none') [30 40 0]
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0649] device (test-tap): state change: prepare -> config (reason 'none') [40 50 0]
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0652] device (test-tap): state change: config -> ip-config (reason 'none') [50 70 0]
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0655] device (test-tap): state change: ip-config -> secondaries (reason 'ip-config-unavailable') [70 90 5]
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0659] device (test-tap): state change: secondaries -> activated (reason 'none') [90 100 0]
juin 19 18:58:40 akita NetworkManager[13900]: <info>  [1466380720.0719] device (test-tap): Activation: successful, device activated.


Step 2:

juin 19 19:00:45 akita NetworkManager[13900]: <info>  [1466380845.4994] device (test-tap): state change: activated -> deactivating (reason 'user-requested') [100 110 39]
juin 19 19:00:45 akita NetworkManager[13900]: <info>  [1466380845.5083] audit: op="connection-deactivate" uuid="258ebb7c-f68e-4356-8d47-5af5d7d63456" name="test-tap" pid=31199 uid=503 result="success"
juin 19 19:00:45 akita NetworkManager[13900]: <info>  [1466380845.5086] device (test-tap): state change: deactivating -> disconnected (reason 'user-requested') [110 30 39]
juin 19 19:00:45 akita NetworkManager[13900]: <info>  [1466380845.5221] device (test-tap): state change: disconnected -> unmanaged (reason 'user-requested') [30 10 39]


Step 3:

juin 19 19:01:20 akita NetworkManager[13900]: <info>  [1466380880.9124] audit: op="connection-activate" uuid="258ebb7c-f68e-4356-8d47-5af5d7d63456" name="test-tap" result="fail" reason="Failed to find a compatible device for this connection"
Comment 1 Joe Harvell 2016-06-20 00:10:21 UTC
NetworkManager version:

commit 59269b6925e9947b4c11f1548ba1593dd4aa5371
Author: Thomas Haller <thaller@redhat.com>
Date:   Sat Jun 18 18:15:41 2016 +0200

    clients: fix wrong assertion _assert_format_int()
    
    Fixes: 2822f92434e19ebd25b69672bc996fc8311ae929


Kernel Version:

commit 2dcd0af568b0cf583645c8a317dd12e344b1c72a
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date:   Sun May 15 15:43:13 2016 -0700

    Linux 4.6
Comment 2 Beniamino Galvani 2016-06-21 11:35:33 UTC
Created attachment 330126 [details] [review]
[PATCH] tun,vxlan: add the CAP_IS_SOFTWARE capability

This patch fixes the issue for me.
Comment 3 Dan Williams 2016-06-21 15:13:25 UTC
At first I thought this should have happened already in the platform through realize_start_setup() and its check for nm_platform_link_is_software() but of course that requires the device to be created first.  So yeah, the NMDevice subclass needs the flag even before it's realized or we can't create the device from a connection.  LGTM.
Comment 4 Francesco Giudici 2016-06-27 10:43:54 UTC
lgtm