From 55eb1f28406499b52bb523cdc9ecf309f09c0494 Mon Sep 17 00:00:00 2001 From: penguhyang Date: Tue, 24 May 2016 07:07:42 -0400 Subject: [PATCH 1/2] fix #1093, powerkvm, diskfull, enable the pre-script log can be saved to the CN --- .../install/pkvm/compute.pkvm3.ppc64le.tmpl | 19 +++++++++---------- .../share/xcat/install/scripts/pre.pkvm3 | 9 ++++++++- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl b/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl index 217b5544d..ca50f7631 100644 --- a/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl +++ b/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl @@ -36,22 +36,21 @@ rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password# %pre { -set -x -touch "/startpre" +echo "Running Automated Network Pre-Installation script..." #add the code to determine the disk to partition here #default is /dev/sda #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.pkvm3# -} >>/tmp/prelog 2>&1 +} >>/tmp/pre-install.log 2>&1 %end %post -touch "/startpost" - +mkdir -p /var/log/xcat/ +{ +cat >> /var/log/xcat/xcat.log << "EOF" +%include /tmp/pre-install.log +EOF +echo "Running Automated Network Post-Installation script..." #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat# -touch "/inpost" - -#sleep 1000000 - - +} >>/var/log/xcat/xcat.log 2>&1 %end diff --git a/xCAT-server/share/xcat/install/scripts/pre.pkvm3 b/xCAT-server/share/xcat/install/scripts/pre.pkvm3 index bda6cced5..632f08197 100755 --- a/xCAT-server/share/xcat/install/scripts/pre.pkvm3 +++ b/xCAT-server/share/xcat/install/scripts/pre.pkvm3 @@ -1,3 +1,8 @@ +export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" +if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then + set -x +fi + #find first available block device (sda or vda likely) #TODO: pick a likely non-SAN target if possible @@ -18,4 +23,6 @@ fi echo "part PV.01 --ondisk=$instdisk" >> /tmp/partitioning echo "volgroup ibmpkvm_rootvg PV.01" >> /tmp/partitioning - +if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then + set +x +fi From 4e8ae1653e4f90def6728def7c8a0c1726e3fca5 Mon Sep 17 00:00:00 2001 From: penguhyang Date: Tue, 14 Jun 2016 00:46:47 -0400 Subject: [PATCH 2/2] powerkvm,diskfull,enable access the installer via ssh --- xCAT-server/share/xcat/install/scripts/pre.pkvm3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/share/xcat/install/scripts/pre.pkvm3 b/xCAT-server/share/xcat/install/scripts/pre.pkvm3 index 632f08197..098311e58 100755 --- a/xCAT-server/share/xcat/install/scripts/pre.pkvm3 +++ b/xCAT-server/share/xcat/install/scripts/pre.pkvm3 @@ -3,6 +3,10 @@ if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then set -x fi +if [ "$XCATDEBUGMODE" = "2" ]; then + echo 'root:cluster' | chpasswd +fi + #find first available block device (sda or vda likely) #TODO: pick a likely non-SAN target if possible