From dc6581a1f277c5ad2c37670c6a92bbbd02a18cf9 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 29 Nov 2016 13:31:22 -0500 Subject: [PATCH 1/5] Have snmpmon set the community string Some BMCs do not default to 'public' for alerts. Change this to do public for now, since other parts of the code are still hard baked. --- xCAT-server/lib/xcat/monitoring/snmpmon.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/monitoring/snmpmon.pm b/xCAT-server/lib/xcat/monitoring/snmpmon.pm index 1a7cf4d4d..c0bbb6c1e 100644 --- a/xCAT-server/lib/xcat/monitoring/snmpmon.pm +++ b/xCAT-server/lib/xcat/monitoring/snmpmon.pm @@ -514,8 +514,8 @@ sub configBMC { $ret_text .= "Changeing SNMP PEF policy for IPMI nodes $noderange:\n $result\n"; } } elsif ($action == 1) { - print "XCATBYPASS=Y rspconfig $noderange alert=en\n"; - my $result = `XCATBYPASS=Y rspconfig $noderange alert=en 2>&1`; + print "XCATBYPASS=Y rspconfig $noderange alert=en community=public\n"; + my $result = `XCATBYPASS=Y rspconfig $noderange alert=en community=public 2>&1`; if ($?) { $ret_val = 1; xCAT::MsgUtils->message('S', "[mon]: Changeing SNMP PEF policy for IPMI nodes $noderange:\n $result\n"); From 95ae5430863df58d09ea20b873bf546f218aa64f Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Tue, 29 Nov 2016 13:37:32 -0500 Subject: [PATCH 2/5] Revert "Undefine the release number so that the spec files will continue" This reverts commit 505a1c0556f684b204c0d5cbf955648d1df14209. --- makerpm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/makerpm b/makerpm index 912ddf3db..471943f1c 100755 --- a/makerpm +++ b/makerpm @@ -55,7 +55,7 @@ function makenoarch { tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm - rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz --define "version $VER" + rpmbuild $QUIET -ta $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz --define "version $VER" $REL "$EASE" RC=$? if [ $RPMNAME = "xCAT-UI" ]; then @@ -137,7 +137,7 @@ function makexcat { rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER*rpm echo "Building $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER-snap*.$ARCH.rpm $EMBEDTXT..." - rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET --define "version $VER" + rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET --define "version $VER" $REL "$EASE" RC=$? fi } @@ -170,7 +170,7 @@ function makegenesis { cd - >/dev/null rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$VER-snap*.noarch.rpm $EMBEDTXT..." - rpmbuild $QUIET -ba $DIR/$RPMNAME.spec --define "version $VER" + rpmbuild $QUIET -ba $DIR/$RPMNAME.spec --define "version $VER" $REL "$EASE" } function makegenesisscripts { @@ -190,7 +190,7 @@ function makegenesisscripts { cd - >/dev/null rm -f $RPMROOT/SRPMS/$RPMNAME-$ARCH-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$ARCH-$VER*rpm echo "Building $RPMROOT/RPMS/noarch/$RPMNAME-$ARCH-$VER-snap*.noarch.rpm $EMBEDTXT..." - rpmbuild $QUIET -ba $DIR/$RPMNAME.spec $TARGET --define "version $VER" + rpmbuild $QUIET -ba $DIR/$RPMNAME.spec $TARGET --define "version $VER" $REL "$EASE" } From 3370a7d48e333f4fe3c6c55d39dc8ab8e67373b1 Mon Sep 17 00:00:00 2001 From: bybai Date: Wed, 30 Nov 2016 22:34:42 -0500 Subject: [PATCH 3/5] fix statelite persistent dir use short name --- xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh | 2 +- xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh index 131b5f74e..56401e96d 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcat-prepivot.sh @@ -41,7 +41,7 @@ fi mount -t tmpfs rw $NEWROOT/$RWDIR mkdir -p $NEWROOT/$RWDIR/tmpfs -ME=`hostname` +ME=`hostname -s` if [ ! -z $NODE ]; then ME=$NODE fi diff --git a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot index 6e9e524ba..c4d6c17dd 100755 --- a/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot +++ b/xCAT-server/share/xcat/netboot/rh/dracut_033/xcatroot @@ -160,7 +160,7 @@ elif [ -r /rootimg-statelite.gz ]; then mount -t tmpfs rw $NEWROOT/$RWDIR mkdir -p $NEWROOT/$RWDIR/tmpfs - ME=`hostname` + ME=`hostname -s` if [ ! -z $NODE ]; then ME=$NODE fi From 77bc92534e9e1f999c7961d5d769cb8ccc931d31 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 1 Dec 2016 00:51:03 -0500 Subject: [PATCH 4/5] remove invalid cases from bundle files --- xCAT-test/autotest/bundle/rhels6.7_ppc64.bundle | 3 --- xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle | 3 --- xCAT-test/autotest/bundle/rhels7.2_ppc64.bundle | 3 --- xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle | 3 --- xCAT-test/autotest/bundle/sles11.4_ppc64.bundle | 3 --- 5 files changed, 15 deletions(-) diff --git a/xCAT-test/autotest/bundle/rhels6.7_ppc64.bundle b/xCAT-test/autotest/bundle/rhels6.7_ppc64.bundle index ba479da63..2ce66a4df 100644 --- a/xCAT-test/autotest/bundle/rhels6.7_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.7_ppc64.bundle @@ -270,9 +270,6 @@ switchdiscover_range_z switchdiscover_range_z_V makentp_v makentp_h -makentp_V -makentp -makentp_a nodeset_check_warninginfo runcmdinstaller_h runcmdinstaller_command diff --git a/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle b/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle index 0528fa834..a3693a1f2 100644 --- a/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels6.8_ppc64.bundle @@ -275,9 +275,6 @@ switchdiscover_range_z switchdiscover_range_z_V makentp_v makentp_h -makentp_V -makentp -makentp_a nodeset_check_warninginfo runcmdinstaller_h runcmdinstaller_command diff --git a/xCAT-test/autotest/bundle/rhels7.2_ppc64.bundle b/xCAT-test/autotest/bundle/rhels7.2_ppc64.bundle index 0528fa834..a3693a1f2 100644 --- a/xCAT-test/autotest/bundle/rhels7.2_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.2_ppc64.bundle @@ -275,9 +275,6 @@ switchdiscover_range_z switchdiscover_range_z_V makentp_v makentp_h -makentp_V -makentp -makentp_a nodeset_check_warninginfo runcmdinstaller_h runcmdinstaller_command diff --git a/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle b/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle index 0528fa834..a3693a1f2 100644 --- a/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle +++ b/xCAT-test/autotest/bundle/rhels7.3_ppc64.bundle @@ -275,9 +275,6 @@ switchdiscover_range_z switchdiscover_range_z_V makentp_v makentp_h -makentp_V -makentp -makentp_a nodeset_check_warninginfo runcmdinstaller_h runcmdinstaller_command diff --git a/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle b/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle index d0992c014..6084ed160 100644 --- a/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle +++ b/xCAT-test/autotest/bundle/sles11.4_ppc64.bundle @@ -257,9 +257,6 @@ switchdiscover_range_z switchdiscover_range_z_V makentp_v makentp_h -makentp_V -makentp -makentp_a nodeset_check_warninginfo xcatconfig_u_check_xcatsslversion_rhels_sles reg_linux_diskless_installation_flat From 7c5ef745659f383fff01a6254782a0b64e1838ee Mon Sep 17 00:00:00 2001 From: chenglch Date: Thu, 1 Dec 2016 16:37:46 +0800 Subject: [PATCH 5/5] Become process group leader when updating firmware As exec is invoked, child process can not ignore the signal sent to the process group, use setpgrp to set the pgid to itself. close-issue: #1849 --- xCAT-server/lib/xcat/plugins/ipmi.pm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/ipmi.pm b/xCAT-server/lib/xcat/plugins/ipmi.pm index 5f72fa77d..1138bac9b 100644 --- a/xCAT-server/lib/xcat/plugins/ipmi.pm +++ b/xCAT-server/lib/xcat/plugins/ipmi.pm @@ -1924,6 +1924,11 @@ sub do_rflash_process { # child elsif ($pid == 0) { + unless (setpgrp()) { + xCAT::SvrUtils::sendmsg([ 1, "Faild to run setgprp for $$ process" ], + $callback, $node); + exit(1); + } my $extra = $_[8]; my @exargs = @$extra; my $programe = \$0;