From the peanut gallery (not the OP), hurray for Henrique who: (1) read (or skimmed) all the way to the bottom to notice that there was an English translation, and
(2) provided a response / answer On Friday, August 18, 2017 08:33:37 AM Henrique de Moraes Holschuh wrote: > > Newly installed system, I tried to modify the network. But networking > > restart has been in a failed state, but I can use it after reboot. > > Troubleshoot the reasons for finding ifdown -v ethx found ip addr del ip > > / mask deleted is not the old address, but the new address. So in the > > closed restart he just added / etc / network / interfaces in the new ip > > address. Ip addr found that they both coexist the state. > > I see. This is actually somewhat hard to fix, because ifdown would need > to differentiate primary and secondary addresses due to the way it was > (naively) designed. > > If we change the ip addr del to ip addr flush, it will remove every > address from the device, including ones with other labels, etc. This > breaks the way ifdown is supposed to work. > > And the first ifdown has no state it can use to know otherwise. > > The best I can see being done would be to: > > 1. not fail if ip addr del fails, > 2. flush the device if the state file exists and tells us all related > interfaces (primary or secondary) are down *and* none of them is of type > "manual". > > But I am not sure this is worth the possible breakages :-( and one has > to test it on diskless boxes using NFS too, and wake-on-lan. They > create annoying border conditions for network shutdown.