On 03/11/15 at 02:18pm, Dave Young wrote:
On 03/10/15 at 06:48pm, Minfei Huang wrote:
Currently kdump doesn't support ipv6 nfs/ssh dump. Due to the lastet version of the Internet Protocal, it is a significant feature for kdump to enhance to support ipv6.
Following is the special config for ipv6 protocal.
For ipv6 nfs dump: Link scope, /etc/kdump.conf should be specified like "nfs [fe80::5054:ff:fe48:ca80%eth0]:/mnt" otherwise "nfs [2001:db8:0:f101::2]:/mnt"
For ipv6 ssh dump: Link scope, /etc/kdump.conf should be edited like "ssh root at fe80::5054:ff:fe48:ca80%eth0" otherwise "ssh root at 2001:db8:0:f101::2"
The ipv6 support is splitted to several parts, so the patch subject should be change, it is too general
Also I believe it will not break original functionality if we revert part of this series?
Without this patch, kdump can not kdump to remote via ipv6 address. So I think the subject is fine.
Signed-off-by: Minfei Huang mhuang@redhat.com
dracut-module-setup.sh | 46 +++++++++++++++++++++++++++++----------------- 1 file changed, 29 insertions(+), 17 deletions(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh index f82aac7..4ac4c8f 100755 --- a/dracut-module-setup.sh +++ b/dracut-module-setup.sh @@ -301,24 +301,36 @@ kdump_install_net() { local _server _netdev _srcaddr local config_val="$1"
- _server=`echo $config_val | sed 's/.*@//' | cut -d':' -f1`
- _need_dns=`echo $_server|grep "[a-zA-Z]"`
- [ -n "$_need_dns" ] && _server=`getent hosts $_server|cut -d' ' -f1`
- _netdev=`/sbin/ip route get to $_server 2>&1`
- [ $? != 0 ] && echo "Bad kdump location: $config_val" && exit 1
- #the field in the ip output changes if we go to another subnet
- if [ -n "`echo $_netdev | grep via`" ]
- then
# we are going to a different subnet
_srcaddr=`echo $_netdev|awk '{print $7}'|head -n 1`
_netdev=`echo $_netdev|awk '{print $5;}'|head -n 1`
- _server=`get_remote_host $config_val`
- is_hostname $_server && _server=`getent ahosts $_server|cut -d' ' -f1`
is_hostname is used only in this patch, so it is reasonable to move the function from previous patch into this patch.
will do it.
- if is_ipv6_address $_server; then
_netdev=`/sbin/ip -6 route get to $_server 2>&1`
[ $? != 0 ] && echo "Bad kdump location: $config_val" && exit 1
#the field in the ip output changes if we go to another subnet
if [ -n "`echo $_netdev | grep via`" ]; then
# we are going to a different subnet
_srcaddr=`echo $_netdev|awk '{print $9}'|head -n 1`
_netdev=`echo $_netdev|awk '{print $7;}'|head -n 1`
Please give an example of _netdev so that we know what is $9 and $7 Maybe one comment before "if is_ipv6_address $_server" works for latter cases..
There is an example above the function get_routes.
Thanks Minfei
else
# we are on the same subnet
_srcaddr=`echo $_netdev|awk '{print $7}'|head -n 1`
_netdev=`echo $_netdev|awk '{print $5}'|head -n 1`
ditto
elsefi
# we are on the same subnet
_srcaddr=`echo $_netdev|awk '{print $5}'|head -n 1`
_netdev=`echo $_netdev|awk '{print $3}'|head -n 1`
_netdev=`/sbin/ip route get to $_server 2>&1`
[ $? != 0 ] && echo "Bad kdump location: $config_val" && exit 1
#the field in the ip output changes if we go to another subnet
if [ -n "`echo $_netdev | grep via`" ]; then
# we are going to a different subnet
_srcaddr=`echo $_netdev|awk '{print $7}'|head -n 1`
_netdev=`echo $_netdev|awk '{print $5;}'|head -n 1`
Ditto
else
# we are on the same subnet
_srcaddr=`echo $_netdev|awk '{print $5}'|head -n 1`
_netdev=`echo $_netdev|awk '{print $3}'|head -n 1`
Ditto
fi
fi
kdump_setup_netdev "${_netdev}" "${_srcaddr}" "${_server}"
-- 1.9.3
kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec