[PATCH] dracut-module-setup.sh: pass ip=either6 param for ipv6
by Pingfan Liu
Kdump always use _proto=dhcp for both ipv4 and ipv6. But for ipv6
the dhcp address assignment is not like ipv4, there are different ways
for it, stateless and stateful, see below document:
https://fedoraproject.org/wiki/IPv6Guide
In case stateless, kernel can do the address assignment, dracut use
_proto=auto6; for stateful case, dracut use _proto=dhcp6.
But it is hard to decide whether stateless or stateful takes effect,
hence, dracut introduces ip=either6 option, which can try both of these
method automatically for us. For detail, refer to dracut:
commit 67354ee 40network: introduce ip=either6 option
We do not see bug reports before because for the most auto6 cases
kernel assign ip address before dhclient, kdump just happened to work.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
dracut-module-setup.sh | 2 ++
kexec-tools.spec | 2 +-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index 7505e81..f87617a 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -293,6 +293,8 @@ kdump_setup_netdev() {
_static=$(kdump_static_ip $_netdev $_srcaddr)
if [ -n "$_static" ]; then
_proto=none
+ elif is_ipv6_address $_srcaddr; then
+ _proto=either6
else
_proto=dhcp
fi
diff --git a/kexec-tools.spec b/kexec-tools.spec
index 5712acb..cc546d2 100644
--- a/kexec-tools.spec
+++ b/kexec-tools.spec
@@ -50,7 +50,7 @@ Requires(post): systemd-units
Requires(preun): systemd-units
Requires(postun): systemd-units
Requires(pre): coreutils sed zlib
-Requires: dracut >= 046-7
+Requires: dracut >= 047-34.git20180604
Requires: dracut-network >= 044-117
Requires: ethtool
BuildRequires: zlib-devel zlib zlib-static elfutils-devel-static glib2-devel bzip2-devel ncurses-devel bison flex lzo-devel snappy-devel
--
2.7.4
4 years, 11 months
[PATCH] dracut-module-setup.sh: install /etc/hosts when using fence_kdump
by Pingfan Liu
When using fence_kdump, module-setup will create a kdump.conf with
fence_kdump_nodes. The node name comes from the cluster xml, which may
use the hostname alias. Later in kdump stage, "fence_kdump_send alias_1
alias_2" sends out notification to peers. Hence it requires /etc/hosts
and nsswitch.conf to make alias work.
Signed-off-by: Pingfan Liu <piliu(a)redhat.com>
---
dracut-module-setup.sh | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dracut-module-setup.sh b/dracut-module-setup.sh
index c0f1a88..7505e81 100755
--- a/dracut-module-setup.sh
+++ b/dracut-module-setup.sh
@@ -703,6 +703,8 @@ kdump_configure_fence_kdump () {
kdump_install_net $node
done
+ dracut_install /etc/hosts
+ dracut_install /etc/nsswitch.conf
dracut_install $FENCE_KDUMP_SEND
}
--
2.7.4
4 years, 11 months