From nobody Sun May 5 16:23:41 2024 X-Original-To: arch@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VXVGh5RNyz5KF2F for ; Sun, 05 May 2024 16:23:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-lj1-x22d.google.com (mail-lj1-x22d.google.com [IPv6:2a00:1450:4864:20::22d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VXVGh1kW1z42h9 for ; Sun, 5 May 2024 16:23:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2e2a4c20870so15412481fa.3 for ; Sun, 05 May 2024 09:23:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1714926234; x=1715531034; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=sjcNPzCMpkWEo1T19QtuDc2t7hRJXfU5qN0x5sFtCQ4=; b=ZWSujDVNQ1JEdLmDPjykCF8J6cCp8V+BiTy4VGy+PhKlZHGha2D/+v5NRYFet2DMek xm03NQPCphYNUMw8OaF8QcUFkL4Q4jBKxmnZAYkGdsKQEp19BnEOJI7DIrXvF4wEnFIi WIV0CQKm26nS4aV+QFCZcRoT9APjelkWNDCaNmtDsmvLkGxPVu0zKGCMT9iDVG4VmMoW uzMJZdtdx/9Cc41ZcgE9YM6ZuGO262eY1LHAAqAwdr3j2enK0cXU2y65NUxci/Vax8JB rFCMvkxE+arO5hXWiBk1fUjkWGzAb4cWhYcJXYJ6/+GgAI02mS7bBd9WZ9tbLsgkkFMJ wuCw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1714926234; x=1715531034; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=sjcNPzCMpkWEo1T19QtuDc2t7hRJXfU5qN0x5sFtCQ4=; b=sHoAmYK/pUAcCzImxS97S69EJgxSW9Ydk+Mc5PoSRYkSYoHFmWfnyGF4ltgR47E4vB sgja9yvz6CLkuiMhgGeb54xQ8016cU/4JoRa+s6nEASeg9BKOkSWOT+YHWIXr4P0pLWS QvszXanZLl9vBHxW5oIlMh5HQlOj41yeCS7qwVeHZBfTnbCASR6EDN2Q537HftFZA5xX U4sfWYBSFfX7ZfVX3qBeHU+j/8vZF+4wnIDkTSLJKvJDWxslnoCVlMQLxlSoqfos5X+v rQdDx9SZLaxkdAPXxJUc5j4HbjRvVlc/EFL9N/WtFs//6VgVOtA+YuPu12MRmrjf0lcz 5kHQ== X-Forwarded-Encrypted: i=1; AJvYcCWnYplOrAzsGyIZoKndByodBc0bRaUUQ5C41/1TXBcgxy37KYdmxp0VnTud7U+l1Z7ToamCRLfPaGJGsM/PrXtQ X-Gm-Message-State: AOJu0Ywt0HqJaH2HKyA56ioWWMFe3c0wEYffMy+vjy01QyU/YTH3TBy2 NXdihMM2zP407FO84m3vHnzQOV3okv/a1DlA2R9MiSnNp77xEK/v17ScYe+wGSA6ssBwFiabfsd /4dcAZ4lNO7LLpT5FE3D0QSk+T/01H5d5Ad5wYAHrDkbWbHuXpfw= X-Google-Smtp-Source: AGHT+IH3zNVk2YUho4fkjrtEtU1m7hs6Uru6ByCA/xYVlmJJbM1yMQz9IvTSXABSMqPA/yjprFms+qDKnLM8VHOLd+I= X-Received: by 2002:a05:6512:3f16:b0:51d:998e:e0c1 with SMTP id y22-20020a0565123f1600b0051d998ee0c1mr6454314lfa.13.1714926233829; Sun, 05 May 2024 09:23:53 -0700 (PDT) List-Id: Discussion related to FreeBSD architecture List-Archive: https://lists.freebsd.org/archives/freebsd-arch List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arch@FreeBSD.org MIME-Version: 1.0 References: <20240505033504.772826db43da54f323f5e993@dec.sakura.ne.jp> In-Reply-To: <20240505033504.772826db43da54f323f5e993@dec.sakura.ne.jp> From: Warner Losh Date: Sun, 5 May 2024 10:23:41 -0600 Message-ID: Subject: Re: review request: changing the default ifconfig(8) address format to CIDR To: Tomoaki AOKI Cc: Lexi Winter , arch@freebsd.org, net@freebsd.org Content-Type: multipart/alternative; boundary="000000000000fbf6df0617b76052" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US] X-Rspamd-Queue-Id: 4VXVGh1kW1z42h9 --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 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 wrote: > On Sat, 4 May 2024 16:34:03 +0100 > Lexi Winter 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 > > 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 > > --000000000000fbf6df0617b76052 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I'll remind everybody that ifconfig h= as had IFCONFIG_FORMAT since
```
commit 7c2aa744374aa3449ad81f60852e7= 4ad73d823e6
Author: Allan Jude <allanjude@FreeBSD.org>
Date: = =C2=A0 Tue May 31 17:30:08 2016 +0000

=C2=A0 =C2=A0 ifconfig(8) now = supports some output formatting options
```
so we'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's coming up and still give people years wor= th of notice. We don't need to give 4 or 5 years notice to do this in 1= 6. That's too long and people will take their eye off the ball and it w= ill be 17 or 18 before it happens. I've had several things I "grat= uitously" 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 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'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'm surprised there'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've done in nearly every other system. I d= on'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.

So I agree with Mike Karels'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).

Warner
<= /div>
O= n Sat, May 4, 2024 at 12:35=E2=80=AFPM Tomoaki AOKI <junchoon@dec.sakura.ne.jp> wrote:
On Sat, 4 May 2024 16:34= :03 +0100
Lexi Winter <lexi@l= e-fay.org> wrote:

> hi,
>
> i've just submitted this PR:
>
> https://github.com/freebsd/freebsd-src/pull/121= 6
>
> which contains this commit:
>
> commit 57d273c90ee1c17446236aba25ed0bd291c4f126 (HEAD -> lf/main, h= emlock/lf/main)
> Author: Lexi Winter <lexi@le-Fay.ORG>
> Date:=C2=A0 =C2=A0Sat May 4 16:11:21 2024 +0100
>
>=C2=A0 =C2=A0 =C2=A0ifconfig(8): change default IP address format to &#= 39;cidr'
>
>=C2=A0 =C2=A0 =C2=A0'netmasks' haven't been used in IP netw= orking for decades.=C2=A0 Change the
>=C2=A0 =C2=A0 =C2=A0default address format for both IPv4 and IPv6 addre= ses in ifconfig(8) to
>=C2=A0 =C2=A0 =C2=A0'cidr', which prints addreses in the format= most users will be more
>=C2=A0 =C2=A0 =C2=A0familiar with.
>
>=C2=A0 =C2=A0 =C2=A0The 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 scripti= ng
> 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=C2=A0 =C2=A0 <junchoon@dec.sakura.ne.jp>

--000000000000fbf6df0617b76052--