From cc3d317823c727e95d1e9ba5233d203c1368b326 Mon Sep 17 00:00:00 2001 From: yangsbj Date: Sun, 26 Aug 2018 23:08:25 -0400 Subject: [PATCH 1/2] capture retrieve_fd fatal error, log the underlie message --- xCAT-server/lib/xcat/plugins/ipmi.pm | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index a61bae3c2..902ec3052 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -8239,7 +8239,13 @@ sub loadsdrcache { if (!open($fh, "<$file")) { return (1); } - $r = retrieve_fd($fh); + eval { + $r = retrieve_fd($fh); + } + if($@){ + xCAT::MsgUtils->message("S", "loadsdrcache: Fatal error while retrieving data from $file, $@"); + return 1; + } unless ($r) { close($fh); return 1; } unless ($r->{xcat_sdrcacheversion} and $r->{xcat_sdrcacheversion} == $cache_version) { close($fh); return 1; } #version mismatch From f7a3372a4919bd04bbbd362ca5e4c647fca7ace8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Tue, 28 Aug 2018 14:23:29 +0800 Subject: [PATCH 2/2] Still need the busybox cpio workaround in Ubuntu 18.04.1 (#5562) --- xCAT-server/share/xcat/netboot/ubuntu/genimage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/ubuntu/genimage b/xCAT-server/share/xcat/netboot/ubuntu/genimage index e7bd3c9dc..a14c874e6 100755 --- a/xCAT-server/share/xcat/netboot/ubuntu/genimage +++ b/xCAT-server/share/xcat/netboot/ubuntu/genimage @@ -201,7 +201,7 @@ if ($netdriver) { if ($arch eq 'x86' or $arch eq 'x86_64') { @ndrivers = qw/tg3 bnx2 bnx2x e1000 e1000e igb mlx_en virtio_net/; } elsif ($arch eq 'ppc64el') { - @ndrivers = qw/bnx2 bnx2x e1000 e1000e igb mlx_en mlx4_en virtio_net/; + @ndrivers = qw/bnx2 bnx2x e1000 e1000e igb ibmveth ehea mlx_en mlx4_en virtio_net/; } elsif ($arch eq 'ppc64') { @ndrivers = qw/e1000 e1000e igb ibmveth ehea/; } elsif ($arch eq 's390x') { @@ -1653,7 +1653,7 @@ EOMS # Workaround for Ubuntu 18.04 busybox bug # https://bugs.launchpad.net/ubuntu/+source/busybox/+bug/1753572 # On Ubuntun 18.04, will use GNU cpio instead of busybox cpio - if ("ubuntu18.04" eq $osver) { + if ($osver = ~ /^18.04/) { foreach ("bin/cpio") { getlibs($_); push @filestoadd, $_;