When dumping to ssh via local ipv6 address, the ssh parameter in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, the get_remote_host function in kdump-lib.sh currently doesn't remove the network interface in the ipv6 address, causing the ip command in kdump_install_net function to fail, leading to a "Bad kdump location" message.
This patch supports dumping ssh via local ipv6 address by enabling get_remote_host function to remove network interface in ipv6 addresses if there are any.
Signed-off-by: Ziyue Yang ziyang@redhat.com --- kdump-lib.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 3f0af91..cca68e5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -323,6 +323,10 @@ get_remote_host() _config_val=${_config_val%:/*} _config_val=${_config_val#[} _config_val=${_config_val%]} + # factor out network inteface segment in local ipv6 address + if is_ipv6_address $_config_val; then + _config_val=${_config_val%%%*} + fi echo $_config_val }
----- Original Message -----
From: "Ziyue Yang" ziyang@redhat.com To: kexec@lists.fedoraproject.org Cc: "Ziyue Yang" ziyang@redhat.com Sent: Tuesday, July 18, 2017 12:48:33 PM Subject: [PATCH] kdump-lib.sh: support dump ssh via local ipv6 address
When dumping to ssh via local ipv6 address, the ssh parameter in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, the get_remote_host function in kdump-lib.sh currently doesn't remove the network interface in the ipv6 address, causing the ip command in kdump_install_net function to fail, leading to a "Bad kdump location" message.
This patch supports dumping ssh via local ipv6 address by enabling get_remote_host function to remove network interface in ipv6 addresses if there are any.
What do you observe on dump target by tcpdump? Do you see the incoming packet with ipv6 scope link address?
Regards, Pingfan
Signed-off-by: Ziyue Yang ziyang@redhat.com
kdump-lib.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 3f0af91..cca68e5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -323,6 +323,10 @@ get_remote_host() _config_val=${_config_val%:/*} _config_val=${_config_val#[} _config_val=${_config_val%]}
- # factor out network inteface segment in local ipv6 address
- if is_ipv6_address $_config_val; then
_config_val=${_config_val%%%*}
- fi echo $_config_val
}
-- 2.9.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
On Wed, Jul 19, 2017 at 9:34 AM, Pingfan Liu piliu@redhat.com wrote:
----- Original Message -----
From: "Ziyue Yang" ziyang@redhat.com To: kexec@lists.fedoraproject.org Cc: "Ziyue Yang" ziyang@redhat.com Sent: Tuesday, July 18, 2017 12:48:33 PM Subject: [PATCH] kdump-lib.sh: support dump ssh via local ipv6 address
When dumping to ssh via local ipv6 address, the ssh parameter in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, the get_remote_host function in kdump-lib.sh currently doesn't remove the network interface in the ipv6 address, causing the ip command in kdump_install_net function to fail, leading to a "Bad kdump location" message.
This patch supports dumping ssh via local ipv6 address by enabling get_remote_host function to remove network interface in ipv6 addresses if there are any.
What do you observe on dump target by tcpdump? Do you see the incoming packet with ipv6 scope link address?
Yes I observed logs via tcpdump with ipv6 scope link addresses while dumping, like
10:55:19.132247 IP6 fe80::c23f:d5ff:fe9d:6546 > ff02::2: ICMP6, router solicitation, length 8 10:55:19.433514 IP6 fe80::250:56ff:fe89:542c > ff02::2: ICMP6, router solicitation, length 16 10:55:29.949253 IP6 fe80::e1d6:e94c:5da7:9896.dhcpv6-client > ff02::1:2.dhcpv6-server: dhcp6 solicit
Actually I specified the ssh host by ipv6 address in kdump.conf, so the dump data could be transferred through ipv6 only.
Regards, Pingfan
Signed-off-by: Ziyue Yang ziyang@redhat.com
kdump-lib.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 3f0af91..cca68e5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -323,6 +323,10 @@ get_remote_host() _config_val=${_config_val%:/*} _config_val=${_config_val#[} _config_val=${_config_val%]}
- # factor out network inteface segment in local ipv6 address
- if is_ipv6_address $_config_val; then
_config_val=${_config_val%%%*}
- fi echo $_config_val
}
-- 2.9.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Hi Ziyue, On 07/18/17 at 12:48pm, Ziyue Yang wrote:
When dumping to ssh via local ipv6 address, the ssh parameter in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
where "%eth0" is an existing network interface supporting ipv6.
However, the get_remote_host function in kdump-lib.sh currently doesn't remove the network interface in the ipv6 address, causing the ip command in kdump_install_net function to fail, leading to a "Bad kdump location" message.
This patch supports dumping ssh via local ipv6 address by enabling get_remote_host function to remove network interface in ipv6 addresses if there are any.
The patch looks good, but I still want to defer this until Pingfan get the ipv6 test cases passed.
Signed-off-by: Ziyue Yang ziyang@redhat.com
kdump-lib.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 3f0af91..cca68e5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -323,6 +323,10 @@ get_remote_host() _config_val=${_config_val%:/*} _config_val=${_config_val#[} _config_val=${_config_val%]}
- # factor out network inteface segment in local ipv6 address
- if is_ipv6_address $_config_val; then
_config_val=${_config_val%%%*}
- fi echo $_config_val
}
-- 2.9.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Thanks Dave
Hi,
I had two comments like the following
----- Original Message -----
From: "Dave Young" dyoung@redhat.com To: "Ziyue Yang" ziyang@redhat.com Cc: kexec@lists.fedoraproject.org Sent: Tuesday, July 25, 2017 2:56:46 PM Subject: Re: [PATCH] kdump-lib.sh: support dump ssh via local ipv6 address
Hi Ziyue, On 07/18/17 at 12:48pm, Ziyue Yang wrote:
When dumping to ssh via local ipv6 address, the ssh parameter in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
Shall we use "[]" for ipv6 addr? I.e user@[fe80::cc1:8bff:fe90:b95f%eth0] ?
where "%eth0" is an existing network interface supporting ipv6.
However, the get_remote_host function in kdump-lib.sh currently doesn't remove the network interface in the ipv6 address, causing the ip command in kdump_install_net function to fail, leading to a "Bad kdump location" message.
This patch supports dumping ssh via local ipv6 address by enabling get_remote_host function to remove network interface in ipv6 addresses if there are any.
The patch looks good, but I still want to defer this until Pingfan get the ipv6 test cases passed.
During my test, the dump failed, since in 2nd kernel, the eth0 is renamed as kdump-eth0, but the kdump still use the ipaddr fe80::cc1:8bff:fe90:b95f%eth0.
Regards, Pingfan
Signed-off-by: Ziyue Yang ziyang@redhat.com
kdump-lib.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 3f0af91..cca68e5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -323,6 +323,10 @@ get_remote_host() _config_val=${_config_val%:/*} _config_val=${_config_val#[} _config_val=${_config_val%]}
- # factor out network inteface segment in local ipv6 address
- if is_ipv6_address $_config_val; then
_config_val=${_config_val%%%*}
- fi echo $_config_val
}
-- 2.9.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Thanks Dave _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Hi,
On Wed, Jul 26, 2017 at 2:36 PM, Pingfan Liu piliu@redhat.com wrote:
Hi,
I had two comments like the following
----- Original Message -----
From: "Dave Young" dyoung@redhat.com To: "Ziyue Yang" ziyang@redhat.com Cc: kexec@lists.fedoraproject.org Sent: Tuesday, July 25, 2017 2:56:46 PM Subject: Re: [PATCH] kdump-lib.sh: support dump ssh via local ipv6
address
Hi Ziyue, On 07/18/17 at 12:48pm, Ziyue Yang wrote:
When dumping to ssh via local ipv6 address, the ssh parameter in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
Shall we use "[]" for ipv6 addr? I.e user@[fe80::cc1:8bff:fe90:b95f%eth0] ?
"[]" is not required here, using "[]" would cause "name or service unknown" error.
where "%eth0" is an existing network interface supporting ipv6.
However, the get_remote_host function in kdump-lib.sh currently doesn't remove the network interface in the ipv6 address, causing the ip command in kdump_install_net function to fail, leading to a "Bad kdump location" message.
This patch supports dumping ssh via local ipv6 address by enabling get_remote_host function to remove network interface in ipv6 addresses if there are any.
The patch looks good, but I still want to defer this until Pingfan get the ipv6 test cases passed.
During my test, the dump failed, since in 2nd kernel, the eth0 is renamed as kdump-eth0, but the kdump still use the ipaddr fe80::cc1:8bff:fe90:b95f%eth0.
I used "ens3" in my QEMU instance, and the following is the kdump log:
[ 2.393800] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI [ 2.394700] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 2.407918] ata_id (261) used greatest stack depth: 12528 bytes left [ 2.841918] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11 [ 3.224831] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56 [ 3.226226] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection [ 3.232991] e1000 0000:00:03.0 ens3: renamed from eth0 [ 3.386730] IPv6: ADDRCONF(NETDEV_UP): ens3: link is not ready [ 3.392806] ip (301) used greatest stack depth: 11584 bytes left [ 3.411737] dracut-initqueue[251]: RTNETLINK answers: Network is unreachable [ 5.409269] e1000: ens3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [ 5.412466] IPv6: ADDRCONF(NETDEV_CHANGE): ens3: link becomes ready
Seems once it renames eth0 to ens3, the dumping process is good to go
Regards, Pingfan
Signed-off-by: Ziyue Yang ziyang@redhat.com
kdump-lib.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 3f0af91..cca68e5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -323,6 +323,10 @@ get_remote_host() _config_val=${_config_val%:/*} _config_val=${_config_val#[} _config_val=${_config_val%]}
- # factor out network inteface segment in local ipv6 address
- if is_ipv6_address $_config_val; then
_config_val=${_config_val%%%*}
- fi echo $_config_val
}
-- 2.9.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Thanks Dave _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
----- Original Message -----
From: "Ziyue Yang" ziyang@redhat.com To: "Pingfan Liu" piliu@redhat.com Cc: "Dave Young" dyoung@redhat.com, kexec@lists.fedoraproject.org Sent: Wednesday, July 26, 2017 3:10:27 PM Subject: Re: [PATCH] kdump-lib.sh: support dump ssh via local ipv6 address
Hi,
On Wed, Jul 26, 2017 at 2:36 PM, Pingfan Liu piliu@redhat.com wrote:
Hi,
I had two comments like the following
----- Original Message -----
From: "Dave Young" dyoung@redhat.com To: "Ziyue Yang" ziyang@redhat.com Cc: kexec@lists.fedoraproject.org Sent: Tuesday, July 25, 2017 2:56:46 PM Subject: Re: [PATCH] kdump-lib.sh: support dump ssh via local ipv6
address
Hi Ziyue, On 07/18/17 at 12:48pm, Ziyue Yang wrote:
When dumping to ssh via local ipv6 address, the ssh parameter in kdump.conf is supposed to have the form like
ssh user@fe80::cc1:8bff:fe90:b95f%eth0
Shall we use "[]" for ipv6 addr? I.e user@[fe80::cc1:8bff:fe90:b95f%eth0] ?
"[]" is not required here, using "[]" would cause "name or service unknown" error.
Ah, this is not the real cmd to execute ssh, just the format in kdump.conf. I guess this based on the following commit: commit c994a80698b6b12e50791b36fe40ae36485098d0 Author: Minfei Huang mhuang@redhat.com Date: Thu Jul 23 18:29:24 2015 +0800
dracut-module-setup: Support the network for ipv6 protocol
where "%eth0" is an existing network interface supporting ipv6.
However, the get_remote_host function in kdump-lib.sh currently doesn't remove the network interface in the ipv6 address, causing the ip command in kdump_install_net function to fail, leading to a "Bad kdump location" message.
This patch supports dumping ssh via local ipv6 address by enabling get_remote_host function to remove network interface in ipv6 addresses if there are any.
The patch looks good, but I still want to defer this until Pingfan get the ipv6 test cases passed.
During my test, the dump failed, since in 2nd kernel, the eth0 is renamed as kdump-eth0, but the kdump still use the ipaddr fe80::cc1:8bff:fe90:b95f%eth0.
I used "ens3" in my QEMU instance, and the following is the kdump log:
[ 2.393800] e1000: Intel(R) PRO/1000 Network Driver - version 7.3.21-k8-NAPI [ 2.394700] e1000: Copyright (c) 1999-2006 Intel Corporation. [ 2.407918] ata_id (261) used greatest stack depth: 12528 bytes left [ 2.841918] ACPI: PCI Interrupt Link [LNKC] enabled at IRQ 11 [ 3.224831] e1000 0000:00:03.0 eth0: (PCI:33MHz:32-bit) 52:54:00:12:34:56 [ 3.226226] e1000 0000:00:03.0 eth0: Intel(R) PRO/1000 Network Connection [ 3.232991] e1000 0000:00:03.0 ens3: renamed from eth0 [ 3.386730] IPv6: ADDRCONF(NETDEV_UP): ens3: link is not ready [ 3.392806] ip (301) used greatest stack depth: 11584 bytes left [ 3.411737] dracut-initqueue[251]: RTNETLINK answers: Network is unreachable [ 5.409269] e1000: ens3 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: RX [ 5.412466] IPv6: ADDRCONF(NETDEV_CHANGE): ens3: link becomes ready
Seems once it renames eth0 to ens3, the dumping process is good to go
Yes, this is caused by kdump_setup_ifname(). So a way is required to survive the case eth*
Regards, Pingfan
Signed-off-by: Ziyue Yang ziyang@redhat.com
kdump-lib.sh | 4 ++++ 1 file changed, 4 insertions(+)
diff --git a/kdump-lib.sh b/kdump-lib.sh index 3f0af91..cca68e5 100755 --- a/kdump-lib.sh +++ b/kdump-lib.sh @@ -323,6 +323,10 @@ get_remote_host() _config_val=${_config_val%:/*} _config_val=${_config_val#[} _config_val=${_config_val%]}
- # factor out network inteface segment in local ipv6 address
- if is_ipv6_address $_config_val; then
_config_val=${_config_val%%%*}
- fi echo $_config_val
}
-- 2.9.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Thanks Dave _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org