From 7528335082414756a3846e04474973e3007b9944 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Thu, 21 Feb 2008 20:09:41 +0000 Subject: [PATCH] Undo the kexec attempts in nbroot, testing has uncovered severe hang situations that may occur, report back when packimage doesn't understand the method requested git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@543 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot/overlay/bin/dodestiny | 3 ++- xCAT-server-2.0/lib/xcat/plugins/packimage.pm | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/xCAT-nbroot/overlay/bin/dodestiny b/xCAT-nbroot/overlay/bin/dodestiny index 92788acdc..22511206c 100755 --- a/xCAT-nbroot/overlay/bin/dodestiny +++ b/xCAT-nbroot/overlay/bin/dodestiny @@ -97,6 +97,7 @@ while :; do $TARG fi if [ $DESTINY == "install" -o $DESTINY == "netboot" ]; then + reboot -f #If script is here, kexec failed, reboot in case it wasn't a linux kernel and let the boot loader handle it instead IMGSERVER=`grep imgserver /tmp/destiny | awk -F'>' '{print $2}'|awk -F'<' '{print $1}'` INITRD=`grep initrd /tmp/destiny | awk -F'>' '{print $2}'|awk -F'<' '{print $1}'` KERNEL=`grep kernel /tmp/destiny | awk -F'>' '{print $2}'|awk -F'<' '{print $1}'` @@ -107,7 +108,7 @@ while :; do for mod in `lsmod|awk '{print $1}'|grep -v Module`; do rmmod $mod done - kexec -f --append="$KCMD" --initrd=/tmp/initrd /tmp/kernel + #kexec -f --append="$KCMD" --initrd=/tmp/initrd /tmp/kernel reboot -f #If script is here, kexec failed, reboot in case it wasn't a linux kernel and let the boot loader handle it instead fi if [ $DEST == "runimage" ]; then diff --git a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm index 102d537bf..4e29c05f4 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/packimage.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/packimage.pm @@ -76,6 +76,8 @@ sub process_request { } elsif ($method =~ /squashfs/) { $temppath = mkdtemp("/tmp/packimage.$$.XXXXXXXX"); $excludestr =~ s!-a \z!|cpio -dump $temppath!; + } else { + $callback->({error=>["Invalid method '$method' requested"],errorcode=>[1]}); } if (! -d "$installroot/netboot/$osver/$arch/$profile/rootimg") {