Mailing List Archive

config_eth0 deprecated - new name?
OK, it seems that hard lines in multipart configs seem to be an issue, so I'm
doing this now.

For a summary of why we're using hard lines you can read this thread
http://thread.gmane.org/gmane.linux.gentoo.devel/45756/focus=45765

Basically, just using whitespace to seperate configs is nice and simple.
What's more is everyone understands it. With CIDR notation, this is possible.
For routes, it's a little more tricky as there are two values in use.

config_eth0=("1.2.3.4 netmask 255.255.255.0"
"5.6.7.8 netmask 255.255.0.0" )
routes_eth0=("1.2.4.0 netmask 255.255.255.0 gw 1.2.3.6"
"5.6.7.9 gw 5.6.7.10"
"default gw 1.2.3.1")

becomes

config_eth0="1.2.3.4 netmask 255.255.255.0
5.6.7.8 netmask 255.255.0.0"
routes_eth0="1.2.4.0 netmask 255.255.255.0 gw 1.2.3.6
5.6.7.9 gw 5.6.7.10
default gw 1.2.3.1"

becomes

address_eth0="1.2.3.4/24 5.6.7.8/16"
routes_eth0="1.2.4.0/24 1.2.3.6 5.6.7.8 5.6.7.10 default 1.2.3.1"

Or we could adopt the BSD routing notation and do this
routes_eth0="route_foo route_bar"
route_foo="1.2.4.0/24 1.2.3.6 metric 5"
route_bar="default 1.2.3.1"

Yes, I've used the same "routes_eth0" variable, but we can change it's syntax
based on the existance of address_eth0/config_eth0.

So what are peoples feelings on this? Are you happy with the names?
address_eth0?
addr_eth0?
addresses_eth0?
ipaddress_eth0?
ipaddr_eth0?
ipaddresses_ath0?
routes_eth0?
static_routes_eth0?

Speak up, or I'll make a decision by myself which will probably be done over
the weekend.

Thanks

Roy
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
On Wed, 2008-04-23 at 16:21 +0100, Roy Marples wrote:
> address_eth0?

> addresses_eth0?

I think one of these two is the most obvious to people. Since most
people will likely only have one address per interface, I'd say that
"address_eth0" sounds good.

--
Chris Gianelloni
Release Engineering Strategic Lead
Games Developer
Re: config_eth0 deprecated - new name? [ In reply to ]
Roy Marples wrote:
> config_eth0="1.2.3.4 netmask 255.255.255.0
> 5.6.7.8 netmask 255.255.0.0"
> routes_eth0="1.2.4.0 netmask 255.255.255.0 gw 1.2.3.6
> 5.6.7.9 gw 5.6.7.10
> default gw 1.2.3.1"

If one choose to separate by lines, will tabs or spaces be allowed in
subsequent lines? Like:

config_eth0="1.2.3.4 netmask 255.255.255.0
5.6.7.8 netmask 255.255.0.0"
routes_eth0="1.2.4.0 netmask 255.255.255.0 gw 1.2.3.6
5.6.7.9 gw 5.6.7.10
default gw 1.2.3.1"

I think this *greatly* improves readability. Also, the example file
should probably indent for clarity (I know I've talked with you about
this before...).

> address_eth0="1.2.3.4/24 5.6.7.8/16"
> routes_eth0="1.2.4.0/24 1.2.3.6 5.6.7.8 5.6.7.10 default 1.2.3.1"

That's a little confusing, i.e. not being able to see easily where the
pairs are separated. What about adopting commas and keeping "gw" and
"netmask" (if not CIDR), like:

address_eth0="1.2.3.4/24, 5.6.7.8/16"
routes_eth0="1.2.4.0/24 gw 1.2.3.6, 5.6.7.8 gw 5.6.7.10, default gw 1.2.3.1"

> Or we could adopt the BSD routing notation and do this
> routes_eth0="route_foo route_bar"
> route_foo="1.2.4.0/24 1.2.3.6 metric 5"
> route_bar="default 1.2.3.1"

Hmm, that might be good as an option, as long as the other way is
available too, but I'd keep "gw", etc., perhaps.

> Yes, I've used the same "routes_eth0" variable, but we can change it's syntax
> based on the existance of address_eth0/config_eth0.
>
> So what are peoples feelings on this? Are you happy with the names?
> address_eth0?
> addr_eth0?
> addresses_eth0?
> ipaddress_eth0?
> ipaddr_eth0?
> ipaddresses_ath0?
> routes_eth0?
> static_routes_eth0?
>
> Speak up, or I'll make a decision by myself which will probably be done over
> the weekend.

I like "ipaddr_eth0" or "ip_eth0", myself.

-Joe
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
On Wednesday 23 April 2008 19:46:35 Joe Peterson wrote:
> Roy Marples wrote:
> > config_eth0="1.2.3.4 netmask 255.255.255.0
> > 5.6.7.8 netmask 255.255.0.0"
> > routes_eth0="1.2.4.0 netmask 255.255.255.0 gw 1.2.3.6
> > 5.6.7.9 gw 5.6.7.10
> > default gw 1.2.3.1"
>
> If one choose to separate by lines, will tabs or spaces be allowed in
> subsequent lines? Like:
>
> config_eth0="1.2.3.4 netmask 255.255.255.0
> 5.6.7.8 netmask 255.255.0.0"
> routes_eth0="1.2.4.0 netmask 255.255.255.0 gw 1.2.3.6
> 5.6.7.9 gw 5.6.7.10
> default gw 1.2.3.1"

The point is to remove the hard newline, which you've kept in your examples.

Thanks

Roy
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
Roy Marples wrote:
> The point is to remove the hard newline, which you've kept in your examples.

Roy, yes, I realized that after I emailed - at first I thought it was
remaining as an option. :)

-Joe
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
On Wed, Apr 23, 2008 at 04:21:27PM +0100, Roy Marples wrote:
> OK, it seems that hard lines in multipart configs seem to be an issue, so I'm
> doing this now.
>
> For a summary of why we're using hard lines you can read this thread
> http://thread.gmane.org/gmane.linux.gentoo.devel/45756/focus=45765

Do you plan to reimplement parsing of the complete ip syntax for
addresses and routes?

See my attached example from work, we use a lot of the various options
on stuff.

--
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
Re: config_eth0 deprecated - new name? [ In reply to ]
On Wednesday 23 April 2008 21:46:18 Robin H. Johnson wrote:
> On Wed, Apr 23, 2008 at 04:21:27PM +0100, Roy Marples wrote:
> > OK, it seems that hard lines in multipart configs seem to be an issue, so
> > I'm doing this now.
> >
> > For a summary of why we're using hard lines you can read this thread
> > http://thread.gmane.org/gmane.linux.gentoo.devel/45756/focus=45765
>
> Do you plan to reimplement parsing of the complete ip syntax for
> addresses and routes?

Not at all. If I did then we're back to using newlines.
Basically we need something like
ipaddrs=address1 address2 address3
for addresses, and
routes=dest gateway dest gateway dest gateway
or
routes=route1 route2 route3
route1=dest gateway
route2=dest gateway
route3=dest gateway
for routes

There will be no special ip or ifconfig parsing - it's a pita. especially
trying to mange 2 variants of linux ifconfig onto iproute2 (and back) and
trying to get the same style to work with BSD ifconfig. Been there, too much
pain. So it's the simple route. Want anything more powerful, well we have the
direct
ifconfig_eth0=
ip_eth0=
directives. And if they don't work then use a pre-up.

>
> See my attached example from work, we use a lot of the various options
> on stuff.

No, we won't support that. However, we will bring back ip ranges for the last
ocet like so
1.2.3.4-10/24

After seeing that I take it you'ed vote for the BSD named routing style?

Thanks

Roy
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
Roy Marples <roy@marples.name> writes:

> On Wednesday 23 April 2008 21:46:18 Robin H. Johnson wrote:

>> See my attached example from work, we use a lot of the various options
>> on stuff.
>
> No, we won't support that. However, we will bring back ip ranges for the last
> ocet like so
> 1.2.3.4-10/24

It looks to me as though you are intending to remove the capability to
set up complex network environments. Granted most people only have
simple configurations (with single IP address and just a default route),
but some of us have more complex networking environments with multiple
addresses, routes and rules on multiple interfaces. Currently Gentoo
baselayout-1 makes it relatively straightforward to set up these
configurations, and the current baselayout-2 is almost as simple[1]. I
think it would be a bad idea to remove any of the network configuration
functionality currently offered by baselayout-1.


[1] But in my opinion, the baselayout-1 /etc/net.conf syntax is better than that
in baselayout-2. Though I have not yet migrated any of the systems with
complex networking to baselayout-2.
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
On Wed, Apr 23, 2008 at 10:04:38PM +0100, Roy Marples wrote:
> On Wednesday 23 April 2008 21:46:18 Robin H. Johnson wrote:
> > On Wed, Apr 23, 2008 at 04:21:27PM +0100, Roy Marples wrote:
> > > OK, it seems that hard lines in multipart configs seem to be an issue, so
> > > I'm doing this now.
> > >
> > > For a summary of why we're using hard lines you can read this thread
> > > http://thread.gmane.org/gmane.linux.gentoo.devel/45756/focus=45765
> >
> > Do you plan to reimplement parsing of the complete ip syntax for
> > addresses and routes?
>
> Not at all. If I did then we're back to using newlines.
> Basically we need something like
> ipaddrs=address1 address2 address3
> for addresses, and
> routes=dest gateway dest gateway dest gateway
> or
> routes=route1 route2 route3
> route1=dest gateway
> route2=dest gateway
> route3=dest gateway
> for routes
The problem in this is that you cannot set the properties for each
address or route. Please don't take us back to the stoneage of writing
the advanced networking configuration manually.

As an example of an ip address line with properties:
${ext}.30/32 broadcast - scope host

An an example of a route with properties:
${int}.192/27 dev bond0 mtu 1500 table internal scope link
(my normal mtu on the internal link is 9k, but part of the subnet runs
at 1500 for netbooting on dumb cards)

Doing these in {pre,post}{up,down} means we basically end up
reimplementing the baselayout1 array-based config manually in the
blocks. I already do that for the ip_rule_runner block.

> No, we won't support that. However, we will bring back ip ranges for the last
> ocet like so
> 1.2.3.4-10/24
I care about the address ranges far less than the additional properties.

> After seeing that I take it you'ed vote for the BSD named routing style?
I'm ambivalent about the naming scheme - I do care greatly about the
easy of configuration for the properties.

--
Robin Hugh Johnson
Gentoo Linux Developer & Infra Guy
E-Mail : robbat2@gentoo.org
GnuPG FP : 11AC BA4F 4778 E3F6 E4ED F38E B27B 944E 3488 4E85
Re: config_eth0 deprecated - new name? [ In reply to ]
On Thursday 24 April 2008 00:01:01 Robin H. Johnson wrote:
> The problem in this is that you cannot set the properties for each
> address or route. Please don't take us back to the stoneage of writing
> the advanced networking configuration manually.
>
> As an example of an ip address line with properties:
> ${ext}.30/32 broadcast - scope host

Correct as usual. However, the existing config_foo isn't going anyway anytime
soon, so your power user config still works.
However, it will be moving to the right place
ifconfig_eth0
ip_addr_eth0

And we'll stop parsing it. You'll have to know the syntax for the module
you're using. I'm going to trying to map between them which will make the
code lighter and less error prone.

>
> An an example of a route with properties:
> ${int}.192/27 dev bond0 mtu 1500 table internal scope link
> (my normal mtu on the internal link is 9k, but part of the subnet runs
> at 1500 for netbooting on dumb cards)

You can do this with the BSD style syntax

static_routes_bond0="int0 int192 defint"
route_int0="${int}.0/8 dev bond0 table internal scope link"
route_int192="${int}.192/27 dev bond0 mtu 1500 table internal scope link"
route_defint="default via ${int}.2 bond0 table internal"

Thanks

Roy
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
On Wednesday 23 April 2008 23:01:38 Graham Murray wrote:
> Roy Marples <roy@marples.name> writes:
> > On Wednesday 23 April 2008 21:46:18 Robin H. Johnson wrote:
> >> See my attached example from work, we use a lot of the various options
> >> on stuff.
> >
> > No, we won't support that. However, we will bring back ip ranges for the
> > last ocet like so
> > 1.2.3.4-10/24
>
> It looks to me as though you are intending to remove the capability to
> set up complex network environments.

No I'm not.
I'm making it easy for simple configs AND complex ones. Just not through the
same variable.

> [1] But in my opinion, the baselayout-1 /etc/net.conf syntax is better than
> that in baselayout-2. Though I have not yet migrated any of the systems
> with complex networking to baselayout-2.

Sadly, default scripts we ship have to work with shells other than bash.
Of course, you're still welcome to use config_eth0 as a bash array as that
still works and will for the foreseeable future.

Thanks

Roy
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
Roy Marples wrote:
> On Thursday 24 April 2008 00:01:01 Robin H. Johnson wrote:
>> The problem in this is that you cannot set the properties for each
>> address or route. Please don't take us back to the stoneage of writing
>> the advanced networking configuration manually.
>>
>> As an example of an ip address line with properties:
>> ${ext}.30/32 broadcast - scope host
>
> Correct as usual. However, the existing config_foo isn't going anyway anytime
> soon, so your power user config still works.
> However, it will be moving to the right place
> ifconfig_eth0
> ip_addr_eth0

Looks like some documentation could be useful.

lu

--

Luca Barbato
Gentoo Council Member
Gentoo/linux Gentoo/PPC
http://dev.gentoo.org/~lu_zero

--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
Roy Marples <roy@marples.name> writes:

> On Wednesday 23 April 2008 23:01:38 Graham Murray wrote:
>> It looks to me as though you are intending to remove the capability to
>> set up complex network environments.
>
> No I'm not.
> I'm making it easy for simple configs AND complex ones. Just not through the
> same variable.

Sorry, I misunderstood.
--
gentoo-dev@lists.gentoo.org mailing list
Re: config_eth0 deprecated - new name? [ In reply to ]
On Thursday 24 April 2008, Luca Barbato wrote:
> Roy Marples wrote:
> > On Thursday 24 April 2008 00:01:01 Robin H. Johnson wrote:
> >> The problem in this is that you cannot set the properties for each
> >> address or route. Please don't take us back to the stoneage of writing
> >> the advanced networking configuration manually.
> >>
> >> As an example of an ip address line with properties:
> >> ${ext}.30/32 broadcast - scope host
> >
> > Correct as usual. However, the existing config_foo isn't going anyway
> > anytime soon, so your power user config still works.
> > However, it will be moving to the right place
> > ifconfig_eth0
> > ip_addr_eth0
>
> Looks like some documentation could be useful.

documentation is a requirement, but not everyone reads it. existing configs
have to keep working and warning on their use is much smoother/easier on
everyone.
-mike