Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 879468 Details for
Bug 1078134
[RFE] Support fence_kdump configuration for generic clusters
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
PATCH 6/6 Add fence_kdump support for generic clusters
0006-Add-fence_kdump-support-for-generic-clusters.patch (text/plain), 10.78 KB, created by
Martin Perina
on 2014-03-27 12:59:39 UTC
(
hide
)
Description:
PATCH 6/6 Add fence_kdump support for generic clusters
Filename:
MIME Type:
Creator:
Martin Perina
Created:
2014-03-27 12:59:39 UTC
Size:
10.78 KB
patch
obsolete
>From ea10c9e74b184295ab2a8c1a773ea66f85fb3a39 Mon Sep 17 00:00:00 2001 >From: Martin Perina <mperina@redhat.com> >Date: Tue, 25 Mar 2014 14:55:12 +0100 >Subject: [PATCH 6/6] fence_kdump for generic clusters v3: Add fence_kdump support for generic clusters > >Adds two new options to kdump.conf to be able to configure fence_kdump >support for generic clusters: > > fence_kdump_args <arg(s)> > - Command line arguments for fence_kdump_send (it can contain all > valid arguments except hosts to send notification to) > > fence_kdump_nodes <node(s)> > - List of cluster node(s) separated by space to send fence_kdump > notification to (this option is mandatory to enable fence_kdump) > >Bug-Url: https://bugzilla.redhat.com/1078134 >Signed-off-by: Martin Perina <mperina@redhat.com> >--- > dracut-kdump.sh | 19 ++++++----- > dracut-module-setup.sh | 69 ++++++++++++++++++++++++++-------------- > kdump-in-cluster-environment.txt | 35 +++++++++++++++++--- > kdump-lib.sh | 8 +++++ > kdump.conf | 11 +++++++ > kdump.conf.5 | 15 +++++++++ > kdumpctl | 2 +- > 7 files changed, 119 insertions(+), 40 deletions(-) > >diff --git a/dracut-kdump.sh b/dracut-kdump.sh >index 4bac088..cb13d92 100755 >--- a/dracut-kdump.sh >+++ b/dracut-kdump.sh >@@ -246,6 +246,12 @@ read_kdump_conf() > kdump_post) > KDUMP_POST="$config_val" > ;; >+ fence_kdump_args) >+ FENCE_KDUMP_ARGS="$config_val" >+ ;; >+ fence_kdump_nodes) >+ FENCE_KDUMP_NODES="$config_val" >+ ;; > default) > case $config_val in > shell) >@@ -289,20 +295,13 @@ read_kdump_conf() > > fence_kdump_notify() > { >- local nodes >- >- if [ -f $FENCE_KDUMP_NODES_FILE ]; then >- if [ -f $FENCE_KDUMP_CONFIG_FILE ]; then >- . $FENCE_KDUMP_CONFIG_FILE >- fi >- >- read nodes < $FENCE_KDUMP_NODES_FILE >- $FENCE_KDUMP_SEND $FENCE_KDUMP_OPTS $nodes & >+ if [ -n "$FENCE_KDUMP_NODES" ]; then >+ $FENCE_KDUMP_SEND $FENCE_KDUMP_ARGS $FENCE_KDUMP_NODES & > fi > } > >-fence_kdump_notify > read_kdump_conf >+fence_kdump_notify > > if [ -z "$CORE_COLLECTOR" ];then > CORE_COLLECTOR=$DEFAULT_CORE_COLLECTOR >diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh >index 7951121..cba3539 100755 >--- a/dracut-module-setup.sh >+++ b/dracut-module-setup.sh >@@ -20,7 +20,7 @@ depends() { > _dep="$_dep drm" > fi > >- if is_pcs_fence_kdump; then >+ if [ is_generic_fence_kdump -o is_pcs_fence_kdump ]; then > _dep="$_dep network" > fi > >@@ -263,7 +263,8 @@ kdump_install_net() { > > #install kdump.conf and what user specifies in kdump.conf > kdump_install_conf() { >- sed -ne '/^#/!p' /etc/kdump.conf > /tmp/$$-kdump.conf >+ # filter comments and fence_kdump settings >+ sed -ne '/^#\|^fence_kdump/!p' /etc/kdump.conf > /tmp/$$-kdump.conf > > while read config_opt config_val; > do >@@ -282,10 +283,16 @@ kdump_install_conf() { > core_collector) > dracut_install "${config_val%%[[:blank:]]*}" > ;; >+ fence_kdump_args) >+ FENCE_KDUMP_ARGS="$config_val" >+ ;; >+ fence_kdump_nodes) >+ FENCE_KDUMP_NODES="$config_val" >+ ;; > esac > done < /etc/kdump.conf > >- kdump_check_fence_kdump >+ kdump_check_fence_kdump "/tmp/$$-kdump.conf" > inst "/tmp/$$-kdump.conf" "/etc/kdump.conf" > rm -f /tmp/$$-kdump.conf > } >@@ -431,33 +438,47 @@ get_list_of_nodes_to_notify() { > > # setup fence_kdump in cluster > # setup proper network and install needed files >-# also preserve '[node list]' for 2nd kernel /etc/fence_kdump_nodes >+# save fence_kdump settings to kdump config file if fence_kdump is configured > kdump_check_fence_kdump () { >- local nodes >- is_pcs_fence_kdump || return 1 >+ local kdump_cfg_file=$1 >+ >+ if [ -z "$FENCE_KDUMP_NODES" ]; then >+ if is_pcs_fence_kdump; then >+ # get cluster nodes from cluster cib, get interface and ip address >+ nodelist=`pcs cluster cib | xmllint --xpath "/cib/status/node_state/@uname" -` >+ >+ # nodelist is formed as 'uname="node1" uname="node2" ... uname="nodeX"' >+ # we need to convert each to node1, node2 ... nodeX in each iteration >+ for node in ${nodelist}; do >+ # convert $node from 'uname="nodeX"' to 'nodeX' >+ eval $node >+ FENCE_KDUMP_NODES="$FENCE_KDUMP_NODES $uname" >+ done >+ fi >+ fi > >- # get cluster nodes from cluster cib, get interface and ip address >- nodelist=`pcs cluster cib | xmllint --xpath "/cib/status/node_state/@uname" -` >+ FENCE_KDUMP_NODES=$( get_list_of_nodes_to_notify "$FENCE_KDUMP_NODES" ) > >- # nodelist is formed as 'uname="node1" uname="node2" ... uname="nodeX"' >- # we need to convert each to node1, node2 ... nodeX in each iteration >- for node in ${nodelist}; do >- # convert $node from 'uname="nodeX"' to 'nodeX' >- eval $node >- nodes="$nodes $uname" >- done >+ if [ -n "$FENCE_KDUMP_NODES" ]; then >+ # setup network to reach each node >+ for node in ${FENCE_KDUMP_NODES}; do >+ kdump_install_net $node >+ done > >- nodes=$( get_list_of_nodes_to_notify "$nodes" ) >+ dracut_install $FENCE_KDUMP_SEND > >- # setup network to reach each node >- for node in ${nodes}; do >- kdump_install_net $node >- done >- echo >+ echo "fence_kdump_nodes $FENCE_KDUMP_NODES" >> ${kdump_cfg_file} > >- echo "$nodes" > ${initdir}/$FENCE_KDUMP_NODES_FILE >- dracut_install $FENCE_KDUMP_SEND >- dracut_install -o $FENCE_KDUMP_CONFIG_FILE >+ if [ -z "$FENCE_KDUMP_ARGS" ]; then >+ if [ -f $FENCE_KDUMP_CONFIG_FILE ]; then >+ . $FENCE_KDUMP_CONFIG_FILE >+ FENCE_KDUMP_ARGS=$FENCE_KDUMP_OPTS >+ fi >+ fi >+ if [ -n "$FENCE_KDUMP_ARGS" ]; then >+ echo "fence_kdump_options $FENCE_KDUMP_ARGS" >> ${kdump_cfg_file} >+ fi >+ fi > } > > # Install a random seed used to feed /dev/urandom >diff --git a/kdump-in-cluster-environment.txt b/kdump-in-cluster-environment.txt >index c27a5d7..46c8614 100644 >--- a/kdump-in-cluster-environment.txt >+++ b/kdump-in-cluster-environment.txt >@@ -34,9 +34,9 @@ recovery service, fence_kdump_send will periodically send messages to all > cluster nodes. When the fence_kdump agent receives a valid message from the > failed nodes, fencing is complete. > >-How to configure cluster environment: >+How to configure Pacemaker cluster environment: > >-If we want to use kdump in cluster environment, fence-agents-kdump should be >+If we want to use kdump in Pacemaker cluster, fence-agents-kdump should be > installed in every nodes in the cluster. You can achieve this via the following > command: > >@@ -61,6 +61,31 @@ Then enable stonith > > How to configure kdump: > >-Actually there is nothing special in configuration between normal kdump and >-cluster environment kdump. So please refer to Kexec-Kdump-howto file for more >-information. >+Actually there are two ways how to configure fence_kdump support: >+ >+1) Pacemaker based clusters >+ If you have successfully configured fence_kdump in Pacemaker, there is >+ no need to add some special configuration in kdump. So please refer to >+ Kexec-Kdump-howto file for more information. >+ >+2) Generic clusters >+ For other types of clusters there are two configuration options in >+ kdump.conf which enables fence_kdump support: >+ >+ fence_kdump_nodes <node(s)> >+ Contains list of cluster node(s) separated by space to send >+ fence_kdump notification to (this option is mandatory to enable >+ fence_kdump) >+ >+ fence_kdump_args <arg(s)> >+ Command line arguments for fence_kdump_send (it can contain >+ all valid arguments except hosts to send notification to) >+ >+ These options will most probably be configured by your cluster software, >+ so please refer to your cluster documentation how to enable fence_kdump >+ support. >+ >+Please be aware that these two ways cannot be combined and 2) has precedence >+over 1): if you specify fence_kdump_nodes option, it will be used to configure >+fence_kdump even if you configured fence_kdump in Pacemaker cluster! >+ >diff --git a/kdump-lib.sh b/kdump-lib.sh >index 6f8b991..bbaba64 100755 >--- a/kdump-lib.sh >+++ b/kdump-lib.sh >@@ -38,6 +38,14 @@ is_pcs_fence_kdump() > (pcs cluster cib | grep -q 'type="fence_kdump"') &> /dev/null || return 1 > } > >+# Check if fence_kdump is configured using kdump options >+is_generic_fence_kdump() >+{ >+ [ -x $FENCE_KDUMP_SEND ] || return 1 >+ >+ grep -q "^fence_kdump_nodes" /etc/kdump.conf >+} >+ > get_user_configured_dump_disk() > { > local _target >diff --git a/kdump.conf b/kdump.conf >index a106462..08bbe2a 100644 >--- a/kdump.conf >+++ b/kdump.conf >@@ -123,6 +123,15 @@ > # dracut_args <arg(s)> > # - Pass extra dracut options when rebuilding kdump > # initrd. >+# >+# fence_kdump_args <arg(s)> >+# - Command line arguments for fence_kdump_send (it can contain >+# all valid arguments except hosts to send notification to). >+# >+# fence_kdump_nodes <node(s)> >+# - List of cluster node(s) separated by space to send fence_kdump >+# notification to (this option is mandatory to enable fence_kdump). >+# > > #raw /dev/vg/lv_kdump > #ext4 /dev/vg/lv_kdump >@@ -141,3 +150,5 @@ core_collector makedumpfile -l --message-level 1 -d 31 > #default shell > #force_rebuild 1 > #dracut_args --omit-drivers "cfg80211 snd" --add-drivers "ext2 ext3" >+#fence_kdump_args -p 7410 -f auto -c 0 -i 10 >+#fence_kdump_nodes node1 node2 >diff --git a/kdump.conf.5 b/kdump.conf.5 >index 7eaf9dd..69628bd 100644 >--- a/kdump.conf.5 >+++ b/kdump.conf.5 >@@ -177,6 +177,21 @@ Kdump uses dracut to generate initramfs for second kernel. This option > allows a user to pass arguments to dracut directly. > .RE > >+ >+.B fence_kdump_args <arg(s)> >+.RS >+Command line arguments for fence_kdump_send (it can contain all valid >+arguments except hosts to send notification to). >+.RE >+ >+ >+.B fence_kdump_nodes <node(s)> >+.RS >+List of cluster node(s) separated by space to send fence_kdump notification >+to (this option is mandatory to enable fence_kdump). >+.RE >+ >+ > .SH DEPRECATED OPTIONS > > .B net <nfs mount>|<user@server> >diff --git a/kdumpctl b/kdumpctl >index 3058171..6e02328 100755 >--- a/kdumpctl >+++ b/kdumpctl >@@ -166,7 +166,7 @@ function check_config() > case "$config_opt" in > \#* | "") > ;; >- raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args) >+ raw|ext2|ext3|ext4|minix|btrfs|xfs|nfs|ssh|sshkey|path|core_collector|kdump_post|kdump_pre|extra_bins|extra_modules|default|force_rebuild|dracut_args|fence_kdump_args|fence_kdump_nodes) > [ -z "$config_val" ] && { > echo "Invalid kdump config value for option $config_opt." > return 1; >-- >1.8.3.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1078134
:
876252
|
876253
|
876254
|
876255
|
876256
|
879449
|
879461
|
879464
|
879465
|
879466
|
879467
|
879468
|
881288
|
881289
|
881290
|
881291
|
881292
|
881293
|
882135
|
882136
|
882137
|
882138
|
882140
|
882141
|
882142