Re: review request: changing the default ifconfig(8) address format to CIDR
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 05 May 2024 16:23:41 UTC
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 PM Tomoaki AOKI <junchoon@dec.sakura.ne.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 scripting > > 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=CIDR or IP_FORMAT=NETMASK. > > Regards. > > -- > Tomoaki AOKI <junchoon@dec.sakura.ne.jp> > >