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 743411 - [review] support simple globbing in device spec such as unmanged-devices [th/spec-match-bgo743411]
[review] support simple globbing in device spec such as unmanged-devices [th/...
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
: 744557 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2015-01-23 16:30 UTC by Thomas Haller
Modified: 2015-02-24 10:00 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Thomas Haller 2015-01-23 16:30:57 UTC
Please review...
Comment 1 Thomas Haller 2015-01-23 16:32:44 UTC
th/spec-match-bgo743411


this branch obviously changes behavior in that it interprets some specs now differently.

A major change is that interface-names are no longer compared case-insenstive
Comment 2 Thomas Haller 2015-01-23 17:04:22 UTC
it would need also adjustments to keyfile and manual page... but let's see first if this approach is even desired.
Comment 3 Colin Walters 2015-01-26 17:05:02 UTC
I really want a way for *programs* that generate interfaces to have a way to easily tell NM to ignore them.  See:

https://bugzilla.gnome.org/show_bug.cgi?id=731014

Can we have these programs drop some sort of metadata associated with the in-kernel interface somehow?  Alternatively a file in /run?
Comment 4 Thomas Haller 2015-01-26 17:28:22 UTC
(In reply to comment #3)
> I really want a way for *programs* that generate interfaces to have a way to
> easily tell NM to ignore them.  See:
> 
> https://bugzilla.gnome.org/show_bug.cgi?id=731014
> 
> Can we have these programs drop some sort of metadata associated with the
> in-kernel interface somehow?  Alternatively a file in /run?

I opened bug 743546 for this.

These device-specs are used for 'ignore-carrier' and 'no-auto-default' and 'unmanged-devices'.
Comment 5 Lubomir Rintel 2015-02-07 12:54:01 UTC
I like this. This actually fixes how I was expecting it to work already and what users were expecting.

No objections to the code either, just please adjust the manual.

(In reply to comment #4)
> (In reply to comment #3)
> > I really want a way for *programs* that generate interfaces to have a way to
> > easily tell NM to ignore them.  See:
> > 
> > https://bugzilla.gnome.org/show_bug.cgi?id=731014
> > 
> > Can we have these programs drop some sort of metadata associated with the
> > in-kernel interface somehow?  Alternatively a file in /run?
> 
> I opened bug 743546 for this.
> 
> These device-specs are used for 'ignore-carrier' and 'no-auto-default' and
> 'unmanged-devices'.

Well, we'll hopefully add an udev property knob for the management status. I believe this is more of a bugfix of an existing interface than a feature enhancement.

As for ignore-carrier, it seems to me that it belongs to the NMSettingConnection; just to assert that the connection will not go down upon carrier loss, there's not much use for disabling detection of carrier up (correct?).
Comment 6 Dan Winship 2015-02-12 14:10:08 UTC
(In reply to Lubomir Rintel from comment #5)
> As for ignore-carrier, it seems to me that it belongs to the
> NMSettingConnection

carrier handling was originally done at the connection level (see bug 688284), but we changed it because there's no good way to make NMSettingConnection:ignore-carrier default to TRUE on servers and FALSE on desktops, etc, which is the use case we really needed.
Comment 7 Thomas Haller 2015-02-16 16:09:20 UTC
Reworked and pushed.

The last commit ("WIP: man: explain the format for dev...") would need some documentation skills.
Comment 8 Thomas Haller 2015-02-16 16:09:52 UTC
*** Bug 744557 has been marked as a duplicate of this bug. ***
Comment 9 Peter Wu 2015-02-16 17:59:42 UTC
The additional '=...' feature for literal matching seems a bit superfluous as you can use 'eth[*][?]' to match a literal 'eth*?', unless I am missing something?
Comment 10 Thomas Haller 2015-02-16 18:32:11 UTC
the globbing is implemented using GPatternSpec, which does not support ranges or escaping:

https://developer.gnome.org/glib/stable/glib-Glob-style-pattern-matching.html#glib-Glob-style-pattern-matching.description
Comment 11 Dan Williams 2015-02-18 23:44:59 UTC
Branch looks OK to me as long as the docs get finished.