public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] rfc: *_iface variables in openrc network scripts
@ 2011-05-12  1:45 William Hubbs
  2011-05-12  1:55 ` William Hubbs
  2011-05-12  2:01 ` Jorge Manuel B. S. Vicetto
  0 siblings, 2 replies; 7+ messages in thread
From: William Hubbs @ 2011-05-12  1:45 UTC (permalink / raw
  To: gentoo development

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

All,

we received a regression for openrc which prompted me to post this to
the list to see what everyone thinks. The bug is

http://bugs.gentoo.org/366905.

Currently, we use one variable, config_$(INTERFACE), to configure
the interfaces,.

In the bsd world there are no issues, because there is only one configuration
tool, ifconfig.

However, in the linux world, there are two,  ifconfig
and iproute2, which have completely different command line syntax.
Currently, we try to keep the syntax of config_* constant, which means
that the scripts attempt to convert ifconfig syntax to iproute2, and
the other way around.

In my opinion, the best way to fix this, and the best way forward, would
be to stop doing this. My plan is something like this:

For the next openrc release, put in a warning that config_* is
  deprecated and advise the use of ifconfig_* or ipconfig_* depending on
  which interface handler is being used. Then, at some point in the
  future, remove support for config_*.

  Does anyone have any thoughts?

  Thanks,

  William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] rfc: *_iface variables in openrc network scripts
  2011-05-12  1:45 [gentoo-dev] rfc: *_iface variables in openrc network scripts William Hubbs
@ 2011-05-12  1:55 ` William Hubbs
  2011-05-12  9:35   ` Petteri Räty
  2011-05-12  2:01 ` Jorge Manuel B. S. Vicetto
  1 sibling, 1 reply; 7+ messages in thread
From: William Hubbs @ 2011-05-12  1:55 UTC (permalink / raw
  To: gentoo development

[-- Attachment #1: Type: text/plain, Size: 487 bytes --]

Yeah I know I'm replying to my own message, but I also have another idea
about this. Another option would be that for the next release we just
stop parsing and use config_* but without trying to do any conversions.

The disadvantage of this would be that people would have to change their
/etc/conf.d/net files immediately after they upgrade or their network
might not come up.

It is true that this would be easier from a coding perspective, but
would it be ok for the users?

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] rfc: *_iface variables in openrc network scripts
  2011-05-12  1:45 [gentoo-dev] rfc: *_iface variables in openrc network scripts William Hubbs
  2011-05-12  1:55 ` William Hubbs
@ 2011-05-12  2:01 ` Jorge Manuel B. S. Vicetto
  2011-05-12 14:34   ` William Hubbs
  1 sibling, 1 reply; 7+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2011-05-12  2:01 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12-05-2011 01:45, William Hubbs wrote:
> All,
> 
> we received a regression for openrc which prompted me to post this to
> the list to see what everyone thinks. The bug is
> 
> http://bugs.gentoo.org/366905.
> 
> Currently, we use one variable, config_$(INTERFACE), to configure
> the interfaces,.
> 
> In the bsd world there are no issues, because there is only one configuration
> tool, ifconfig.
> 
> However, in the linux world, there are two,  ifconfig
> and iproute2, which have completely different command line syntax.
> Currently, we try to keep the syntax of config_* constant, which means
> that the scripts attempt to convert ifconfig syntax to iproute2, and
> the other way around.
> 
> In my opinion, the best way to fix this, and the best way forward, would
> be to stop doing this. My plan is something like this:
> 
> For the next openrc release, put in a warning that config_* is
>   deprecated and advise the use of ifconfig_* or ipconfig_* depending on
>   which interface handler is being used. Then, at some point in the
>   future, remove support for config_*.
> 
>   Does anyone have any thoughts?

William,

isn't that the whole point of the "modules" variable in the config file?
One of the first things I do when configuring a new system is to edit
/etc/conf.d/net and I start by adding modules="iproute2" to it.

>   Thanks,
> 
>   William
> 

- -- 
Regards,

Jorge Vicetto (jmbsvicetto) - jmbsvicetto at gentoo dot org
Gentoo- forums / Userrel / Devrel / KDE / Elections / RelEng
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNyz9vAAoJEC8ZTXQF1qEPeu8P/39X4MPzqwNe0wb7yBBxTOhz
bSCoWroD+NyU6WHWq/WumZBKugXhjQpxHr1QcXtckUJonVcwZz7bxuv6YzMqReOY
00bhYF4Ok2xpFrLlwNR5c+lRxNyOI4S8noglkGnNgnnEyCIP76fENdzMNu9viHhf
23bOUFBaNe0Bm8R7NLpntQcM4Ihk4aC7l60ffRC3/L0pRetPJeDjpTOKuooxsFKP
Bms4ZgATtUziAkjcZ4z/u3hIbgvNwcQSlXS2OHfPCPpvxGKx9jpDkbnW4WL582h5
/SH4RF1pCFFyTwQ4LFZatftD/r/aOqO1CXlbroEDgNL79dE93Cjf1US3fiIDXHTu
5VNi/HabY9Mz13+HxUIvUxBGx7q3CUY2wpPpK0U5A+voxTlLF7W2rp/+QZZfwQXG
TJVFOIwn/Egr4SUlD6ayS+tVFARIygjJhQCCiX1aTdWZ1k13wqg72DcGHnxQhdjd
s83UI8FAaRh7CWX6/hfo+FxZ0oE+3V4kNN3Mjm1qB1bqCO+p98BwMGR+DQHRSOGU
ue6pGQ5EKnrTqJ68aBkbDL3h56pOf5SKoIw71bCv0lXbDVTif3+IRveyUlEVy7Dp
7mmYLE49paCQkY0SDYhpi22TzBE/RGg9lNz8Zt3WG8tS1Lwg7I0Q1zKuVIdSEbsH
tSfJWWzH8NE9731oTi35
=v/dl
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] rfc: *_iface variables in openrc network scripts
  2011-05-12  1:55 ` William Hubbs
@ 2011-05-12  9:35   ` Petteri Räty
  0 siblings, 0 replies; 7+ messages in thread
From: Petteri Räty @ 2011-05-12  9:35 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 772 bytes --]

On 05/12/2011 04:55 AM, William Hubbs wrote:
> Yeah I know I'm replying to my own message, but I also have another idea
> about this. Another option would be that for the next release we just
> stop parsing and use config_* but without trying to do any conversions.
> 
> The disadvantage of this would be that people would have to change their
> /etc/conf.d/net files immediately after they upgrade or their network
> might not come up.
> 
> It is true that this would be easier from a coding perspective, but
> would it be ok for the users?
> 

The ebuild could try to detect mismatch in syntax and then emerge
--config could provide migration. I don't think users will mind as long
as they are able to avoid unreachable systems :)

Regards,
Petteri


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 900 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] rfc: *_iface variables in openrc network scripts
  2011-05-12  2:01 ` Jorge Manuel B. S. Vicetto
@ 2011-05-12 14:34   ` William Hubbs
  2011-05-12 23:49     ` Jorge Manuel B. S. Vicetto
  0 siblings, 1 reply; 7+ messages in thread
From: William Hubbs @ 2011-05-12 14:34 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1336 bytes --]

Hi Jorge,

On Thu, May 12, 2011 at 02:01:19AM +0000, Jorge Manuel B. S. Vicetto wrote:
> On 12-05-2011 01:45, William Hubbs wrote:
> > In my opinion, the best way to fix this, and the best way forward, would
> > be to stop doing this. My plan is something like this:
> > 
> > For the next openrc release, put in a warning that config_* is
> >   deprecated and advise the use of ifconfig_* or ipconfig_* depending on
> >   which interface handler is being used. Then, at some point in the
> >   future, remove support for config_*.
> > 
> >   Does anyone have any thoughts?
> 
> William,
> 
> isn't that the whole point of the "modules" variable in the config file?
> One of the first things I do when configuring a new system is to edit
> /etc/conf.d/net and I start by adding modules="iproute2" to it.

I'm not sure I follow. would you rather keep the config_* variable?

If so, how do you feel about requiring the syntax of the variable to
match the tool you are using?
That would mean that the following snippets would not work:

modules="iproute2"
config_iface="x.x.x.x netmask y.y.y.y broadcast z.z.z.z"
# the above is using ifconfig syntax with the iproute2 module

modules="ifconfig"
config_iface="x.x.x.x/y broadcast z.z.z.z"
# This is using iproute2 syntax with the ifconfig module.

William

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] rfc: *_iface variables in openrc network scripts
  2011-05-12 14:34   ` William Hubbs
@ 2011-05-12 23:49     ` Jorge Manuel B. S. Vicetto
  2011-05-13  2:18       ` William Hubbs
  0 siblings, 1 reply; 7+ messages in thread
From: Jorge Manuel B. S. Vicetto @ 2011-05-12 23:49 UTC (permalink / raw
  To: gentoo-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi William.

On 12-05-2011 14:34, William Hubbs wrote:
> Hi Jorge,
> 
> On Thu, May 12, 2011 at 02:01:19AM +0000, Jorge Manuel B. S. Vicetto wrote:
>> On 12-05-2011 01:45, William Hubbs wrote:
>>> In my opinion, the best way to fix this, and the best way forward, would
>>> be to stop doing this. My plan is something like this:
>>>
>>> For the next openrc release, put in a warning that config_* is
>>>   deprecated and advise the use of ifconfig_* or ipconfig_* depending on
>>>   which interface handler is being used. Then, at some point in the
>>>   future, remove support for config_*.
>>>
>>>   Does anyone have any thoughts?
>>
>> William,
>>
>> isn't that the whole point of the "modules" variable in the config file?
>> One of the first things I do when configuring a new system is to edit
>> /etc/conf.d/net and I start by adding modules="iproute2" to it.
> 
> I'm not sure I follow. would you rather keep the config_* variable?

I think we should try to keep them.

> If so, how do you feel about requiring the syntax of the variable to
> match the tool you are using?
> That would mean that the following snippets would not work:
> 
> modules="iproute2"
> config_iface="x.x.x.x netmask y.y.y.y broadcast z.z.z.z"
> # the above is using ifconfig syntax with the iproute2 module
> 
> modules="ifconfig"
> config_iface="x.x.x.x/y broadcast z.z.z.z"
> # This is using iproute2 syntax with the ifconfig module.

That's exactly what I meant.
By choosing the module one would get tied to its syntax. That should
make it simpler to parse the data. I would also suggest making the
declaration of modules mandatory or for you to pick a default tool to be
used when someone doesn't declare modules.
I prefer iproute2 syntax, but I suspect most people would prefer
ifconfig. As long as I have an option to use iproute2, I don't have a
problem :)

> William

- -- 
Regards,

Jorge Vicetto (jmbsvicetto) - jmbsvicetto at gentoo dot org
Gentoo- forums / Userrel / Devrel / KDE / Elections / RelEng
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.17 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQIcBAEBAgAGBQJNzHICAAoJEC8ZTXQF1qEP6qUQAMeBWdnItCG2IyQDcUfeDVh0
F6rbngiYPu/AETXvyBfcx0d0rmaszqrqQLWGoNEZVJlPIbHTGD3kTrBVYatTAsIb
ooDAcDa3G7yjc/NLu3FRXmJv7Ed+qNFOm9/jDCRH+bOS69rD23BoR0KiRhriFGg8
OwsNxyrFyvRFmoZH1CBfbOcXMlEUBP401iiaeGs+2zuSwFZErRWVIvUQcgaf8evI
6zYk4Lxyh/OHVHhBiumDrJ3izhZklBAVQnYvxvId+kbhvxKPLgI3sZjDZx/L1Qd5
oA7UaLJu+7qFfesj4UXH+VLj0uxIWl398Ka9ZU9h6H08MNde8l6N3rn2D+wkoMax
h5mSsWQiRKRqdUIS3vGddLJyd29LNhrixY7FRKnSnSJMgDpxcb25CYU66zJXga3I
dO4Fta9e4qdFtZwfsiTxuFAd4XVWrZ2+HkgIthULCXfk92bSgHxU2sdzkBlVju2U
1prywa79wK/hm5Y7miAaRbVkJ2iI/DI/46rphnny/JLDsbcD+M37xbG2Ypw6/Jt7
jmpuHs+Vu2PyFaAA84q/pBPQFJBckReyB0+8l+RDV15zPy4gPdc1nqj4HDhFAj27
SFBKjpYbGJ7VFW0vjZGO5k8E4z3Ecn/X2QlBtlPFrk3Nxk2EG6yTC7H0Q5/i+Pam
3DNpqx0iGmLIWixmjHyJ
=gDFf
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-dev] rfc: *_iface variables in openrc network scripts
  2011-05-12 23:49     ` Jorge Manuel B. S. Vicetto
@ 2011-05-13  2:18       ` William Hubbs
  0 siblings, 0 replies; 7+ messages in thread
From: William Hubbs @ 2011-05-13  2:18 UTC (permalink / raw
  To: gentoo-dev

[-- Attachment #1: Type: text/plain, Size: 1093 bytes --]

Hi Jorge,

On Thu, May 12, 2011 at 11:49:22PM +0000, Jorge Manuel B. S. Vicetto wrote:
> On 12-05-2011 14:34, William Hubbs wrote:
> > I'm not sure I follow. would you rather keep the config_* variable?
> 
> I think we should try to keep them.
> 
> > If so, how do you feel about requiring the syntax of the variable to
> > match the tool you are using?
> 
> That's exactly what I meant.
> By choosing the module one would get tied to its syntax. That should
> make it simpler to parse the data.

Ok, cool, this was actually my first choice, but I wasn't sure how it
would go over.

> I would also suggest making the
> declaration of modules mandatory or for you to pick a default tool to be
> used when someone doesn't declare modules.

We already do this. iproute2 is preferred if you have it installed;
otherwise ifconfig is used.

I believe the order of preference is discussed in the net.example file.

The only time you really need the modules= or modules_iface= lines is if
you want to force a specific module to be preferred for an interface.

William


[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-13  2:19 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-12  1:45 [gentoo-dev] rfc: *_iface variables in openrc network scripts William Hubbs
2011-05-12  1:55 ` William Hubbs
2011-05-12  9:35   ` Petteri Räty
2011-05-12  2:01 ` Jorge Manuel B. S. Vicetto
2011-05-12 14:34   ` William Hubbs
2011-05-12 23:49     ` Jorge Manuel B. S. Vicetto
2011-05-13  2:18       ` William Hubbs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox