Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 May 2024 10:23:41 -0600
From:      Warner Losh <imp@bsdimp.com>
To:        Tomoaki AOKI <junchoon@dec.sakura.ne.jp>
Cc:        Lexi Winter <lexi@le-fay.org>, arch@freebsd.org, net@freebsd.org
Subject:   Re: review request: changing the default ifconfig(8) address format to CIDR
Message-ID:  <CANCZdfp=TOw_Daf8nGs-Mprhkyxg8=LwyG1UGsQcpWW0jpG_qw@mail.gmail.com>
In-Reply-To: <20240505033504.772826db43da54f323f5e993@dec.sakura.ne.jp>
References:  <ZjZVaxzdMehqqci_@ilythia.eden.le-fay.org> <20240505033504.772826db43da54f323f5e993@dec.sakura.ne.jp>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000fbf6df0617b76052
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I'll remind everybody that ifconfig has had IFCONFIG_FORMAT since
```
commit 7c2aa744374aa3449ad81f60852e74ad73d823e6
Author: Allan Jude <allanjude@FreeBSD.org>
Date:   Tue May 31 17:30:08 2016 +0000

    ifconfig(8) now supports some output formatting options
```
so we've already 7 years into this process. This is nothing new and the
desire to migrate has been around a long time. As such, we can transition
in 15, and put a release note into 14.1 release that's coming up and still
give people years worth of notice. We don't need to give 4 or 5 years
notice to do this in 16. That's too long and people will take their eye off
the ball and it will be 17 or 18 before it happens. I've had several things
I "gratuitously" had a long horizon on, only to forget about until it was
too late (14.0 was supposed to have an awk that didn't decode hex number,
for example).

Also, broken scripts are a 1 line fix away from working, so the impact is
rather small, and that one line can be set globally for people that have a
lot of these scripts. The fix can be placed into the release notes as well.
In addition, there's plenty of time for us to get a feel on how many
scripts there actually are here. We can back off to a longer time horizon
if it proves to be too disruptive. It would be even better if ifconfig, or
a similar tool, could produce easy to use in scripts data (like json via
libxo). I'm surprised there's no libxo option to it today. Of course these
would be a more intrusive change, but would insulate us from data change
like we've done in nearly every other system. I don't support more weird
options, though, to make the current formats more maillable. We need to
start pushing people into scripting with useful data formats. That includes
doing stragglers like nvmecontrol, camcontrol, ifconfig up with libxo
options.

So I agree with Mike Karels's post in the bug review on this...  We should
do it *NOW* for 15, document well the workarounds and collect data to see
if people are right about the scope. If so, we take a step back and do this
in 16. If not, we go forward. This will still give corporate users 2 or 3
years to get their act together for a release (dropping in the
IFCONFIG_FORMAT today in their scripts will work and keep them working well
into the future with all supported FreeBSD version, and then some).

Warner

On Sat, May 4, 2024 at 12:35=E2=80=AFPM Tomoaki AOKI <junchoon@dec.sakura.n=
e.jp>
wrote:

> On Sat, 4 May 2024 16:34:03 +0100
> Lexi Winter <lexi@le-fay.org> wrote:
>
> > hi,
> >
> > i've just submitted this PR:
> >
> > https://github.com/freebsd/freebsd-src/pull/1216
> >
> > which contains this commit:
> >
> > commit 57d273c90ee1c17446236aba25ed0bd291c4f126 (HEAD -> lf/main,
> hemlock/lf/main)
> > Author: Lexi Winter <lexi@le-Fay.ORG>
> > Date:   Sat May 4 16:11:21 2024 +0100
> >
> >     ifconfig(8): change default IP address format to 'cidr'
> >
> >     'netmasks' haven't been used in IP networking for decades.  Change
> the
> >     default address format for both IPv4 and IPv6 addreses in
> ifconfig(8) to
> >     'cidr', which prints addreses in the format most users will be more
> >     familiar with.
> >
> >     The previous format is still available using -finet:hex or
> -finet6:numeric.
> >
> > imp@ suggested i should ask arch@ and net@ about this, so here i am!
> >
> > i understand there might be some backward-compat concerns with scriptin=
g
> > here, but it's well past time this change was made, and anyone who
> > really can't update their scripts can use ifconfig -f or
> > $IFCONFIG_FORMAT to retain the old behaviour.
>
> Hi.
>
> If you raally want it to be landed, you should wait at least 2 major
> releases. Propagate the future change on Relesase Notes at 15.0, then,
> actually change in 16.0 shoule be the earliest. Maybe 17.0 would be
> reasonable.
>
> This could be toooooooo hazardous on corporate-class users having
> scripts/configurations for current style.
>
> We SHALL give enough YEARS for their admins to look into ALL their
> scripts/configuratins and fix everything affected. Moreover, if the
> fixes are widely affecting with their internal apps, they could need to
> acquire budgets to do so.
>
> Possibly, introducing environment variable set in /etc/defaults/rc.conf
> to select which format to use could help them. With it, they can set it
> to use current format for all their computers running FreeBSD until
> they fix all they need.
> Something like IP_FORMAT=3DCIDR or IP_FORMAT=3DNETMASK.
>
> Regards.
>
> --
> Tomoaki AOKI    <junchoon@dec.sakura.ne.jp>
>
>

--000000000000fbf6df0617b76052
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr">I&#39;ll remind everybody that ifconfig h=
as had IFCONFIG_FORMAT since<br>```<br>commit 7c2aa744374aa3449ad81f60852e7=
4ad73d823e6<br>Author: Allan Jude &lt;allanjude@FreeBSD.org&gt;<br>Date: =
=C2=A0 Tue May 31 17:30:08 2016 +0000<br><br>=C2=A0 =C2=A0 ifconfig(8) now =
supports some output formatting options<br>```<br>so we&#39;ve already 7 ye=
ars into this process. This is nothing new and the desire to migrate has be=
en around a long time. As such, we can transition in 15, and put a release =
note into 14.1 release that&#39;s coming up and still give people years wor=
th of notice. We don&#39;t need to give 4 or 5 years notice to do this in 1=
6. That&#39;s too long and people will take their eye off the ball and it w=
ill be 17 or 18 before it happens. I&#39;ve had several things I &quot;grat=
uitously&quot; had a long horizon on, only to forget about until it was too=
 late (14.0 was supposed to have an awk that didn&#39;t decode hex number, =
for example).<br><br>Also, broken scripts are a 1 line fix away from workin=
g, so the impact is rather small, and that one line can be set globally for=
 people that have a lot of these scripts. The fix can be placed into the re=
lease notes as well. In addition, there&#39;s plenty of time for us to get =
a feel on how many scripts there actually are here. We can back off to a lo=
nger time horizon if it proves to be too disruptive. It would be even bette=
r if ifconfig, or a similar tool, could produce easy to use in scripts data=
 (like json via libxo). I&#39;m surprised there&#39;s no libxo option to it=
 today. Of course these would be a more intrusive change, but would insulat=
e us from data change like we&#39;ve done in nearly every other system. I d=
on&#39;t support more weird options, though, to make the current formats mo=
re maillable. We need to start pushing people into scripting with useful da=
ta formats. That includes doing stragglers like nvmecontrol, camcontrol, if=
config up with libxo options.<br><br>So I agree with Mike Karels&#39;s post=
 in the bug review on this...=C2=A0 We should do it *NOW* for 15, document =
well the workarounds and collect data to see if people are right about the =
scope. If so, we take a step back and do this in 16. If not, we go forward.=
 This will still give corporate users 2 or 3 years to get their act togethe=
r for a release (dropping in the IFCONFIG_FORMAT today in their scripts wil=
l work and keep them working well into the future with all supported FreeBS=
D version, and then some).</div><div dir=3D"ltr"><br></div><div>Warner<br><=
/div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">O=
n Sat, May 4, 2024 at 12:35=E2=80=AFPM Tomoaki AOKI &lt;<a href=3D"mailto:j=
unchoon@dec.sakura.ne.jp">junchoon@dec.sakura.ne.jp</a>&gt; wrote:<br></div=
><blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border=
-left:1px solid rgb(204,204,204);padding-left:1ex">On Sat, 4 May 2024 16:34=
:03 +0100<br>
Lexi Winter &lt;<a href=3D"mailto:lexi@le-fay.org" target=3D"_blank">lexi@l=
e-fay.org</a>&gt; wrote:<br>
<br>
&gt; hi,<br>
&gt; <br>
&gt; i&#39;ve just submitted this PR:<br>
&gt; <br>
&gt; <a href=3D"https://github.com/freebsd/freebsd-src/pull/1216" rel=3D"no=
referrer" target=3D"_blank">https://github.com/freebsd/freebsd-src/pull/121=
6</a><br>
&gt; <br>
&gt; which contains this commit:<br>
&gt; <br>
&gt; commit 57d273c90ee1c17446236aba25ed0bd291c4f126 (HEAD -&gt; lf/main, h=
emlock/lf/main)<br>
&gt; Author: Lexi Winter &lt;lexi@le-Fay.ORG&gt;<br>
&gt; Date:=C2=A0 =C2=A0Sat May 4 16:11:21 2024 +0100<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0ifconfig(8): change default IP address format to &#=
39;cidr&#39;<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;netmasks&#39; haven&#39;t been used in IP netw=
orking for decades.=C2=A0 Change the<br>
&gt;=C2=A0 =C2=A0 =C2=A0default address format for both IPv4 and IPv6 addre=
ses in ifconfig(8) to<br>
&gt;=C2=A0 =C2=A0 =C2=A0&#39;cidr&#39;, which prints addreses in the format=
 most users will be more<br>
&gt;=C2=A0 =C2=A0 =C2=A0familiar with.<br>
&gt; <br>
&gt;=C2=A0 =C2=A0 =C2=A0The previous format is still available using -finet=
:hex or -finet6:numeric.<br>
&gt; <br>
&gt; imp@ suggested i should ask arch@ and net@ about this, so here i am!<b=
r>
&gt; <br>
&gt; i understand there might be some backward-compat concerns with scripti=
ng<br>
&gt; here, but it&#39;s well past time this change was made, and anyone who=
<br>
&gt; really can&#39;t update their scripts can use ifconfig -f or<br>
&gt; $IFCONFIG_FORMAT to retain the old behaviour.<br>
<br>
Hi.<br>
<br>
If you raally want it to be landed, you should wait at least 2 major<br>
releases. Propagate the future change on Relesase Notes at 15.0, then,<br>
actually change in 16.0 shoule be the earliest. Maybe 17.0 would be<br>
reasonable.<br>
<br>
This could be toooooooo hazardous on corporate-class users having<br>
scripts/configurations for current style.<br>
<br>
We SHALL give enough YEARS for their admins to look into ALL their<br>
scripts/configuratins and fix everything affected. Moreover, if the<br>
fixes are widely affecting with their internal apps, they could need to<br>
acquire budgets to do so.<br>
<br>
Possibly, introducing environment variable set in /etc/defaults/rc.conf<br>
to select which format to use could help them. With it, they can set it<br>
to use current format for all their computers running FreeBSD until<br>
they fix all they need.<br>
Something like IP_FORMAT=3DCIDR or IP_FORMAT=3DNETMASK.<br>
<br>
Regards.<br>
<br>
-- <br>
Tomoaki AOKI=C2=A0 =C2=A0 &lt;<a href=3D"mailto:junchoon@dec.sakura.ne.jp" =
target=3D"_blank">junchoon@dec.sakura.ne.jp</a>&gt;<br>
<br>
</blockquote></div></div>

--000000000000fbf6df0617b76052--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANCZdfp=TOw_Daf8nGs-Mprhkyxg8=LwyG1UGsQcpWW0jpG_qw>