FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Gentoo > Gentoo Development

 
 
LinkBack Thread Tools
 
Old 05-12-2011, 01:45 AM
William Hubbs
 
Default rfc: *_iface variables in openrc network scripts

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
 
Old 05-12-2011, 01:55 AM
William Hubbs
 
Default rfc: *_iface variables in openrc network scripts

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
 
Old 05-12-2011, 02:01 AM
"Jorge Manuel B. S. Vicetto"
 
Default rfc: *_iface variables in openrc network scripts

-----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+lRxNyOI4S8noglkGnNgnnEyCIP76 fENdzMNu9viHhf
23bOUFBaNe0Bm8R7NLpntQcM4Ihk4aC7l60ffRC3/L0pRetPJeDjpTOKuooxsFKP
Bms4ZgATtUziAkjcZ4z/u3hIbgvNwcQSlXS2OHfPCPpvxGKx9jpDkbnW4WL582h5
/SH4RF1pCFFyTwQ4LFZatftD/r/aOqO1CXlbroEDgNL79dE93Cjf1US3fiIDXHTu
5VNi/HabY9Mz13+HxUIvUxBGx7q3CUY2wpPpK0U5A+voxTlLF7W2rp/+QZZfwQXG
TJVFOIwn/Egr4SUlD6ayS+tVFARIygjJhQCCiX1aTdWZ1k13wqg72DcGHnx Qhdjd
s83UI8FAaRh7CWX6/hfo+FxZ0oE+3V4kNN3Mjm1qB1bqCO+p98BwMGR+DQHRSOGU
ue6pGQ5EKnrTqJ68aBkbDL3h56pOf5SKoIw71bCv0lXbDVTif3 +IRveyUlEVy7Dp
7mmYLE49paCQkY0SDYhpi22TzBE/RGg9lNz8Zt3WG8tS1Lwg7I0Q1zKuVIdSEbsH
tSfJWWzH8NE9731oTi35
=v/dl
-----END PGP SIGNATURE-----
 
Old 05-12-2011, 09:35 AM
Petteri Räty
 
Default rfc: *_iface variables in openrc network scripts

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
 
Old 05-12-2011, 02:34 PM
William Hubbs
 
Default rfc: *_iface variables in openrc network scripts

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
 
Old 05-12-2011, 11:49 PM
"Jorge Manuel B. S. Vicetto"
 
Default rfc: *_iface variables in openrc network scripts

-----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/

iQIcBAEBAgAGBQJNzHICAAoJEC8ZTXQF1qEP6qUQAMeBWdnItC G2IyQDcUfeDVh0
F6rbngiYPu/AETXvyBfcx0d0rmaszqrqQLWGoNEZVJlPIbHTGD3kTrBVYatTA sIb
ooDAcDa3G7yjc/NLu3FRXmJv7Ed+qNFOm9/jDCRH+bOS69rD23BoR0KiRhriFGg8
OwsNxyrFyvRFmoZH1CBfbOcXMlEUBP401iiaeGs+2zuSwFZErR WVIvUQcgaf8evI
6zYk4Lxyh/OHVHhBiumDrJ3izhZklBAVQnYvxvId+kbhvxKPLgI3sZjDZx/L1Qd5
oA7UaLJu+7qFfesj4UXH+VLj0uxIWl398Ka9ZU9h6H08MNde8l 6N3rn2D+wkoMax
h5mSsWQiRKRqdUIS3vGddLJyd29LNhrixY7FRKnSnSJMgDpxcb 25CYU66zJXga3I
dO4Fta9e4qdFtZwfsiTxuFAd4XVWrZ2+HkgIthULCXfk92bSgH xU2sdzkBlVju2U
1prywa79wK/hm5Y7miAaRbVkJ2iI/DI/46rphnny/JLDsbcD+M37xbG2Ypw6/Jt7
jmpuHs+Vu2PyFaAA84q/pBPQFJBckReyB0+8l+RDV15zPy4gPdc1nqj4HDhFAj27
SFBKjpYbGJ7VFW0vjZGO5k8E4z3Ecn/X2QlBtlPFrk3Nxk2EG6yTC7H0Q5/i+Pam
3DNpqx0iGmLIWixmjHyJ
=gDFf
-----END PGP SIGNATURE-----
 
Old 05-13-2011, 02:18 AM
William Hubbs
 
Default rfc: *_iface variables in openrc network scripts

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
 

Thread Tools




All times are GMT. The time now is 04:11 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org