On 01/22/14 at 12:59pm, Vivek Goyal wrote:
On Mon, Jan 13, 2014 at 06:23:11PM +0800, WANG Chao wrote:
[..]
> #save netdev used for kdump as cmdline
> - echo "kdumpnic=${_netdev}" >
${initdir}/etc/cmdline.d/60kdumpnic.conf
> - echo "bootdev=${_netdev}" >
${initdir}/etc/cmdline.d/70bootdev.conf
> + #fence kdump would override bootdev and kdumpnic, we should avoid that.
> + if [ ! -f ${initdir}${initdir}/etc/cmdline.d/60kdumpnic.conf ] &&
> + [ ! -f ${initdir}/etc/cmdline.d/70bootdev.conf ]; then
> + echo "kdumpnic=${_netdev}" >
${initdir}/etc/cmdline.d/60kdumpnic.conf
> + echo "bootdev=${_netdev}" >
${initdir}/etc/cmdline.d/70bootdev.conf
> + fi
Chao,
What's this change. Can you explain a bit.
Hi, Vivek
In case of network dump, bootdev and kdumpnic should be set to the NIC
routing to the network target, so that dracut is aware of which NIC
needs to be setup and configured as the gateway. It's fine that we just
set bootdev and kdumpnic without checking if these two are already set.
Because we know there is only one bootdev and kdumpnic in 2nd kernel.
However when fence_kdump comes into the picture, there might be several
NICs connecting to different target (different nodes and network dump
target). We need to ensure that the NIC that connects to the network
dump target works as the default one in the system (IE. to be bootdev
and kdumpnic) and the NICs that connects to other cluster nodes not to
be in the default route path.
In kdump-module-setup.sh, I'm re-using the setup network function. So I
figure out this way to avoid fence_kdump NIC overriding bootdev and
kdumpnic. Because setup dump target NIC is earlier then setup the fence
kdump NIC.
I know this part is a little bit tricky. But it does avoid some problems
we might face in case of a network dump in cluster environment...
Thanks
WANG Chao