2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 01:26:38 +00:00

Merge branch 'master' into T4196

This commit is contained in:
xuweibj 2017-11-28 12:22:51 +08:00 committed by GitHub
commit 241019d55f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 71 additions and 40 deletions

View File

@ -20,8 +20,11 @@ if [ -z $1 ]; then
if [ $BUILDARCH = "ppc64le" ]; then
HOSTOS="Pegas1.0"
BUILDARCH="ppc64"
else
elif [ $BUILDARCH = "ppc64" ]; then
HOSTOS="fedora26"
elif [ $BUILDARCH = "x86_64" ]; then
yum install efibootmgr bc -y
HOSTOS="centos7"
fi
fi
@ -45,13 +48,12 @@ echo "#!/bin/bash" > ./installkernel
for line in `cat /lib/modules/$KERVER/modules.dep | awk -F: '{print \$1}'`; do
basename $line >> ./installkernel;
done
sed -i 's/\(.*\)\.ko/instmods \1/g' ./installkernel
sed -i 's/\(.*\)\.ko.*/instmods \1/g' ./installkernel
chmod +x ./installkernel
cd -
mkdir -p $DRACUTMODDIR
cp $DIR/* $DRACUTMODDIR
# Remove the ipr(IBM Power RAID) stuff when building on x86_64
if [ $BUILDARCH = "x86_64" ]; then
sed -i 's/dracut_install \/lib64\/libform.so.5//' $DRACUTMODDIR/install
@ -62,6 +64,11 @@ if [ $BUILDARCH = "x86_64" ]; then
sed -i '/\/usr\/sbin\/iprconfig/ d' $DRACUTMODDIR/install
sed -i '/hwdb.bin/ d' $DRACUTMODDIR/install
sed -i 's/instmods ipr//' $DRACUTMODDIR/installkernel
sed -i 's/ mkreiserfs//' $DRACUTMODDIR/install
sed -i 's/ reiserfstune//' $DRACUTMODDIR/install
sed -i 's/ vconfig//' $DRACUTMODDIR/install
sed -i 's/\/lib\/terminfo\/l\/linux/\/usr\/share\/terminfo\/l\/linux/g' $DRACUTMODDIR/install
sed -i 's/\/lib\/terminfo\/v\/vt100/\/usr\/share\/terminfo\/v\/vt100/g' $DRACUTMODDIR/install
fi
if [ "$HOSTOS" = "mcp" ]; then
#Special handlings for MCP PPC64 platform building.
@ -144,12 +151,11 @@ if [ "$HOSTOS" = "mcp" ]; then
else
echo Creating the initramfs in /tmp/xcatgenesis.$$.rfs using dracut ...
fi
# On Fedora 20 ppc64, dracut uses host-only mode by default
if [ $BUILDARCH = "ppc64" ]; then
dracut -m "xcat base" -N -f /tmp/xcatgenesis.$$.rfs $KERNELVERSION
else
dracut -m "xcat base" -f /tmp/xcatgenesis.$$.rfs $KERNELVERSION
dracut -m "xcat base" --no-early-microcode -N -f /tmp/xcatgenesis.$$.rfs $KERNELVERSION
fi
if [ $? -ne 0 ]; then
@ -159,6 +165,7 @@ fi
echo Expanding the initramfs into /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs ...
cd /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs
zcat /tmp/xcatgenesis.$$.rfs|cpio -dumi
# add the perl library
@ -176,11 +183,12 @@ done
# create the predictable naming for nics
LIB_UDEV_RULES="/lib/udev/rules.d/"
cp $DRACUTMODDIR/80-net-name-slot.rules /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs/lib/udev/rules.d/
if [ $? -ne 0 ]; then
echo "ERROR - expanding the initramfs, please correct the issues and try again"
exit 1
if [ ! -e "$LIB_UDEV_RULES/80-net-name-slot.rules" ]; then
cp $DRACUTMODDIR/80-net-name-slot.rules /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs/lib/udev/rules.d/
if [ $? -ne 0 ]; then
echo "ERROR - expanding the initramfs, please correct the issues and try again"
exit 1
fi
fi
# add the kernel

View File

@ -944,7 +944,7 @@ sub parse_args {
}
}
# show options parsed in bypass mode
print "DEBUG filename=$filename_passed, updateid=$updateid_passed, options=$option_flag, verbose=$verbose, invalid=$invalid_options\n";
print "DEBUG filename=$filename_passed, updateid=$updateid_passed, options=$option_flag, invalid=$invalid_options rflash_arguments=@flash_arguments\n";
if ($option_flag =~ tr{ }{ } > 0) {
unless ($verbose) {
@ -961,6 +961,7 @@ sub parse_args {
if ($option_flag !~ /^-c$|^--check$|^-u$|^--upload$|^-a$|^--activate$/) {
return ([ 1, "Invalid option specified when a file is provided: $option_flag" ]);
}
xCAT::SvrUtils::sendmsg("Attempting to upload $flash_arguments[0], please wait...", $callback);
}
else {
if ($updateid_passed) {
@ -968,6 +969,11 @@ sub parse_args {
if ($option_flag !~ /^-d$|^--delete$|^-a$|^--activate$/) {
return ([ 1, "Invalid option specified when an update id is provided: $option_flag" ]);
}
my $action = "activate";
if ($option_flag =~ /^-d$|^--delete$/) {
$action = "delete";
}
xCAT::SvrUtils::sendmsg("Attempting to $action ID=$flash_arguments[0], please wait...", $callback);
}
else {
# Neither Filename nor updateid was not passed, check flags allowed without file or updateid

View File

@ -82,24 +82,22 @@ for i in $*; do
done
# remove the last delimiter
userlisttmp="${userlist%?}"
listend=")'"
listend="):'"
userlist=$userlisttmp$listend
grepcmd=$grepcmd$userlist
#set -x
grepcmd="$grepcmd $filebackup > $filebackup.nodups"
grepcmd="$grepcmd $mergefile > $mergefile.nodups"
#echo "grepcmd=$grepcmd"
# now run it
eval $grepcmd
# if no dups file created
if [ -s "$filebackup.nodups" ]; then
cp -p $filebackup.nodups $filebackup
#echo "cp -p $filebackup.nodups $filebackup"
rm $filebackup.nodups
fi
fi
# Now update the currentfile
cat $filebackup $mergefile > $curfile
#echo "cat $filebackup $mergefile > $curfile"
# add new entries from mergefile, if any
if [ -a "$mergefile.nodups" ]; then
cat $mergefile.nodups >> $curfile
rm $mergefile.nodups
fi
# now cleanup
rm $filebackup.userlist
# echo "rm $filebackup.userlist"

View File

@ -1,14 +1,13 @@
description:the cases in this bundle is to used to verify xCAT hardware control funtions on openpower servers which are mananged using openbmc.
#INCLUDE:hdctrl_general.bundle#
rinv_uuid
rinv_vpd
rinv_cpu
rinv_dimm
rinv_check_active_fw_count
rinv_check_active_fw_count_verbose
rinv_wrongbmcpasswd
rvitals_wattage
rvitals_fanspeed
rvitals_power
rvitals_leds
rvitals_altitude
rsetboot_net_statcheck
rsetboot_cd_statcheck
@ -38,4 +37,16 @@ rspconfig_set_all
rspconfig_set_all_invalid
rspconfig_set_vlan
rspconfig_set_vlan_invalid
rflash_check
rflash_invalid_activate
rflash_invalid_activate_and_delete
rflash_invalid_id
rflash_invalid_multiple_id_3
rflash_invalid_multiple_id_2
rflash_invalid_node
rflash_invalid_delete_2
rpower_softoff
rpower_suspend_OpenpowerBmc
rpower_wake_OpenpowerBmc
rpower_errorcommand_OpenpowerBmc
rpower_wrongpasswd

View File

@ -160,25 +160,23 @@ check:rc==0
end
start:rpower_suspend_OpenpowerBmc
hcp:openbmc
cmd:rpower $$CN suspend
check:output=~Error: unsupported command rpower suspend for OpenPOWER
check:output=~Error: Unsupported command: rpower suspend
check:rc==1
end
start:rpower_softoff_OpenpowerBmc
cmd:rpower $$CN softoff
check:output=~Error: unsupported command rpower softoff for OpenPOWER
check:rc==1
end
start:rpower_wake_OpenpowerBmc
hcp:openbmc
cmd:rpower $$CN wake
check:output=~Error: unsupported command rpower wake for OpenPOWER
check:output=~Error: Unsupported command: rpower wake
check:rc==1
end
start:rpower_errorcommand_OpenpowerBmc
hcp:openbmc
cmd:rpower $$CN ddd
check:output=~Unsupported command:
check:output=~Error: Unsupported command: rpower ddd
check:rc==1
end

View File

@ -142,35 +142,45 @@ end
start:rspconfig_list_ip
despcription:rspconfig list bmc ip
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -lip $$CN
cmd:rspconfig $$CN ip
check:rc==0
check:output=~__GETNODEATTR($$CN,bmc)__
end
start:rspconfig_list_gateway
hcp:openbmc
description:rspconfig list openbmc gateway
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -lg $$CN
cmd:rspconfig $$CN gateway
check:output=~$$CN: BMC Gateway:
check:rc==0
end
start:rspconfig_list_netmask
hcp:openbmc
description:rspconfig list openbmc netmask
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -ln $$CN
cmd:rspconfig $$CN netmask
check:rc==0
check:output=~$$CN: BMC Netmask:
end
start:rspconfig_list_vlan
description:rspconfig list openbmc netmask
description:rspconfig list openbmc vlan
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -lv $$CN
cmd: rspconfig $$CN vlan
check:rc==0
check:output=~$$CN: BMC VLAN ID:
end
start:rspconfig_list_all
description:rspconfig list openbmc netmask
description:rspconfig list openbmc ip gateway netmask vlan
Attribute: $$CN-The operation object of rspconfig command
cmd:/opt/xcat/share/xcat/tools/autotest/testcase/rspconfig/rspconfig.sh -la $$CN
cmd: rspconfig $$CN ip gateway netmask vlan
check:rc==0
check:output=~$$CN: BMC VLAN ID:
check:output=~$$CN: BMC Gateway:
check:output=~$$CN: BMC Netmask:
check:output=~__GETNODEATTR($$CN,bmc)__
end