On 4/6/2017 5:16 PM, Bjoern Voigt wrote:
I tried to change an openSUSE Leap 42.1 server from static IP to DHCP using YaST over SSH and in text mode.
To make it short, this doesn't work. The Server is offline now.
The last messages from YaST in the SSH session:
x Write device configuration x Write network configuration x Write routing configuration x Write hostname and DNS configuration x Set up network services x Write firewall settings => Activate network services - Update configuration
How I can do this the right way next time?
(I doubt, that YaST stopped the network setup in step "Activate network services" because the SSH session was interrupted. But I had run YaST in TMUX.)
Greetings, Björn
While it might be nice if the network configurator were smart enough to take special pains to make such a risky procedure as bulletproof as possible, that is just a "that might be nice". A full general purpose server is not a router appliance alas. It should have been obvious that you can't safely use the network to make changes to that very same network, especialy not 100% connection-breaking ones like changing the ip that you are currently connected to. Your options are a few: 1) best: Always and only use a console to make THAT particular change. This can be a serial console, doesn't have to be an ip-kvm. Your motherboard has to support the feature, and you need to have that connected to a terminal server appliance where you essentially ssh to a serial port. Or, in the case of VPS's like Digital Ocean, use the web-based console they provide. It's crappy and slow, but you only need it for rare exception operations like this. 2) crap: Edit /etc/sysconfig/network/ifcfg-eth0 (or whatever the equivalent is these days, this is from 11.4 using ifcfg, not leap and not using networkmanager. But there IS some equivalent file you can edit.) Then issue a "reboot -r now" and cross your fingers and hope you got everything right and hope it actually does come back up on the new IP and that that IP actually does work. This is actually a crap answer. 3) running yast in a screen session might possibly save you in some odd situation where the machine is actually still... no actually I'm not sure there is any situation where this would help much. If you can get back in in order to re-connect to the busted screen session, well then you don't actually need to re-connect to the busted screen session, you can just kill any stuck yast processes and start over. 4) pay the hands-on hourly rate for the colo staff to do things for you with you on the phone with them. 5) drive to location Summary: Don't even use a remote server that doesn't have *some* form of remote console. -- bkw -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org