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 762408 - [review] add net namespace support to NMPlatform [th/platform-netns-bgo762408]
[review] add net namespace support to NMPlatform [th/platform-netns-bgo762408]
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-02-21 17:26 UTC by Thomas Haller
Modified: 2016-03-07 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2016-02-21 17:26:53 UTC
although the code is not yet actually used, eventually we want to implement some kind of namespace support for NetworkManager.

I would merge this branch early, even if there aren't any users yet.
Comment 1 Thomas Haller 2016-02-21 17:29:21 UTC
Unfortunately, valgrind barfs on the tests now:


--31105-- WARNING: unhandled amd64-linux syscall: 308
--31105-- You may be able to write your own handler.
--31105-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--31105-- Nevertheless we consider this a bug.  Please report
--31105-- it at http://valgrind.org/support/bug_reports.html.
==31105==
==31105== Process terminating with default action of signal 5 (SIGTRAP)
==31105==    at 0x7CE381B: _g_log_abort (gmessages.c:324)
==31105==    by 0x7CE381B: g_logv (gmessages.c:1081)
==31105==    by 0x7CE398E: g_log (gmessages.c:1119)
==31105==    by 0x172479: _nm_log_impl (nm-logging.c:591)
==31105==    by 0x166AE3: _netns_switch (nmp-netns.c:248)
==31105==    by 0x167D05: nmp_netns_pop (nmp-netns.c:387)
==31105==    by 0x13B18F: test_netns_general (test-link.c:1882)
==31105==    by 0x7D0245A: test_case_run (gtestutils.c:2158)
==31105==    by 0x7D0245A: g_test_run_suite_internal (gtestutils.c:2241)
==31105==    by 0x7D02622: g_test_run_suite_internal (gtestutils.c:2253)
==31105==    by 0x7D02622: g_test_run_suite_internal (gtestutils.c:2253)
==31105==    by 0x7D0282D: g_test_run_suite (gtestutils.c:2328)
==31105==    by 0x7D02850: g_test_run (gtestutils.c:1596)
==31105==    by 0x1667A9: main (test-common.c:1568)



and it seems this cannot be suppressed.
Comment 2 Thomas Haller 2016-03-02 13:20:52 UTC
Something noteworthy is how to handle udev. For now, there is

  use_udev = (nmp_netns_get_initial () == nmp_netns_get_current ())
             && nmp_cache_use_udev_detect ();
 

and 

+    /* Set up udev monitoring */
+    if (priv->udev_client) {
+         GUdevEnumerator *enumerator;




Note that currently the new code is basically disabled by NM_PLATFORM_NETNS_SUPPORT setting. I'd still merge it early, and use the code later. IMO adding netns support is something what we want to do, so I'd be fine with merging parts early without waiting for the full solution.
Comment 3 Beniamino Galvani 2016-03-02 15:58:42 UTC
Looks good to me.