Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] from Firefox52: NO pure ALSA?, WAS: Firefox 49.0 & Youtube... Audio: No
Date: Sat, 24 Dec 2016 08:10:30
Message-Id: 88734911-d6ff-0306-1a20-17be33b83473@gmail.com
In Reply to: Re: [gentoo-user] from Firefox52: NO pure ALSA?, WAS: Firefox 49.0 & Youtube... Audio: No by lee
1 On 24/12/2016 03:52, lee wrote:
2 > Neil Bothwick <neil@××××××××××.uk> writes:
3 >
4 >> On Thu, 22 Dec 2016 04:15:50 +0100, lee wrote:
5 >>
6 >>>> There are no config files to edit with the predictable names, the
7 >>>> names are created from the physical location of the port. That's why
8 >>>> they are called predictable,
9 >>>
10 >>> I only know what the names are when I can look them up when the computer
11 >>> is running. I don't call that "predictable".
12 >>
13 >> If they are constructed according to specific rules, they are
14 >> predictable, by definition.
15 >
16 > You're overlooking that you need to know exactly, in advance, what the
17 > rules are applied to, and all the rules, for having a chance that your
18 > prediction turns out to be correct. Provided you know all that, you can
19 > predict the universe, assuming that everything always goes according to
20 > rules. You can not prove that it does and only disprove that it does
21 > when you find a case in which it doesn't. So what's your definition and
22 > your predictions worth?
23
24 You keep mis-defining what "predictable" means in this context. It does
25 not mean, in the style of Newton, that you will always know everything
26 about it. Neither is it the same meaning as prediction in the context of
27 a scientific theory.
28
29 "prediction" here simply means that the interface name is guaranteed to
30 be the same as it was on last boot, and the somewhat random nature of
31 kernael names (ethX, wlanX) is not in play.
32
33 It does NOT mean that you are guaranteed to know exactly what an
34 interface will be called before you boot it for the first time.
35
36 Rename "predictable names" to "already known names" if it makes you feel
37 better. There's nothing wrong with this definition of predictable, as it
38 satisfies it's own rules and is consistent within itself. It is not
39 complete though but we already know that from Godel.
40
41 As long as you keep trying to apply the wrong meaning of predictable to
42 this situation, you will keep typing mails like this one I'm replying to
43 where you argue about something that is not even there. You also can't
44 realistically argue about what "predictable" means because like almost
45 all human concepts it is not a singularity, rather it is a spectrum
46 where it means what the author says it means.
47
48 And the quote for that meaning has already been posted in this thread
49 somewhere.
50
51
52
53
54
55 >
56 >>> They were much more predictable before because I could be reasonably
57 >>> sure that each of the ports would be called 'ethN', starting with N = 0,
58 >> "Reasonably sure" is not predictable.
59 >
60 > It's still better than something entirely unpredictable.
61 >
62 > Show me that the names are predictable by writing them down, then
63 > grabbing an arbitrary computer and plugging in a network card the
64 > port(s) of which will then have the names you wrote down.
65 >
66 >> A lot of this stuff is designed to
67 >> make automated management easier, so editing rules or config files is
68 >> undesirable. It is more about being able to automatically provision and
69 >> configure new systems, whether hardware or virtual.
70 >
71 > How does it help with that? Wouldn't it help even more if you could
72 > just give them the names you wanted them to have?
73 >
74 > Like if you have N machines with an interface each you want to do
75 > something with, the only thing you'd have to do is make sure that this
76 > interface gets the right name assigned.
77 >
78 > With unrecognisable names, the interface can still have a different name
79 > on each machine. What's the advantage of that?
80 >
81 >>> unless I changed a card for a different one after an udev rule had
82 >>> already been created.
83 >>
84 >> and being able to make changes without messing with the rest of your
85 >> system. I stand by my previous analogy of disk devices nodes vs UUIDs.
86 >
87 > Are they predictable?
88 >
89 >> One is readable the other is safe. Yes, you can use filesystem labels,
90 >> which can be both, but that requires intervention, just like your udev
91 >> rules. That doesn't make either approach wrong, just suited to different
92 >> purposes.
93 >
94 > And I would find it much better if network ports had recognisable names
95 > without intervention.
96 >
97 >>>> unless you move the NIC to a different PCI slot, it will always have
98 >>>> the same name, no matter what other hardware you add or remove. Yes,
99 >>>> the names are cumbersome, but they have to be like that to guarantee
100 >>>> their uniqueness.
101 >>>
102 >>> You don't need to defend the unrecognisable names. The names used for
103 >>> referring to network ports don't need to be like that.
104 >>
105 >> No they don't. It is merely one solution to the problem, and the names
106 >> are recognisable, Alan posted the key earlier. They are complex and may
107 >> look cryptic until you understand them, but so is English.
108 >
109 > They don't become any more recognisable by knowing the rules. They
110 > simply remain a combination of letters and numbers which is difficult to
111 > recognise.
112 >
113 >>> The perceived advantage lies in being able to refer to network ports in
114 >>> a more reliable way, and I don't see how using unrecognisable names
115 >>> instead of recognisable ones would make anything easier.
116 >>
117 >> See above re automation. It doesn't really matter whether you see the
118 >> need or not. If you don't have the need, don't use it, they are an
119 >> option for those who do want them.
120 >
121 > Unfortunately, that option has been made the default.
122 >
123 >>> It would have made things easier if the problem had been solved by
124 >>> giving them recognisable names (or aliases) by default --- or even if
125 >>> the default names (aliases) were the same as the unrecognisable names
126 >>> --- and allowing to easily configure the names (aliases) actually used
127 >>> to refer to the ports.
128 >>
129 >> That's a good point, and surely doable with udev rules, making the whole
130 >> argument moot. I haven't investigated because I don't have the need, but
131 >> I would be interested to hear what you discover.
132 >> and not that unrecognisable once you understand the systax.
133 >
134 > I haven't investigated either because I figured there isn't much point
135 > in it because if I wanted recognisable names, I would have to put some
136 > extra work into every machine, which isn't a good option. In the long
137 > run, it might be less time consuming to use recognisable names, but who
138 > knows if there isn't going to be yet another change, defeating a way I
139 > might have found to get such names back.
140 >
141 >>> Being able to refer to things in more reliable ways improves the quality
142 >>> of the software. Using unrecognisable names for things reduces the
143 >>> quality.
144 >>
145 >> They are reliable, unlike your "reasonably sure" approach,
146 >
147 > I never said they aren't. I don't see them as more reliable, either,
148 > not for any practical purposes. Technically, they might be more
149 > reliable, but it doesn't matter to me.
150 >
151 >>> This is like you're defending a type of new pliers.
152 >>
153 >> I'm not so much defending them and expressing an opinion. I can see the
154 >> benefits and the drawbacks. They are an option, albeit one that is turned
155 >> on by default (but since when have Gentoo users ever been bothered about
156 >> upstream defaults?). Portage even gives you explicit instuctions on how
157 >> to permanently disable them with a single command, although I generally
158 >> use the net.ifnames=0 kernel option instead on single NIC machines, where
159 >> the feature is pointless.
160 >
161 > I didn't see portage or anything else give me any instructions or
162 > warnings about this. The names just suddenly changed, and that screwed
163 > things up.
164 >
165 >>> But who knows, perhaps it is now possible to easily, on the fly, name
166 >>> the network ports through a neat configuration file. I'm merely asking
167 >>> if there is because I don't know and would find that very useful.
168 >>
169 >> Can't ifrename do what you want?
170 >
171 > Dunno, I haven't heard of it before, it doesn't seem to be installed,
172 > and eix shows no hits for it.
173 >
174 >>>> How often you you have to type interface names anyway, and how many of
175 >>>> those are in a shell with tab completion that takes care of it for
176 >>>> you?
177 >>>
178 >>> None of them are, and I don't type the names. They require copy and
179 >>> paste, or very careful and tedious typing after looking them up.
180 >>
181 >> Well, if you're scripting them, you only need to do it once per
182 >> interface, surely? That might be less work that setting up ifrename, but
183 >> use whatever works for you, your choices include, but are not restricted
184 >> to, and in no particular order.
185 >
186 > The issue comes up every now and then when I need to do something with
187 > network interfaces. The unrecognisable names waste my time because they
188 > are unrecognisable, and that's really all they do for me.
189 >
190 >> Learn how the predictable names work
191 >> Disable the feature entirely and hope the eth0 names work as expected
192 >> Use udev rules
193 >> Use ifrename
194 >> Some combination of the above.
195 >
196
197
198 --
199 Alan McKinnon
200 alan.mckinnon@×××××.com

Replies