In kdump.conf, the fence_kdump_nodes list can be hostname or ipaddr. We have already excluded the node's hostname from the list to avoid the deadlock issue in capture kernel. This patch applies the same rule on ipaddr.
Signed-off-by: Pingfan Liu piliu@redhat.com --- v1 -> v2: improve commit log kdump.conf | 4 ++-- kdumpctl | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 1e24e1b..cfdaec7 100644 --- a/kdump.conf +++ b/kdump.conf @@ -137,8 +137,8 @@ # # fence_kdump_nodes <node(s)> # - List of cluster node(s), separated by spaces, to send -# fence_kdump notifications to (this option is mandatory to -# enable fence_kdump). +# fence_kdump notifications to. The list should exclude this node itself! +# (this option is mandatory to enable fence_kdump). #
#raw /dev/vg/lv_kdump diff --git a/kdumpctl b/kdumpctl index d43f46b..638c6b6 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1118,6 +1118,7 @@ check_kdump_feasibility() check_fence_kdump_config() { local hostname=`hostname` + local ipaddrs=`hostname -i` local nodes=$(get_option_value "fence_kdump_nodes")
for node in $nodes; do @@ -1125,6 +1126,12 @@ check_fence_kdump_config() echo "Option fence_kdump_nodes cannot contain $hostname" return 1 fi + # node can be ipaddr + echo $ipaddrs | grep $node + if [ $? -eq 0 ]; then + echo "Option fence_kdump_nodes cannot contain $node" + return 1 + fi done
return 0
On 05/16/2017 at 03:08 PM, Pingfan Liu wrote:
In kdump.conf, the fence_kdump_nodes list can be hostname or ipaddr. We have already excluded the node's hostname from the list to avoid the deadlock issue
What deadlock issue? Can you explain in more details?
in capture kernel. This patch applies the same rule on ipaddr.
Signed-off-by: Pingfan Liu piliu@redhat.com
v1 -> v2: improve commit log kdump.conf | 4 ++-- kdumpctl | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 1e24e1b..cfdaec7 100644 --- a/kdump.conf +++ b/kdump.conf @@ -137,8 +137,8 @@ # # fence_kdump_nodes <node(s)> # - List of cluster node(s), separated by spaces, to send -# fence_kdump notifications to (this option is mandatory to -# enable fence_kdump). +# fence_kdump notifications to. The list should exclude this node itself! +# (this option is mandatory to enable fence_kdump). #
#raw /dev/vg/lv_kdump diff --git a/kdumpctl b/kdumpctl index d43f46b..638c6b6 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1118,6 +1118,7 @@ check_kdump_feasibility() check_fence_kdump_config() { local hostname=`hostname`
- local ipaddrs=`hostname -i`
From "man hostname" cited below, looks like "hostname -i" is not safe, can we use "-I" instead? -i, --ip-address Display the network address(es) of the host name. Note that this works only if the host name can be resolved. Avoid using this option; use hostname --all-ip-addresses instead.
-I, --all-ip-addresses Display all network addresses of the host. This option enumerates all configured addresses on all net‐ work interfaces. The loopback interface and IPv6 link-local addresses are omitted. Contrary to option -i, this option does not depend on name resolution. Do not make any assumptions about the order of the output.
local nodes=$(get_option_value "fence_kdump_nodes")
for node in $nodes; do @@ -1125,6 +1126,12 @@ check_fence_kdump_config() echo "Option fence_kdump_nodes cannot contain $hostname" return 1 fi
# node can be ipaddr
echo $ipaddrs | grep $node
append " >/dev/null" to avoid needless output
Regards, Xunlei
if [ $? -eq 0 ]; then
echo "Option fence_kdump_nodes cannot contain $node"
return 1
fi
done
return 0
----- Original Message -----
From: "Xunlei Pang" xpang@redhat.com To: "Pingfan Liu" piliu@redhat.com, kexec@lists.fedoraproject.org Cc: "Dave Young" dyoung@redhat.com, "Baoquan He" bhe@redhat.com Sent: Tuesday, May 16, 2017 3:39:55 PM Subject: Re: [PATCH v2] kdumpctl: for fence_kdump, the ipaddr of this node should be excluded from list
On 05/16/2017 at 03:08 PM, Pingfan Liu wrote:
In kdump.conf, the fence_kdump_nodes list can be hostname or ipaddr. We have already excluded the node's hostname from the list to avoid the deadlock issue
What deadlock issue? Can you explain in more details?
The capture kernel sends message to the hosts in the list and wait for response. Only after the pair responded, the hooks in /lib/dracut/hooks/initqueue/finished/* can return 0, otherwise, the hooks wait endless. And kdump-capture service can not be started. So if the failure node itself is in fence_kdump_nodes, the capture-kernel waits for it self's response, which never come.
in capture kernel. This patch applies the same rule on ipaddr.
Signed-off-by: Pingfan Liu piliu@redhat.com
v1 -> v2: improve commit log kdump.conf | 4 ++-- kdumpctl | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 1e24e1b..cfdaec7 100644 --- a/kdump.conf +++ b/kdump.conf @@ -137,8 +137,8 @@ # # fence_kdump_nodes <node(s)> # - List of cluster node(s), separated by spaces, to send -# fence_kdump notifications to (this option is mandatory to -# enable fence_kdump). +# fence_kdump notifications to. The list should exclude this node itself! +# (this option is mandatory to enable fence_kdump). #
#raw /dev/vg/lv_kdump diff --git a/kdumpctl b/kdumpctl index d43f46b..638c6b6 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1118,6 +1118,7 @@ check_kdump_feasibility() check_fence_kdump_config() { local hostname=`hostname`
- local ipaddrs=`hostname -i`
From "man hostname" cited below, looks like "hostname -i" is not safe, can we use "-I" instead?
Yes, -I option is better.
-i, --ip-address Display the network address(es) of the host name. Note that this works only if the host name can be resolved. Avoid using this option; use hostname --all-ip-addresses instead. -I, --all-ip-addresses Display all network addresses of the host. This option enumerates all configured addresses on all net‐ work interfaces. The loopback interface and IPv6 link-local addresses are omitted. Contrary to option -i, this option does not depend on name resolution. Do not make any assumptions about the order of the output.
local nodes=$(get_option_value "fence_kdump_nodes")
for node in $nodes; do @@ -1125,6 +1126,12 @@ check_fence_kdump_config() echo "Option fence_kdump_nodes cannot contain $hostname" return 1 fi
# node can be ipaddr
echo $ipaddrs | grep $node
append " >/dev/null" to avoid needless output
Ok.
Thanks for your kindly review.
Regards, Pingfan
On 05/16/17 at 03:08pm, Pingfan Liu wrote:
In kdump.conf, the fence_kdump_nodes list can be hostname or ipaddr. We have already excluded the node's hostname from the list to avoid the deadlock issue in capture kernel. This patch applies the same rule on ipaddr.
It should be better to say that kdump should not send fence_kdump notifications to local host since local host will not response to such notifications. And we have excluded hostname of local host but when one use ip address we also need exclude it.
Signed-off-by: Pingfan Liu piliu@redhat.com
v1 -> v2: improve commit log kdump.conf | 4 ++-- kdumpctl | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 1e24e1b..cfdaec7 100644 --- a/kdump.conf +++ b/kdump.conf @@ -137,8 +137,8 @@ # # fence_kdump_nodes <node(s)> # - List of cluster node(s), separated by spaces, to send -# fence_kdump notifications to (this option is mandatory to -# enable fence_kdump). +# fence_kdump notifications to. The list should exclude this node itself! +# (this option is mandatory to enable fence_kdump). #
#raw /dev/vg/lv_kdump diff --git a/kdumpctl b/kdumpctl index d43f46b..638c6b6 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1118,6 +1118,7 @@ check_kdump_feasibility() check_fence_kdump_config() { local hostname=`hostname`
local ipaddrs=`hostname -i` local nodes=$(get_option_value "fence_kdump_nodes")
for node in $nodes; do
@@ -1125,6 +1126,12 @@ check_fence_kdump_config() echo "Option fence_kdump_nodes cannot contain $hostname" return 1 fi
# node can be ipaddr
echo $ipaddrs | grep $node
if [ $? -eq 0 ]; then
echo "Option fence_kdump_nodes cannot contain $node"
return 1
fi
done
return 0
-- 2.7.4
Thanks Dave
On 05/17/17 at 10:19am, Dave Young wrote:
On 05/16/17 at 03:08pm, Pingfan Liu wrote:
In kdump.conf, the fence_kdump_nodes list can be hostname or ipaddr. We have already excluded the node's hostname from the list to avoid the deadlock issue in capture kernel. This patch applies the same rule on ipaddr.
It should be better to say that kdump should not send fence_kdump notifications to local host since local host will not response to such
Maybe do not need to mention about local host will not response because it is apparent that current node (local host I mentioned) is the falied node, it is the role to send fence_kdump notifications to other nodes to tell them I'm kdumping, tell to itself is nonsense..
notifications. And we have excluded hostname of local host but when one use ip address we also need exclude it.
Signed-off-by: Pingfan Liu piliu@redhat.com
v1 -> v2: improve commit log kdump.conf | 4 ++-- kdumpctl | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/kdump.conf b/kdump.conf index 1e24e1b..cfdaec7 100644 --- a/kdump.conf +++ b/kdump.conf @@ -137,8 +137,8 @@ # # fence_kdump_nodes <node(s)> # - List of cluster node(s), separated by spaces, to send -# fence_kdump notifications to (this option is mandatory to -# enable fence_kdump). +# fence_kdump notifications to. The list should exclude this node itself! +# (this option is mandatory to enable fence_kdump). #
#raw /dev/vg/lv_kdump diff --git a/kdumpctl b/kdumpctl index d43f46b..638c6b6 100755 --- a/kdumpctl +++ b/kdumpctl @@ -1118,6 +1118,7 @@ check_kdump_feasibility() check_fence_kdump_config() { local hostname=`hostname`
local ipaddrs=`hostname -i` local nodes=$(get_option_value "fence_kdump_nodes")
for node in $nodes; do
@@ -1125,6 +1126,12 @@ check_fence_kdump_config() echo "Option fence_kdump_nodes cannot contain $hostname" return 1 fi
# node can be ipaddr
echo $ipaddrs | grep $node
if [ $? -eq 0 ]; then
echo "Option fence_kdump_nodes cannot contain $node"
return 1
fi
done
return 0
-- 2.7.4
Thanks Dave