Description of problem:After setting ipv6 to dhcp its not possible to set it back to static Version-Release number of selected component (if applicable):5.8.1.0 How reproducible:100% Steps to Reproduce: 1.Provision appliance 2.ssh to appliance 3.Launch appliance_console 4.set ipv6 to dhcp 5.Try setting it back to static Actual results: Network interface failed to start using the values supplied Expected results:static ipv6 set correctly Additional info: After this failure both ipv6 and ipv4 have been lost from configuration
https://github.com/ManageIQ/linux_admin/pull/188
I'm not sure we have a solution for this yet, but we have made some progress. TLDR; There are two work-arounds for this, either: `rm /var/run/dhclient6-eth0.pid` (assuming a process with pid in the file doesn't exist) or: Just do the config through the console again More detail to follow: After making changes to a network interface config file we run `ifdown eth0` then `ifup eth0` to make the changes take effect. For some reason when we set ipv6 config to dhcp, dhclient fails to start properly, leaving a pid file (/var/run/dhclient6-eth0.pid). This, in my opinion, is a bug in dhclient. In my testing I typically will get an address, but dhclient will not be running for IPv6 (the command line should have the -6 option). When we then try to set the config to static, we attempt to `ifdown eth0` which tries to stop the instance of dhclient that should be running based on the presence if the pid file. This causes the ifdown command to return an error status and we fail. Because the error is being caused by a file rather than a misconfiguration you can simply remove the pid file and then set the static address using the console. Alternatively, after hitting the issue once, you should be able to run through the configuration again because ifdown removes the pid file (even though it fails). Luke, Can you test out these workarounds?
New commit detected on ManageIQ/linux_admin/master: https://github.com/ManageIQ/linux_admin/commit/568f56a5fa66fb87bb62aff7458089d30bc15420 commit 568f56a5fa66fb87bb62aff7458089d30bc15420 Author: Bo Yao <boyao> AuthorDate: Fri Jul 14 11:47:32 2017 -0400 Commit: Bo Yao <boyao> CommitDate: Tue Jul 18 16:06:51 2017 -0400 Fix configure network fails after a success DHCP configuration https://bugzilla.redhat.com/show_bug.cgi?id=1464999 lib/linux_admin/network_interface/network_interface_rh.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
PR to bump linux_admin version: https://github.com/ManageIQ/manageiq-gems-pending/pull/243
Both workarounds do seem to work for setting ipv6, but its still required to run this from a provider console and not through ssh to the appliance as ipv4 still gets dropped.
(In reply to luke couzens from comment #7) > Both workarounds do seem to work for setting ipv6, but its still required to > run this from a provider console and not through ssh to the appliance as > ipv4 still gets dropped. Currently what we did in setting the network is shutting down network interface and change in network configuration file then start network interface. I did some search found both ipv4 and ipv6 change to an interface (eth0) need restart network service. https://askubuntu.com/questions/76742/restarting-the-ipv6-network-stack-without-restarting-the-ipv4-network-stack This is not very authoritative, but no more I can found for adding ipv6 address without restarting network interface in Red Hat, Debian, Ubuntu and Archlinux official docs, so we can generally think it's not possible. Reference: https://access.redhat.com/solutions/347693 https://wiki.debian.org/DebianIPv6 https://wiki.ubuntu.com/IPv6 https://wiki.archlinux.org/index.php/IPv6 But there are simple ways to do this in ssh client side to avoid drop ssh connection: 1) using screen or tmux with ssh to suspend the ssh client; 2) using mosh: https://github.com/mobile-shell/mosh It's a enhanced ssh run "server" on both client and server side. When server ip address change/temporarily restart, it can keep connection alive.
Verified in 5.9.0.2