On 03/13/14 at 02:47am, Martin Perina wrote:
Hi,
we want to integrate support for fence_kdump into oVirt project. Marek Grac pointed me to kexec-tools-2.0.4-23 which contains automatic configuration of fence_kdump from Pacemaker config. Unfortunately for us, this support is tightly bound to Pacemaker, so I created attached patch, which adds support for manual configuration of fence_kdump:
Current status without this patch (kexec-tools-2.0.4-23)
when running 'kdumpctl restart' kdump detects if fence_kdump_send command is installed and if so, it tries to:
a) Create /etc/sysconfig/fence_kdump file with command line parameters for fence_kdump_send. These parameters are extracted from cluster configuration using 'pcs cluster' command
We don't create /etc/sysconfig/fence_kdump. Instead it's created by fence kdump end user who want to configure fence_kdump_send to run with options rather than default. And we install it to 2nd kernel and source it in our kdump.sh if it exists in 1st kernel.
In 2nd kernel, we run fence_kdump_send as the following:
$FENCE_KDUMP_SEND $FENCE_KDUMP_OPTS host1 host2 ... hostN
As you probably know, $FENCE_KDUMP_SEND stands for /usr/libexec/fence_kdump_send. So the command is pretty much as
/usr/libexec/fence_kdump_send $FENCE_KDUMP_OPTS host1...hostN
n /etc/sysconfig/fence_kdump doesn't exist, $FENCE_KDUMP_SEND is empty, fence_kdump_send is called with no options, but hosts list:
/usr/lib/exec/fence_kdump_send host1...hostX
When user creates /etc/sysconfig/fence_kdump and configures FENCE_KDUMP_OPTS to something like "-c 2 -i 10 -v" in it, fence_kdump_send is called as:
/usr/libexec/fence_kdump_send -c 2 -i 10 -v host1...hostN
b) Create /etc/fence_kdump_nodes file with list of hosts to send fence_kdump notification to. These hosts are also extracted from cluster configuration using 'pcs cluster' command c) If these two files are successfully created, kdump tries to configure network to be able to reach all hosts defined in /etc/fence_kdump_nodes
Not exactly. We configure network accordingly if is_fence_kdump().
is_fence_kdump() checks if cluster and if cluster is configured fence kdump in cluster cib.
d) Install these two config files into kdump's kernel initramfs
/etc/fence_kdump_nodes is mandatory while /etc/sysconfig/kdump_fence is optional depending on if it exists.
Behavior with this patch
when running 'kdumpctl restart' kdump detect if fence_kdump_send binary is installed and if so, it tries to:
a) It tries to detect is cluster is configured ('pcs' command is available). If so, it creates needed config files as described above in steps 1a) and 1b)
Please don't create /etc/sysconfig/fence_kdump. If it doesn't in 1st, there's no need to create one for the 2nd kernel. We only source it when it exists in 2nd kernel.
b) If cluster is not configured, it tries to detect if /etc/sysconfig/fence_kdump and /etc/sysconfig/fence_kdump_nodes exist. If so, fence_kdump is marked as successfully configured and kdump continues with steps 1c) and 1d)
Is /etc/sysconfig/fence_kdump_nodes created by the user who want to use fence_kdump facility? Even without being in a cluster environment? Does oVirt work with fence_kdump_send?
Thanks WANG Chao
Is it possible to integrate such patch into kexec-tools RPM?
We would like to integrate fence_kdump support into oVirt 3.5 which should be released in May, so before this to happen, we need kexec-tools RPM with this patch to be available for RHEL 6 and Fedora 19/20.
Thanks
Martin Perina _______________________________________________ kexec mailing list kexec@lists.fedoraproject.org https://lists.fedoraproject.org/mailman/listinfo/kexec