diff --git a/.gitignore b/.gitignore
index e5d06cdf0..893951706 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
# ignore the documentation build files
docs/build
+# Ignore the temporary file for creating the Release version
+Release.save*
diff --git a/README.rst b/README.rst
index 15abed55c..d7f1ae9f6 100644
--- a/README.rst
+++ b/README.rst
@@ -8,7 +8,7 @@ Documentation
xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/
-|docs_latest| |docs_2124| |docs_2123| |docs_2122| |docs_212| |docs_211|
+|docs_latest| |docs_2132| |docs_2131| |docs_2130| |docs_212| |docs_211|
Open Source License
-------------------
@@ -22,26 +22,26 @@ Developers
Developers and prospective contributors are encouraged to read the `Developers Guide `_
In particular the `GitHub `_ related subsection.
-.. |docs_2124| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.12.4
- :alt: 2.12.4 documentation status
+.. |docs_2132| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.2
+ :alt: 2.13.2 documentation status
:scale: 100%
- :target: http://xcat-docs.readthedocs.io/en/2.12.4/
+ :target: http://xcat-docs.readthedocs.io/en/2.13.2/
-.. |docs_2123| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.12.3
- :alt: 2.12.3 documentation status
+.. |docs_2131| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.1
+ :alt: 2.13.1 documentation status
:scale: 100%
- :target: http://xcat-docs.readthedocs.io/en/2.12.3/
-
-.. |docs_2122| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.12.2
- :alt: 2.12.2 documentation status
+ :target: http://xcat-docs.readthedocs.io/en/2.13.1/
+
+.. |docs_2130| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.0
+ :alt: 2.13.0 documentation status
:scale: 100%
- :target: http://xcat-docs.readthedocs.io/en/2.12.2/
+ :target: http://xcat-docs.readthedocs.io/en/2.13.0/
-.. |docs_212| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.12.0
- :alt: 2.12.0 documentation status
+.. |docs_212| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.12
+ :alt: 2.12 documentation status
:scale: 100%
- :target: http://xcat-docs.readthedocs.io/en/2.12.0/
-
+ :target: http://xcat-docs.readthedocs.io/en/2.12/
+
.. |docs_211| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.11
:alt: 2.11 documentation status
:scale: 100%
diff --git a/Release b/Release
new file mode 100644
index 000000000..a33a0ed75
--- /dev/null
+++ b/Release
@@ -0,0 +1 @@
+snap000000000000
diff --git a/Version b/Version
index fb2c0766b..a1a4224dd 100644
--- a/Version
+++ b/Version
@@ -1 +1 @@
-2.13.0
+2.13.3
diff --git a/build-ubunturepo b/build-ubunturepo
index b4220b4a6..49e46cf63 100755
--- a/build-ubunturepo
+++ b/build-ubunturepo
@@ -4,32 +4,31 @@
# Author: Leonardo Tonetto (tonetto@linux.vnet.ibm.com)
# Revisor: Arif Ali (aali@ocf.co.uk)
#
-#
+#
# Getting Started:
-# - Clone the xcat-core git repository int a directory called /src/xcat-core, where
-# is the same name as the release dir it is uploaded to xcat.org (e.g devel, 2.9, 2.10)
+# - Clone the xcat-core git repository under a directory named "xcat-core/src"
# - make sure reprepro is installed on the build machine
-# - Run this script from the local git repository you just created. It will create the other directories that are needed.
+# - Run this script from the local git repository you just created.
+# ./build-ubunturepo -c BUILDALL=1
# Usage: attr=value attr=value ... ./build-ubunturepo { -c | -d }
# PROMOTE=1 - if the attribute "PROMOTE" is specified, means an official dot release. This does not
# actually build xcat, just uploads the most recent snap build to http://xcat.org/files/xcat/ .
# If not specified, a snap build is assumed, which uploads to https://xcat.org/files/xcat/
-# PREGA=1 - use this option with PROMOTE=1 on a branch that already has a released dot release, but this
-# build is a GA candidate build, not to be released yet. This will result in the tarball
+# PREGA=1 - use this option with PROMOTE=1 on a branch that already has a released dot release, but this
+# build is a GA candidate build, not to be released yet. This will result in the tarball
# being uploaded to http://xcat.org/files/xcat/repos/apt
-# (but the tarball file name will be like a released tarball, not a snap build).
+# (but the tarball file name will be like a released tarball, not a snap build).
# When you are ready to release this build, use PROMOTE=1 without PREGA
-# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in
+# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in
# prep for a release.
-# UP=0 or UP=1 - override the default upload behavior
# LOG= - provide an LOG file option to redirect some output into log file
#
-# For the dependency packages 1. All the xcat dependency deb packages should be uploaded to
+# For the dependency packages 1. All the xcat dependency deb packages should be uploaded to
# "pokgsa/projects/x/xcat/build/ubuntu/xcat-dep/debs/" on GSA
# 2. run ./build-ubunturepo -d
#
-# 3. the built xcat-dep deb packages tarball can be found in "../../xcat-dep"
+# 3. the built xcat-dep deb packages tarball can be found in "../../xcat-dep"
# related to the path of this script
############################
printusage()
@@ -39,10 +38,10 @@ printusage()
echo " -d : Create the xcat-dep repo."
}
# For the purpose of getting the distribution name
-if [[ ! -f /etc/lsb-release ]]; then
+if [[ ! -f /etc/lsb-release ]]; then
echo "ERROR: Could not find /etc/lsb-release, is this script executed on a Ubuntu machine?"
exit 1
-fi
+fi
. /etc/lsb-release
# Check the necessary packages before starting the build
@@ -84,7 +83,7 @@ do
r) r_flag=1
genesis_rpm_path="$OPTARG"
;;
- ?) printusage
+ ?) printusage
exit 2
;;
esac
@@ -96,13 +95,6 @@ if [ -z "$c_flag" -a -z "$d_flag" ];then
exit 2
fi
-USER="xcat"
-SERVER="xcat.org"
-FILES_PATH="files"
-FRS="/var/www/${SERVER}/${FILES_PATH}"
-APT_DIR="${FRS}/xcat"
-APT_REPO_DIR="${APT_DIR}/repos/apt"
-
if [ "$c_flag" -a "$d_flag" ];then
printusage
exit 2
@@ -118,7 +110,7 @@ curdir=`pwd`
local_core_repo_path="$curdir/../../xcat-core"
local_dep_repo_path="$curdir/../../xcat-dep/xcat-dep"
-#use flock to only one person build at the same time
+# Use flock to only one person build at the same time
# Get a lock, so can not do 2 builds at once
exec 8>/var/lock/xcatbld.lock
if ! flock -n 8; then
@@ -129,7 +121,7 @@ fi
export HOME=/root
WGET_CMD="wget"
-if [ ! -z ${LOG} ]; then
+if [ ! -z ${LOG} ]; then
WGET_CMD="wget -o ${LOG}"
fi
@@ -146,51 +138,46 @@ done
if [ "$c_flag" ]
then
- # strip the /src/xcat-core from the end of the dir to get the next dir up and use as the release
+ #
+ # The format of the directory for Ubuntu builds needs to be "xcat-core/src/xcat-core" so
+ # that the output build files are created under "xcat-core".
+ # TODO: This should be fixed in the future....
+ #
if [ -z "$REL" ]; then
t=${curdir%/src/xcat-core}
REL=`basename $t`
fi
+ if [ "$REL" != "xcat-core" ]; then
+ echo "ERROR: REL='$REL'needs to be 'xcat-core'. Ensure the path is 'xcat-core/src/xcat-core'"
+ exit 1
+ fi
- ver=`cat Version`
if [ "$PROMOTE" != 1 ]; then
code_change=0
update_log=''
- #get the version
- if [ "$REL" = "xcat-core" ];then
- git_flag=1
- REL=`git rev-parse --abbrev-ref HEAD`
- if [ "$REL" = "master" ]; then
- REL="devel"
- fi
- if [ -z "$GITUP" ];then
- update_log=../coregitup
- echo "git pull > $update_log"
- git pull > $update_log
- else
- update_log=$GITUP
- fi
-
- if ! grep -q 'Already up-to-date' $update_log; then
- code_change=1
- fi
+ # get the version
+ git_flag=1
+ REL=`git rev-parse --abbrev-ref HEAD`
+ if [ "$REL" = "master" ]; then
+ REL="devel"
+ fi
+ if [ -z "$GITUP" ];then
+ update_log=../coregitup
+ echo "git pull > $update_log"
+ git pull > $update_log
else
- git_flag=0
- if [ -z "$SVNUP" ]; then
- update_log=../coresvnup
- echo "svn up > $update_log"
- svn up > $update_log
- else
- update_log=$SVNUP
- fi
+ update_log=$GITUP
+ fi
- if ! grep -q 'At revision' $update_log;then
- code_change=1
- fi
+ if ! grep -q 'Already up-to-date' $update_log; then
+ code_change=1
fi
ver=`cat Version`
short_ver=`cat Version|cut -d. -f 1,2`
short_short_ver=`cat Version|cut -d. -f 1`
+ build_time=`date`
+ build_machine=`hostname`
+ commit_id=`git rev-parse --short HEAD`
package_dir_name=debs$REL
#TODO: define the core path and tarball name
@@ -206,18 +193,17 @@ then
echo "###############################"
#the package type: local | snap | alpha
- #the build introduce stirng
- pkg_type="snap"
+ #the build introduce string
build_string="Snap_Build"
- cur_date=`date +%Y%m%d%H%M`
- pkg_version="${ver}-${pkg_type}${cur_date}"
-
+ xcat_release="snap$(date '+%Y%m%d%H%M')"
+ pkg_version="${ver}-${xcat_release}"
+
if [ ! -d ../../$package_dir_name ];then
mkdir -p "../../$package_dir_name"
fi
packages="xCAT-client xCAT-genesis-scripts perl-xCAT xCAT-server xCAT xCATsn xCAT-test xCAT-buildkit xCAT-vlan xCAT-confluent xCAT-probe"
target_archs=(amd64 ppc64el)
- for file in `echo $packages`
+ for file in $packages
do
file_low=`echo $file | tr '[A-Z]' '[a-z]'`
if [ "$file" = "xCAT" -o "$file" = "xCAT-genesis-scripts" ]; then
@@ -225,13 +211,12 @@ then
else
target_archs="all"
fi
- for target_arch in `echo $target_archs`
+ for target_arch in $target_archs
do
if grep -q $file $update_log || [ "$BUILDALL" == 1 -o "$file" = "perl-xCAT" ]; then
rm -f ../../$package_dir_name/${file_low}_*.$target_arch.deb
- #genesis scripts package, don't remove genesis amd64 files
- #rm -f ../../$package_dir_name/${file_low}-amd64_*.deb
cd $file
+ CURDIR=$(pwd)
dch -v $pkg_version -b -c debian/changelog $build_string
if [ "$target_arch" = "all" ]; then
#xcat probe use some functions shipped by xCAT, for below reasons we need to copy files to xCAT-probe directory
@@ -239,24 +224,43 @@ then
#2 don't maintain two files for each script
#3 symbolic link can't work during package
if [ $file_low = "xcat-probe" ]; then
- CURDIR=$(pwd)
mkdir -p ${CURDIR}/lib/perl/xCAT/
cp -f ${CURDIR}/../perl-xCAT/xCAT/NetworkUtils.pm ${CURDIR}/lib/perl/xCAT/
cp -f ${CURDIR}/../perl-xCAT/xCAT/GlobalDef.pm ${CURDIR}/lib/perl/xCAT/
cp -f ${CURDIR}/../perl-xCAT/xCAT/ServiceNodeUtils.pm ${CURDIR}/lib/perl/xCAT/
fi
- dpkg-buildpackage -uc -us
+ CURDIR=$(pwd)
+ cp ${CURDIR}/debian/control ${CURDIR}/debian/control.save.998
+ # Magic string used here
+ sed -i -e "s#>= 2.13-snap000000000000#= ${pkg_version}#g" ${CURDIR}/debian/control
+ dpkg-buildpackage -rfakeroot -uc -us
+ mv ${CURDIR}/debian/control.save.998 ${CURDIR}/debian/control
else
if [ "$file" = "xCAT-genesis-scripts" ]; then
- CURDIR=$(pwd)
echo "Rename control file to build pkg: mv ${CURDIR}/debian/control-${target_arch} ${CURDIR}/debian/control"
- mv ${CURDIR}/debian/control-${target_arch} ${CURDIR}/debian/control
+ cp ${CURDIR}/debian/control-${target_arch} ${CURDIR}/debian/control
+ elif [ "$file" = "xCAT" ]; then
+ # shipping bmcsetup and getipmi scripts as part of postscripts
+ files=("bmcsetup" "getipmi")
+ for f in "${files[@]}"; do
+ cp ${CURDIR}/../xCAT-genesis-scripts/bin/$f ${CURDIR}/postscripts/$f
+ sed -i "s/xcat.genesis.$f/$f/g" ${CURDIR}/postscripts/$f
+ done
fi
- dpkg-buildpackage -uc -us -a$target_arch
+ CURDIR=$(pwd)
+ cp ${CURDIR}/debian/control ${CURDIR}/debian/control.save.998
+ # Magic string used here
+ sed -i -e "s#>= 2.13-snap000000000000#= ${pkg_version}#g" ${CURDIR}/debian/control
+ dpkg-buildpackage -rfakeroot -uc -us -a$target_arch
+ mv ${CURDIR}/debian/control.save.998 ${CURDIR}/debian/control
if [ "$file" = "xCAT-genesis-scripts" ]; then
- CURDIR=$(pwd)
echo "Move control file back: mv ${CURDIR}/debian/control ${CURDIR}/debian/control-${target_arch}"
- mv ${CURDIR}/debian/control ${CURDIR}/debian/control-${target_arch}
+ rm ${CURDIR}/debian/control
+ elif [ "$file" = "xCAT" ]; then
+ files=("bmcsetup" "getipmi")
+ for f in "${files[@]}"; do
+ rm -f ${CURDIR}/postscripts/$f
+ done
fi
fi
rc=$?
@@ -317,7 +321,7 @@ Label: xcat-core bazaar repository
Codename: $dist
Architectures: $tmp_out_arch
Components: main
-Description: Repository automatically genereted conf
+Description: Repository automatically genereted conf
SignWith: yes
__EOF__
@@ -357,12 +361,22 @@ __EOF__
chmod 775 mklocalrepo.sh
- #create the xcat-core.list file
+ #
+ # Add a buildinfo file under xcat-core to track information about the build
+ #
+ buildinfo=$local_core_repo_path/buildinfo
+ echo "VERSION=$ver" > $buildinfo
+ echo "RELEASE=$xcat_release" >> $buildinfo
+ echo "BUILD_TIME=$build_time" >> $buildinfo
+ echo "BUILD_MACHINE=$build_machine" >> $buildinfo
+ echo "COMMIT_ID=$commit_id" >> $buildinfo
+
+ #create the xcat-core.list file
cd ../
if ! grep xcat /etc/group ; then
groupadd xcat
- fi
+ fi
chgrp -R root xcat-core
chmod -R g+w xcat-core
@@ -388,7 +402,7 @@ then
#the path of ubuntu xcat-dep deb packages on GSA
GSA="/gsa/pokgsa/projects/x/xcat/build/ubuntu/xcat-dep"
-
+
if [ ! -d $GSA ]; then
echo "build-ubunturepo: It appears that you do not have gsa installed to access the xcat-dep pkgs."
exit 1;
@@ -400,10 +414,10 @@ then
echo "Syncing RPMs from $GSA/ to $local_dep_repo_path/../ ..."
rsync -ilrtpu --delete $GSA/ $local_dep_repo_path/../
- if [ $? -ne 0 ]; then
+ if [ $? -ne 0 ]; then
echo "Error from rsync, cannot continue!"
exit 1
- fi
+ fi
#clean all old files
if [ -e $local_dep_repo_path ];then
@@ -427,7 +441,7 @@ Label: xcat-dep bazaar repository
Codename: $dist
Architectures: $tmp_out_arch
Components: main
-Description: Repository automatically genereted conf
+Description: Repository automatically genereted conf
SignWith: yes
__EOF__
@@ -481,8 +495,16 @@ __EOF__
chgrp root $dep_tar_name
chmod g+w $dep_tar_name
- # Decide whether to upload or not (default NOT to upload)
- if [ "$UP" != "1" ]; then
+
+ USER="xcat"
+ SERVER="xcat.org"
+ FILES_PATH="files"
+ FRS="/var/www/${SERVER}/${FILES_PATH}"
+ APT_DIR="${FRS}/xcat"
+ APT_REPO_DIR="${APT_DIR}/repos/apt"
+
+ # Decide whether to upload the xcat-dep package or NOT (default is to NOT upload xcat-dep
+ if [ "$UP" != "1" ]; then
echo "Upload not specified, Done! (rerun with UP=1, to upload)"
cd $old_pwd
exit 0
@@ -507,7 +529,7 @@ __EOF__
while [ $((i+=1)) -le 5 ] && ! rsync -v --force README $USER@${SERVER}:${APT_DIR}/xcat-dep/2.x_Ubuntu/
do : ; done
- cd $old_pwd
- exit 0
fi
+
+cd $old_pwd
exit 0
diff --git a/buildcore.sh b/buildcore.sh
index e85ff7e67..4a90cd6e0 100755
--- a/buildcore.sh
+++ b/buildcore.sh
@@ -8,7 +8,7 @@
# - On AIX: Install openssl and openssh installp pkgs and run updtvpkg. Install from http://www.perzl.org/aix/ :
# apr, apr-util, bash, bzip2, db4, expat, gdbm, gettext, glib2, gmp, info, libidn, neon, openssl (won't
# conflict with the installp version - but i don't think you need this), pcre, perl-DBD-SQLite, perl-DBI,
-# popt, python, readline, rsynce, sqlite, subversion, unixODBC, zlib.
+# popt, python, readline, rsynce, sqlite, subversion, unixODBC, zlib.
# Install wget from http://www-03.ibm.com/systems/power/software/aix/linux/toolbox/alpha.html
# - Run this script from the xcat-core directory. It will create the other directories that are needed.
#
@@ -24,7 +24,7 @@
# (but the tarball file name will be like a released tarball, not a snap build). When you are ready to
# release this build, use PROMOTE=1 without PREGA
# BUILDALL=1 - build all rpms, whether they changed or not. Should be used for snap builds that are in prep for a release.
-# UP=0 or UP=1 - override the default upload behavior
+# UP=0 or UP=1 - override the default upload behavior
# GITUP= - control which rpms get built by specifying a coregitup file
# EMBED= - the environment for which a minimal version of xcat should be built, e.g. zvm or flex
# VERBOSE=1 - to see lots of verbose output
@@ -35,14 +35,17 @@
# The following environment variables can be modified if you need
#
+SCRIPT=$(readlink -f $0)
+SCRIPTPATH=`dirname $SCRIPT`
+
UPLOADUSER=litingt
USER=xcat
SERVER=xcat.org
FILES_PATH="files"
-FRS=/var/www/${SERVER}/${FILES_PATH}
+FRS="/var/www/${SERVER}/${FILES_PATH}"
RELEASE=github.com/xcat2/xcat-core/releases
-YUMDIR=$FRS
+YUMDIR="${FRS}"
YUMREPOURL="http://${SERVER}/${FILES_PATH}/xcat/repos/yum"
if [ "$1" = "-h" ] || [ "$1" = "-help" ] || [ "$1" = "--help" ]; then
@@ -71,8 +74,8 @@ ALLBUILD="perl-xCAT xCAT-client xCAT-server xCAT-test xCAT-buildkit xCAT xCATsn
ZVMBUILD="perl-xCAT xCAT-server xCAT-UI"
ZVMLINK="xCAT-client xCAT xCATsn"
# xCAT and xCATsn have PCM specific configuration - conserver-xcat, syslinux-xcat
-# xCAT-server has PCM specific configuration - RESTAPI(perl-JSON)
-# xCAT-client has PCM specific configuration - getxcatdocs(perl-JSON)
+# xCAT-server has PCM specific configuration - RESTAPI(perl-JSON)
+# xCAT-client has PCM specific configuration - getxcatdocs(perl-JSON)
PCMBUILD="xCAT xCAT-server xCAT-client xCATsn"
PCMLINK="perl-xCAT xCAT-buildkit xCAT-genesis-scripts-x86_64 xCAT-genesis-scripts-ppc64 xCAT-vlan xCAT-probe"
# Note: for FSM, the FlexCAT rpm is built separately from gsa/git
@@ -103,7 +106,7 @@ OSNAME=$(uname)
if [ "$OSNAME" != "AIX" ]; then
GSA=http://pokgsa.ibm.com/projects/x/xcat/build/linux
-
+
if [ "$(id -u)" == "0" ]; then
# Get a lock, so can not do 2 builds at once
exec 8>/var/lock/xcatbld-$REL.lock
@@ -186,10 +189,36 @@ function setversionvars {
BUILD_TIME=`date`
BUILD_MACHINE=`hostname`
COMMIT_ID=`git rev-parse --short HEAD`
+ XCAT_RELEASE="snap$(date '+%Y%m%d%H%M')"
+ echo "$XCAT_RELEASE" >Release
}
+RELEASE_FILE="${SCRIPTPATH}/Release"
+RELEASE_FILE_SAVE="${RELEASE_FILE}.save.998"
-if [ "$PROMOTE" != 1 ]; then # very long if statement to not do builds if we are promoting
+function internal_backup()
+{
+ # Create a backup for file `Release'
+ if [ ! -f "${RELEASE_FILE_SAVE}" ]
+ then
+ mv "${RELEASE_FILE}" "${RELEASE_FILE_SAVE}"
+ cp "${RELEASE_FILE_SAVE}" "${RELEASE_FILE}"
+ fi
+}
+
+function internal_cleanup()
+{
+ # Restore file `Release'
+ if [ -f "${RELEASE_FILE_SAVE}" ]
+ then
+ mv "${RELEASE_FILE_SAVE}" "${RELEASE_FILE}"
+ fi
+}
+
+internal_backup
+trap internal_cleanup 0
+
+if [ "$PROMOTE" != 1 ]; then # very long if statement to not do builds if we are promoting ### @LINE460 ###
# we are doing a snap build
CORE="core-snap"
if [ "$OSNAME" = "AIX" ]; then
@@ -214,33 +243,27 @@ else
echo "Error: Could not determine rpmbuild's root directory."
exit 2
fi
- #echo "source=$source"
fi
-#
-# If no pre-defined update file is provided, do a "git pull" to try and detect
+#
+# If no pre-defined update file is provided, do a "git pull" to try and detect
# if anything has changed in the source directories
-#
+#
SOMETHINGCHANGED=0
if [ "$GIT" = "1" ]; then
- #
- # To enable local sandbox build, GITPULL is disabled by default.
+ #
+ # To enable local sandbox build, GITPULL is disabled by default.
#
if [ "$GITPULL" = "1" ] || [ ${PWD} == *"autobuild"* ]; then
- # TODO: This is really not necessary since the autobuild scripts
- # are building the xcat code in a new directory each time
+ # Do some checking for modified files
MODIFIED_FILES=`git ls-files --modified | tr '\n' ', '`
if [ $MODIFIED_FILES ]; then
- echo "The following files have been modified in the local repository: $MODIFIED_FILES..."
- echo "Not a clean build, aborting..."
- exit 3
+ echo "WARNING: The following files have been modified in the local repository: $MODIFIED_FILES..."
fi
- # check if there's any modifications to git current repo
+ # Do some checking for untracked files
UNTRACKED_FILES=`git ls-files --others | tr '\n' ', '`
if [ -n "$UNTRACKED_FILES" ]; then
- echo "The following files are not tracked in git: $UNTRACKED_FILES..."
- echo "Not a clean build, aborting..."
- exit 3
+ echo "WARNING: The following files are not tracked in git: $UNTRACKED_FILES..."
fi
if [ -z "$GITUP" ]; then
if [ ! -z "$COMMITID" ]; then
@@ -339,7 +362,7 @@ if [ "$OSNAME" != "AIX" ]; then
fi
# Build the xCAT and xCATsn rpms for all platforms
-for rpmname in xCAT xCATsn; do
+for rpmname in xCAT xCATsn; do
if [[ " $EMBEDBUILD " != *\ $rpmname\ * ]]; then continue; fi
if [ $SOMETHINGCHANGED == 1 -o "$BUILDALL" == 1 ]; then # used to be: if $GREP -E "^[UAD] +$rpmname/" $GITUP; then
UPLOAD=1
@@ -402,48 +425,49 @@ fi
# Prepare the RPMs for pkging and upload
WGET_CMD="wget"
-if [ ! -z ${LOG} ]; then
+if [ ! -z ${LOG} ]; then
WGET_CMD="wget -o ${LOG}"
fi
# get gpg keys in place
if [ "$OSNAME" != "AIX" ]; then
if [ -z "$RPMSIGN" -o "$RPMSIGN" == "1" ]; then
- mkdir -p $HOME/.gnupg
- for i in pubring.gpg secring.gpg trustdb.gpg; do
- if [ ! -f $HOME/.gnupg/$i ] || [ `wc -c $HOME/.gnupg/$i|cut -f 1 -d' '` == 0 ]; then
- rm -f $HOME/.gnupg/$i
- ${WGET_CMD} -P $HOME/.gnupg $GSA/keys/$i
- chmod 600 $HOME/.gnupg/$i
+ mkdir -p $HOME/.gnupg
+ for i in pubring.gpg secring.gpg trustdb.gpg; do
+ if [ ! -f $HOME/.gnupg/$i ] ||
+ [ `wc -c $HOME/.gnupg/$i|cut -f 1 -d' '` == 0 ]; then
+ rm -f $HOME/.gnupg/$i
+ ${WGET_CMD} -P $HOME/.gnupg $GSA/keys/$i
+ chmod 600 $HOME/.gnupg/$i
+ fi
+ done
+ # tell rpm to use gpg to sign
+ MACROS=$HOME/.rpmmacros
+ if ! $GREP '%_signature gpg' $MACROS 2>/dev/null; then
+ echo '%_signature gpg' >> $MACROS
fi
- done
- # tell rpm to use gpg to sign
- MACROS=$HOME/.rpmmacros
- if ! $GREP '%_signature gpg' $MACROS 2>/dev/null; then
- echo '%_signature gpg' >> $MACROS
+ if ! $GREP '%_gpg_name' $MACROS 2>/dev/null; then
+ echo '%_gpg_name xCAT Security Key' >> $MACROS
+ fi
+ echo "Signing RPMs..."
+ build-utils/rpmsign.exp `find $DESTDIR -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
+ build-utils/rpmsign.exp $SRCDIR/*rpm | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
+ createrepo --checksum sha $DESTDIR # specifying checksum so the repo will work on rhel5
+ createrepo --checksum sha $SRCDIR
+ rm -f $SRCDIR/repodata/repomd.xml.asc
+ rm -f $DESTDIR/repodata/repomd.xml.asc
+ gpg -a --detach-sign $DESTDIR/repodata/repomd.xml
+ gpg -a --detach-sign $SRCDIR/repodata/repomd.xml
+ if [ ! -f $DESTDIR/repodata/repomd.xml.key ]; then
+ ${WGET_CMD} -q -P $DESTDIR/repodata $GSA/keys/repomd.xml.key
+ fi
+ if [ ! -f $SRCDIR/repodata/repomd.xml.key ]; then
+ ${WGET_CMD} -P $SRCDIR/repodata $GSA/keys/repomd.xml.key
+ fi
+ else
+ createrepo --checksum sha $DESTDIR
+ createrepo --checksum sha $SRCDIR
fi
- if ! $GREP '%_gpg_name' $MACROS 2>/dev/null; then
- echo '%_gpg_name xCAT Security Key' >> $MACROS
- fi
- echo "Signing RPMs..."
- build-utils/rpmsign.exp `find $DESTDIR -type f -name '*.rpm'` | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
- build-utils/rpmsign.exp $SRCDIR/*rpm | grep -v -E '(already contains identical signature|was already signed|rpm --quiet --resign|WARNING: standard input reopened)'
- createrepo --checksum sha $DESTDIR # specifying checksum so the repo will work on rhel5
- createrepo --checksum sha $SRCDIR
- rm -f $SRCDIR/repodata/repomd.xml.asc
- rm -f $DESTDIR/repodata/repomd.xml.asc
- gpg -a --detach-sign $DESTDIR/repodata/repomd.xml
- gpg -a --detach-sign $SRCDIR/repodata/repomd.xml
- if [ ! -f $DESTDIR/repodata/repomd.xml.key ]; then
- ${WGET_CMD} -q -P $DESTDIR/repodata $GSA/keys/repomd.xml.key
- fi
- if [ ! -f $SRCDIR/repodata/repomd.xml.key ]; then
- ${WGET_CMD} -P $SRCDIR/repodata $GSA/keys/repomd.xml.key
- fi
- else
- createrepo --checksum sha $DESTDIR
- createrepo --checksum sha $SRCDIR
- fi
fi
# set group and permissions correctly on the built rpms
@@ -455,7 +479,7 @@ chmod -R g+w $DESTDIR
chgrp -R $SYSGRP $SRCDIR
chmod -R g+w $SRCDIR
-else # end of very long if-not-promote
+else # end of very long if-not-promote ### @LINE193 ###
# we are only promoting (not building)
setversionvars
setbranch
@@ -490,7 +514,7 @@ EOF
#!/bin/sh
cd `dirname $0`
REPOFILE=`basename xCAT-*.repo`
-if [[ $REPOFILE == "xCAT-*.repo" ]]; then
+if [[ $REPOFILE == "xCAT-*.repo" ]]; then
echo "ERROR: For xcat-dep, please execute $0 in the correct / subdirectory"
exit 1
fi
@@ -498,10 +522,10 @@ fi
# default to RHEL yum, if doesn't exist try Zypper
#
DIRECTORY="/etc/yum.repos.d"
-if [[ ! -d ${DIRECTORY} ]]; then
- DIRECTORY="/etc/zypp/repos.d"
+if [ ! -d "$DIRECTORY" ]; then
+ DIRECTORY="/etc/zypp/repos.d"
fi
-sed -e 's|baseurl=.*|baseurl=file://'"`pwd`"'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'"`pwd`"'/repodata/repomd.xml.key|' > ${DIRECTORY}/$REPOFILE
+sed -e 's|baseurl=.*|baseurl=file://'"`pwd`"'|' $REPOFILE | sed -e 's|gpgkey=.*|gpgkey=file://'"`pwd`"'/repodata/repomd.xml.key|' > "$DIRECTORY/$REPOFILE"
cd -
EOF2
chmod 775 mklocalrepo.sh
@@ -521,6 +545,7 @@ fi
#
BUILDINFO=$XCATCORE/buildinfo
echo "VERSION=$VER" > $BUILDINFO
+echo "RELEASE=$XCAT_RELEASE" >> $BUILDINFO
echo "BUILD_TIME=$BUILD_TIME" >> $BUILDINFO
echo "BUILD_MACHINE=$BUILD_MACHINE" >> $BUILDINFO
echo "COMMIT_ID=$COMMIT_ID" >> $BUILDINFO
@@ -545,7 +570,7 @@ if [ -n "$UP" ] && [ "$UP" == 0 ]; then
fi
#else we will continue
-# Upload the individual RPMs to xcat.org
+# Upload the individual RPMs to xcat.org
if [ "$OSNAME" = "AIX" ]; then
YUM=aix
else
@@ -561,13 +586,13 @@ if [ "$REL" = "devel" -o "$PREGA" != 1 ]; then
do : ; done
fi
-# Upload the individual source RPMs to xcat.org
+# Upload the individual source RPMs to xcat.org
i=0
echo "Uploading src RPMs from $SRCD to $YUMDIR/$YUM/$REL$EMBEDDIR/ ..."
while [ $((i+=1)) -le 5 ] && ! rsync -urLv --delete $SRCD $USER@$SERVER:$YUMDIR/$YUM/$REL$EMBEDDIR/
do : ; done
-# Upload the tarball to xcat.org
+# Upload the tarball to xcat.org
if [ "$PROMOTE" = 1 -a "$REL" != "devel" -a "$PREGA" != 1 ]; then
# upload tarball to FRS area
i=0
diff --git a/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst
index fda96e1ad..72282f3fb 100644
--- a/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst
+++ b/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst
@@ -52,7 +52,7 @@ Change the Management Hostname
hostname
-* Edit hostname configuration file
+* Update the hostname configuration files:
| Add hostname in ``/etc/hostname``
| Add HOSTNAME attribute in ``/etc/sysconfig/network`` (only for [RHEL])
@@ -60,29 +60,29 @@ Change the Management Hostname
Update Database Files
---------------------
-You need to update the new MN hostname or IP address in several database
-configuration files.
+You need to update the new MN hostname or IP address in several database configuration files.
SQLite
^^^^^^
Nothing to do.
-Postgresql
+PostgreSQL
^^^^^^^^^^
-- Edit ``/etc/xcat/cfgloc`` file, replace ``Pg:dbname=xcatdb;host=|xcatadm|xcat20``
- with ``Pg:dbname=xcatdb;host=|xcatadm|xcat20``.
+- Edit ``/etc/xcat/cfgloc`` file...
-- Edit config database config file ``/var/lib/pgsql/data/pg_hba.conf``,
- replace ``host all all /32 md5``
- with ``host all all /32 md5``.
+ Replace ``Pg:dbname=xcatdb;host=|xcatadm|xcat20`` with ``Pg:dbname=xcatdb;host=|xcatadm|xcat20``.
-Mysql
+- Edit config database config file ``/var/lib/pgsql/data/pg_hba.conf``...
+
+ Replace ``host all all /32 md5`` with ``host all all /32 md5``
+
+MySQL
^^^^^
-Edit ``/etc/xcat/cfglooc``, replace ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20``
-with ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20``.
+- Edit ``/etc/xcat/cfglooc``...
+ Replace ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20`` with ``mysql:dbname=xcatdb;host=|xcatadmin|xcat20``
Start the database
------------------
@@ -116,12 +116,12 @@ Change the site table master attribute
Change all IP address attribute relevant to the MN IP address
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-For example, old address was "10.6.0.1"
+For example, the old IP address was "10.6.0.1"
-* Query the attributes with old address ::
+* Query all the attributes with old address ::
lsdef -t node -l | grep "10.6.0.1"
- # the output may looks like
+ ...
conserver=10.6.0.1
conserver=10.6.0.1
conserver=10.6.0.1
@@ -138,26 +138,23 @@ For example, old address was "10.6.0.1"
servicenode=10.6.0.1
xcatmaster=10.6.0.1
-* As the attribute with the old IP address is list above, take conserver as
- a example, query the nodes with ``conserver=10.6.0.1``.
-
- ::
+* Looking at the list above, taking ``conserver`` as an example, query the nodes with ``conserver=10.6.0.1``: ::
lsdef -t node -w conserver="10.6.0.1"
- # the output looks like
+ ...
cn1 (node)
cn2 (node)
cn3 (node)
cn4 (node)
-* Change the conserver address for cn1,cn2,cn3,cn4 ::
+* Change the conserver address for nodes ``cn1,cn2,cn3,cn4`` ::
chdef -t node cn1-cn4 conserver=
-Repeat the same process for the other attributes.
+* Repeat the same process for the other attributes containing the old IP address.
Change networks table
-^^^^^^^^^^^^^^^^^^^^^^
+^^^^^^^^^^^^^^^^^^^^^
Check your networks table to see if the network definitions are still correct,
if not edit accordingly ::
@@ -166,7 +163,7 @@ if not edit accordingly ::
chdef -t network
Check Result
-^^^^^^^^^^^^^
+^^^^^^^^^^^^
You can check whether all the old address has been changed using ::
@@ -174,25 +171,24 @@ You can check whether all the old address has been changed using ::
cd
fgrep "10.6.0.1" *.csv
-If the old address still exists in the ``*.csv` file, you can edit this file,
-then use the following command to restore the records ::
+If the old address still exists in the ``*.csv`` file, you can edit this file, then use the following command to restore the records ::
tabrestore
Generate SSL credentials(optional)
----------------------------------
-If you do not generate new credentials, skip this section.
-If you decide generate new credentials, then you will use the following
-command.
+Use the following command to generate new SSL credentials: ``xcatconfig -c``.
-* Generate new credentials ::
+Then update the following in xCAT:
- xcatconfig -c
+* Update the policy table with new management node name and replace: ::
-* Update the policy table with new MN name,
- replace ``"1.4","old_MN_name",,,,,,"trusted",,`` with
- ``"1.4","new_MN_name",,,,,,"trusted",,``
+ "1.4","old_MN_name",,,,,,"trusted",,
+
+ with: ::
+
+ "1.4","new_MN_name",,,,,,"trusted",,``
* Setup up conserver with new credentials ::
diff --git a/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst
index e99134962..f971eb7ba 100644
--- a/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst
+++ b/docs/source/advanced/cluster_maintenance/service_node/changing_hostname_ip.rst
@@ -36,11 +36,7 @@ Database Connection Changes
Granting or revoking access privilege in the database for the service node.
-* For mysql, refer to :ref:`grante_revoke_mysql_access_label`.
-.. There is no procedure in old document on sourceforge for postgress to
- grant or revoke the access privilege for service node.
-
-* For postgress, refer to `TODO `_.
+* For MySQL, refer to :ref:`grante_revoke_mysql_access_label`.
Update Provision Environment on Service Node
--------------------------------------------
diff --git a/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst b/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst
index d8745b6ee..984bf79fe 100644
--- a/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst
+++ b/docs/source/advanced/domain_name_resolution/domain_name_resolution.rst
@@ -459,19 +459,6 @@ You can either specify the base nic* attribute name or the expanded name for a s
nicips.eth1=11.1.89.7
nichostnamesuffixes.eth1=-lab
-"otherinterfaces" vs. nic* attributes
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-For now the "otherinterfaces" attribute will still be supported but it may be dropped in future releases.Any new network interface information should be provided using the new nic attributes.
-
-If you are currently using the "otherinterfaces" node attribute you do not have to move it to the nic* attributes at this time. However, be careful to avoid any overlap or conflict with the information provided for each.
-
-If you are using "otherinterfaces" and add additional interfaces using the nic* attributes the makehosts command will add both to the /etc/hosts table.
-
-When both the "otherinterfaces" and nic attributes are used the "otherinterfaces" attribute is processed before the nic attributes.
-
-To do more nic introduce (refer to :ref:`confignics_label` ).
-
Setting addition interface information using the xCAT tabedit command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst b/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst
index 5a80aade9..6a3e1b98a 100644
--- a/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst
+++ b/docs/source/advanced/hamn/setup_ha_mgmt_node_with_shared_data.rst
@@ -56,7 +56,7 @@ The configuration procedure will be quite different based on the shared data mec
/
-``Note``:For mysql, the database directory is ``/var/lib/mysql``; for postgresql, the database directory is ``/var/lib/pgsql``; for DB2, the database directory is specified with the site attribute databaseloc; for sqlite, the database directory is /etc/xcat, already listed above.
+``Note``:For MySQL, the database directory is ``/var/lib/mysql``; for PostGreSQL, the database directory is ``/var/lib/pgsql``; for DB2, the database directory is specified with the site attribute databaseloc; for sqlite, the database directory is /etc/xcat, already listed above.
Here is an example of how to make directories be shared data through NFS: ::
@@ -125,7 +125,7 @@ Setup xCAT on the Primary Management Node
service dhcpd stop
chkconfig --level 2345 dhcpd off
-#. Stop Database and prevent the database from auto starting at boot time, use mysql as an example: ::
+#. Stop Database and prevent the database from auto starting at boot time, use MySQL as an example: ::
service mysqld stop
chkconfig mysqld off
@@ -180,7 +180,7 @@ Setup xCAT on the Standby Management Node
service dhcpd stop
chkconfig --level 2345 dhcpd off
-#. Stop Database and prevent the database from auto starting at boot time. Use mysql as an example: ::
+#. Stop Database and prevent the database from auto starting at boot time. Use MySQL as an example: ::
service mysqld stop
chkconfig mysqld off
@@ -303,7 +303,7 @@ If the management node is still available and running the cluster, perform the f
#. Stop database
- Use mysql as an example: ::
+ Use MySQL as an example: ::
service mysqld stop
@@ -346,7 +346,7 @@ On the new primary management node:
mount /.xcat
mount /db2database
-#. Start database, use mysql as an example: ::
+#. Start database, use MySQL as an example: ::
service mysql start
diff --git a/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst b/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst
index ca259ecb3..d30fc59db 100644
--- a/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst
+++ b/docs/source/advanced/hierarchy/appendix/appendix_b_diagnostics.rst
@@ -1,66 +1,18 @@
Appendix B: Diagnostics
=======================
-* **root ssh keys not setup** -- If you are prompted for a password when ssh to
- the service node, then check to see if /root/.ssh has authorized_keys. If
- the directory does not exist or no keys, on the MN, run xdsh service -K,
- to exchange the ssh keys for root. You will be prompted for the root
- password, which should be the password you set for the key=system in the
- passwd table.
-* **XCAT rpms not on SN** --On the SN, run rpm -qa | grep xCAT and make sure
- the appropriate xCAT rpms are installed on the servicenode. See the list of
- xCAT rpms in :ref:`setup_service_node_stateful_label`. If rpms
- missing check your install setup as outlined in Build the Service Node
- Stateless Image for diskless or :ref:`setup_service_node_stateful_label` for
- diskful installs.
-* **otherpkgs(including xCAT rpms) installation failed on the SN** --The OS
- repository is not created on the SN. When the "yum" command is processing
- the dependency, the rpm packages (including expect, nmap, and httpd, etc)
- required by xCATsn can't be found. In this case, check whether the
- ``/install/postscripts/repos///`` directory exists on the MN.
- If it is not on the MN, you need to re-run the "copycds" command, and there
- will be some file created under the
- ``/install/postscripts/repos//`` directory on the MN. Then, you
- need to re-install the SN, and this issue should be gone.
-* **Error finding the database/starting xcatd** -- If on the Service node when
- you run tabdump site, you get "Connection failure: IO::Socket::SSL:
- connect: Connection refused at ``/opt/xcat/lib/perl/xCAT/Client.pm``". Then
- restart the xcatd daemon and see if it passes by running the command:
- service xcatd restart. If it fails with the same error, then check to see
- if ``/etc/xcat/cfgloc`` file exists. It should exist and be the same as
- ``/etc/xcat/cfgloc`` on the MN. If it is not there, copy it from the MN to
- the SN. The run service xcatd restart. This indicates the servicenode
- postscripts did not complete successfully. Check to see your postscripts
- table was setup correctly in :ref:`add_service_node_postscripts_label` to the
- postscripts table.
-* **Error accessing database/starting xcatd credential failure**-- If you run
- tabdump site on the servicenode and you get "Connection failure:
- IO::Socket::SSL: SSL connect attempt failed because of handshake
- problemserror:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown ca
- at ``/opt/xcat/lib/perl/xCAT/Client.pm``", check ``/etc/xcat/cert``. The
- directory should contain the files ca.pem and server-cred.pem. These were
- suppose to transfer from the MN ``/etc/xcat/cert`` directory during the
- install. Also check the ``/etc/xcat/ca`` directory. This directory should
- contain most files from the ``/etc/xcat/ca`` directory on the MN. You can
- manually copy them from the MN to the SN, recursively. This indicates the
- the servicenode postscripts did not complete successfully. Check to see
- your postscripts table was setup correctly in
- :ref:`add_service_node_postscripts_label` to the postscripts table. Again
- service xcatd restart and try the tabdump site again.
-* **Missing ssh hostkeys** -- Check to see if ``/etc/xcat/hostkeys`` on the SN,
- has the same files as ``/etc/xcat/hostkeys`` on the MN. These are the ssh
- keys that will be installed on the compute nodes, so root can ssh between
- compute nodes without password prompting. If they are not there copy them
- from the MN to the SN. Again, these should have been setup by the
- servicenode postscripts.
+* **root ssh keys not setup** -- If you are prompted for a password when ssh to the service node, then check to see if ``/root/.ssh`` directory on MN has ``authorized_keys`` file. If the directory does not exist or no keys, run ``xdsh service -K``, to exchange the ssh keys for root. You will be prompted for the root password, which should be the password you set for the ``key=system`` in the passwd table.
-* **Errors running hierarchical commands such as xdsh** -- xCAT has a number of
- commands that run hierarchically. That is, the commands are sent from xcatd
- on the management node to the correct service node xcatd, which in turn
- processes the command and sends the results back to xcatd on the management
- node. If a hierarchical command such as xcatd fails with something like
- "Error: Permission denied for request", check ``/var/log/messages`` on the
- management node for errors. One error might be "Request matched no policy
- rule". This may mean you will need to add policy table entries for your
- xCAT management node and service node:
+* **XCAT rpms not on SN** -- On the SN, run ``rpm -qa | grep xCAT`` and make sure the appropriate xCAT rpms are installed on the servicenode. See the list of xCAT rpms in :ref:`setup_service_node_stateful_label`. If rpms are missing, check your install setup as outlined in :ref:`setup_service_node_stateless_label` for diskless or :ref:`setup_service_node_stateful_label` for diskful installs.
+* **otherpkgs(including xCAT rpms) installation failed on the SN** -- The OS repository is not created on the SN. When the "yum" command is processing the dependency, the rpm packages (including expect, nmap, and httpd, etc) required by xCATsn can't be found. In this case, check whether the ``/install/postscripts/repos///`` directory exists on the MN. If it is not on the MN, you need to re-run the ``copycds`` command, and there will be files created under the ``/install/postscripts/repos//`` directory on the MN. Then, you need to re-install the SN.
+
+* **Error finding the database/starting xcatd** -- If on the Service node when you run tabdump site, you get "Connection failure: IO::Socket::SSL: connect: Connection refused at ``/opt/xcat/lib/perl/xCAT/Client.pm``". Then restart the xcatd daemon and see if it passes by running the command ``service xcatd restart``. If it fails with the same error, then check to see if ``/etc/xcat/cfgloc`` file exists. It should exist and be the same as ``/etc/xcat/cfgloc`` on the MN. If it is not there, copy it from the MN to the SN. The run ``service xcatd restart``. This indicates the servicenode postscripts did not complete successfully. Run ``lsdef -i postscripts -c`` and verify ``servicenode`` postscript appears on the list..
+
+* **Error accessing database/starting xcatd credential failure**-- If you run ``tabdump site`` on the service node and get "Connection failure: IO::Socket::SSL: SSL connect attempt failed because of handshake problemserror:14094418:SSL routines:SSL3_READ_BYTES:tlsv1 alert unknown at ``/opt/xcat/lib/perl/xCAT/Client.pm``", check ``/etc/xcat/cert``. The directory should contain the files ``ca.pem`` and ``server-cred.pem``. These were suppose to transfer from the MN ``/etc/xcat/cert`` directory during the install. Also check the ``/etc/xcat/ca`` directory. This directory should contain most files from the ``/etc/xcat/ca`` directory on the MN. You can manually copy them from the MN to the SN, recursively. This indicates the the servicenode postscripts did not complete successfully. Run ``lsdef -i postscripts -c`` and verify ``servicenode`` postscript appears on the list. Run ``service xcatd restart`` again and try the tabdump site again.
+
+* **Missing ssh hostkeys** -- Check to see if ``/etc/xcat/hostkeys`` on the SN, has the same files as ``/etc/xcat/hostkeys`` on the MN. These are the ssh keys that will be installed on the compute nodes, so root can ssh between compute nodes without password prompting. If they are not there copy them from the MN to the SN. Again, these should have been setup by the servicenode postscripts.
+
+* **Errors running hierarchical commands such as xdsh** -- xCAT has a number of commands that run hierarchically. That is, the commands are sent from xcatd on the management node to the correct service node xcatd, which in turn processes the command and sends the results back to xcatd on the management node. If a hierarchical command such as xcatd fails with something like "Error: Permission denied for request", check ``/var/log/messages`` on the management node for errors. One error might be "Request matched no policy rule". This may mean you will need to add policy table entries for your xCAT management node and service node.
+
+* **/install is not mounted on service node from managemen mode** -- If service node does not have ``/install`` directory mounted from management node, run ``lsdef -t site clustersite -i installloc`` and verify ``installloc="/install"``
diff --git a/docs/source/advanced/hierarchy/define_service_nodes.rst b/docs/source/advanced/hierarchy/define_service_nodes.rst
index e031b56c9..aa9b64171 100644
--- a/docs/source/advanced/hierarchy/define_service_nodes.rst
+++ b/docs/source/advanced/hierarchy/define_service_nodes.rst
@@ -53,7 +53,7 @@ The following table illustrates the cluster being used in this example:
setupconserver=1
**Tips/Hint**
- * Even if you do not want xCAT to configure any services, you must define the service nodes in the ``servicenode`` table with at least one attribute, set to 0, otherwise xCAT will not recognize the node as a service node**
+ * Even if you do not want xCAT to configure any services, you must define the service nodes in the ``servicenode`` table with at least one attribute, set to 0, otherwise xCAT will not recognize the node as a service node
* See the ``setup*`` attributes in the node definition man page for the list of available services: ``man node``
* For clusters with subnetted management networks, you might want to set ``setupupforward=1``
@@ -82,4 +82,20 @@ The following table illustrates the cluster being used in this example:
chdef -t group -o rack1 conserver=r1n01 monserver=r1n01
chdef -t group -o rack2 conserver=r2n01 monserver=r2n01
+#. Choose location of ``/install`` and ``/tftpboot`` directories (optional).
+ The ``site`` table attributes ``installloc`` and ``sharedtftp`` control mounting of ``/install`` and ``/tftpboot`` directories from Management Node to Service node.
+
+ To mount ``/install`` and ``/tftpboot`` directories from Management node to each Service Node: ::
+
+ chdef -t site clustersite sharedtftp=1
+ chdef -t site clustersite installloc="/install"
+
+ To make ``/install`` and ``/tftpboot`` directories local on each Service Node, set ``site`` table attributes and "sync" ``/install`` and ``/tftpoot`` directory contents from Management Node to Service Nodes: ::
+
+ chdef -t site clustersite sharedtftp=0
+ chdef -t site clustersite installloc=
+ rsync -auv --exclude 'autoinst' /install r1n01:/
+ rsync -auv --exclude 'autoinst' /install r2n01:/
+ rsync -auv --exclude 'autoinst' /tftpboot r1n01:/
+ rsync -auv --exclude 'autoinst' /tftpboot r2n01:/
diff --git a/docs/source/advanced/hierarchy/provision/diskful_sn.rst b/docs/source/advanced/hierarchy/provision/diskful_sn.rst
index 20813fd38..972a81712 100644
--- a/docs/source/advanced/hierarchy/provision/diskful_sn.rst
+++ b/docs/source/advanced/hierarchy/provision/diskful_sn.rst
@@ -6,33 +6,51 @@ Diskful (Stateful) Installation
Any cluster using statelite compute nodes must use a stateful (diskful) Service Nodes.
-**Note: All xCAT Service Nodes must be at the exact same xCAT version as the xCAT Management Node**. Copy the files to the Management Node (MN) and untar them in the appropriate sub-directory of ``/install/post/otherpkgs``
+**Note:** All xCAT Service Nodes must be at the exact same xCAT version as the xCAT Management Node.
-**Note for the appropriate directory below, check the ``otherpkgdir=/install/post/otherpkgs/rhels7/x86_64`` attribute of the osimage defined for the servicenode.**
-
-For example, for osimage rhels7-x86_64-install-service ::
+Configure ``otherpkgdir`` and ``otherpkglist`` for service node osimage
+-----------------------------------------------------------------------
- mkdir -p /install/post/otherpkgs/**rhels7**/x86_64/xcat
- cd /install/post/otherpkgs/**rhels7**/x86_64/xcat
+ * Create a subdirectory ``xcat`` under a path specified by ``otherpkgdir`` attribute of the service node os image, selected during the :doc:`../define_service_nodes` step.
+
+ For example, for osimage *rhels7-x86_64-install-service* ::
+
+ [root@fs4 xcat]# lsdef -t osimage rhels7-x86_64-install-service -i otherpkgdir
+ Object name: rhels7-x86_64-install-service
+ otherpkgdir=/install/post/otherpkgs/rhels7/x86_64
+ [root@fs4 xcat]# mkdir -p /install/post/otherpkgs/rhels7/x86_64/xcat
+
+ * Download or copy `xcat-core` and `xcat-dep` .bz2 files into that `xcat` directory ::
+
+ wget https://xcat.org/files/xcat/xcat-core/_Linux/xcat-core/xcat-core--linux.tar.bz2
+ wget https://xcat.org/files/xcat/xcat-dep/_Linux/xcat-dep--linux.tar.bz2
+
+ * untar the `xcat-core` and `xcat-dep` .bz2 files ::
+
+ cd /install/post/otherpkgs///xcat
tar jxvf core-rpms-snap.tar.bz2
tar jxvf xcat-dep-*.tar.bz2
-Next, add rpm names into your own version of service...otherpkgs.pkglist file. In most cases, you can find an initial copy of this file under ``/opt/xcat/share/xcat/install/`` . Or copy one from another similar platform. ::
+ * Verify the following entries are included in the package file specified by the ``otherpkglist`` attribute of the service node osimage. ::
- mkdir -p /install/custom/install/rh
- cp /opt/xcat/share/xcat/install/rh/service.rhels7.x86_64.otherpkgs.pkglist \
- /install/custom/install/rh
- vi /install/custom/install/rh/service.rhels7.x86_64.otherpkgs.pkglist
+ xcat/xcat-dep///xCATsn
+ xcat/xcat-dep///conserver-xcat
+ xcat/xcat-dep///perl-Net-Telnet
+ xcat/xcat-dep///perl-Expect
-Make sure the following entries are included in the
-/install/custom/install/rh/service.rhels7.x86_64.otherpkgs.pkglist: ::
+ For example, for the osimage *rhels7-x86_64-install-service* ::
- xCATsn
- conserver-xcat
- perl-Net-Telnet
- perl-Expect
+ [root@fs4 ~]# lsdef -t osimage rhels7-x86_64-install-service -i otherpkglist
+ Object name: rhels7-x86_64-install-service
+ otherpkglist=/opt/xcat/share/xcat/install/rh/service.rhels7.x86_64.otherpkgs.pkglist
+ [root@fs4 ~]# cat /opt/xcat/share/xcat/install/rh/service.rhels7.x86_64.otherpkgs.pkglist
+ xcat/xcat-core/xCATsn
+ xcat/xcat-dep/rh7/x86_64/conserver-xcat
+ xcat/xcat-dep/rh7/x86_64/perl-Net-Telnet
+ xcat/xcat-dep/rh7/x86_64/perl-Expect
+ [root@fs4 ~]#
-**Note: you will be installing the xCAT Service Node rpm xCATsn meta-package on the Service Node, not the xCAT Management Node meta-package. Do not install both.**
+**Note:** you will be installing the xCAT Service Node rpm xCATsn meta-package on the Service Node, not the xCAT Management Node meta-package. Do not install both.
Update the rhels6 RPM repository (rhels6 only)
----------------------------------------------
@@ -69,26 +87,18 @@ Update the rhels6 RPM repository (rhels6 only)
createrepo \
-g repodata /98462d05248098ef1724eddb2c0a127954aade64d4bb7d4e693cff32ab1e463c-comps-rhel6-Server.xml
-**Note:** you should use comps-rhel6-Server.xml with its key as the group file.
+**Note:** you should use ``comps-rhel6-Server.xml`` with its key as the group file.
-Set the node status to ready for installation
----------------------------------------------
-
-Run nodeset to the osimage name defined in the provmethod attribute on your Service Node. ::
-
- nodeset service osimage=""
-
-For example ::
-
- nodeset osimage="rhels7-x86_64-install-service"
-
-Initialize network boot to install Service Nodes
-------------------------------------------------
+Install Service Nodes
+---------------------
::
- rsetboot net
- rpower boot
+ rinstall osimage=""
+
+For example ::
+
+ rinstall osimage="rhels7-x86_64-install-service"
Monitor the Installation
------------------------
diff --git a/docs/source/advanced/hierarchy/provision/diskless_sn.rst b/docs/source/advanced/hierarchy/provision/diskless_sn.rst
index 4f521aa48..717d3ee18 100644
--- a/docs/source/advanced/hierarchy/provision/diskless_sn.rst
+++ b/docs/source/advanced/hierarchy/provision/diskless_sn.rst
@@ -1,3 +1,5 @@
+.. _setup_service_node_stateless_label:
+
Diskless (Stateless) Installation
=================================
diff --git a/docs/source/advanced/hierarchy/provision/verify_sn.rst b/docs/source/advanced/hierarchy/provision/verify_sn.rst
index 0b111fab2..3c6210ef1 100644
--- a/docs/source/advanced/hierarchy/provision/verify_sn.rst
+++ b/docs/source/advanced/hierarchy/provision/verify_sn.rst
@@ -2,10 +2,10 @@ Verify Service Node Installation
================================
* ssh to the service nodes. You should not be prompted for a password.
-* Check to see that the xcat daemon xcatd is running.
-* Run some database command on the service node, e.g tabdump site, or nodels,
- and see that the database can be accessed from the service node.
-* Check that ``/install`` and ``/tftpboot`` are mounted on the service node
- from the Management Node, if appropriate.
-* Make sure that the Service Node has Name resolution for all nodes, it will
- service.
+* Check to see that the xcat daemon ``xcatd`` is running.
+* Run some database command on the service node, e.g ``tabdump site``, or ``nodels``, and see that the database can be accessed from the service node.
+* Check that ``/install`` and ``/tftpboot`` are mounted on the service node from the Management Node, if appropriate.
+* Make sure that the Service Node has name resolution for all nodes it will service.
+* Run ``updatenode -V -s`` on management node and verify output contains ``Running command on `` that indicates the command from management node is sent to service node to run against compute node target.
+
+See :doc:`Appendix B <../appendix/appendix_b_diagnostics>` for possible solutions.
diff --git a/docs/source/advanced/index.rst b/docs/source/advanced/index.rst
index 7193f3b71..3a78e0ac9 100755
--- a/docs/source/advanced/index.rst
+++ b/docs/source/advanced/index.rst
@@ -15,6 +15,7 @@ Advanced Topics
kit/index.rst
mixed_cluster/index.rst
networks/index.rst
+ pdu/index.rst
ports/xcat_ports.rst
probe/index.rst
raid/index.rst
diff --git a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst b/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst
deleted file mode 100644
index db9a3cc11..000000000
--- a/docs/source/advanced/networks/edgecore_switches/edgecore_switches.rst
+++ /dev/null
@@ -1,129 +0,0 @@
-Edgecore Switch
-===============
-
-The Edgecore switch from Mellanox is 1Gb top-of-rack switch. It's coming with ONIE installer. Open Network Install Environment (ONIE)is an open source initiative that defines an open "install environment" for bare metal network switches. For more information, see http://onie.opencompute.org/. Mellanox will ship the switch with Cumulus Network OS and along with a license file installed. In some case, user may get whitebox without OS and licenses. Since edgecore switch has different configuration than other switches that xCAT supports, xCAT handles edgecore switch differently.
-
-
-ONIE Mode
----------
-
-If the switch arrives without an OS pre-loaded, the ONIE installer and management port is the only thing enabled on the switch. Once the switch connects to the xCAT network, the switch should get a dynamic IP address. The xCAT DHCP server will get requests from the onie-installer from the switch and attempt to find an OS binary file to execute. The following messages will be logged in /var/log/messages on the management node. ::
-
- Info: Fetching http://172.1.0.1/onie-installer-arm-accton_as4610_54-r0 ...
- Info: Fetching http://172.1.0.1/onie-installer-arm-accton_as4610_54 ...
- Info: Fetching http://172.1.0.1/onie-installer-accton_as4610_54 ...
- Info: Fetching http://172.1.0.1/onie-installer-arm ...
- Info: Fetching http://172.1.0.1/onie-installer .
-
-
-To remove the installed Cumulus Linux OS to boot back to ONIE mode, connect to the switch via serial-port or ssh and execute the following commands: ::
-
- ssh cumulus@172.1.0.1
- #clean up all the configuration
- sudo onie-select -k
- sudo reboot
- #boot back to onie mode
- sudo onie-select -i
- sudo reboot
-
-
-After switch reboots, it will enter ONIE mode and send DHCP request to attempt to fetch the OS binary file.
-
-
-Discover Edgecore Switch
-------------------------
-
-ONIE supports a number of methods for locating OS binary file. xCAT choose to use a DHCP server to provide specific information to the switch.
-
-* IP address of the switch
-* URL of the OS binary file on the Web server
-
-With the xCAT DHCP configuration, ONIE picks up an IP address and downloads the URL specified by the user and start to install of the OS. The steps take to discover the edgecore switch and process request from ONIE installer as follows:
-
-#. Pre-define switch object into xCAT db, make sure ip adress, netboot and provemethod are set, also define core switch and port number where edgecore switch connect to. ::
-
-
- #lsdef edgecoresw1
- Object name: edgecoresw1
- groups=switch
- ip=192.168.23.1
- mgt=switch
- netboot=onie
- nodetype=switch
- postbootscripts=otherpkgs
- postscripts=syslog,remoteshell,syncfiles
- provmethod=/install/custom/sw/edgecore/cumulus-linux-3.1.0-bcm-armel-1471981017.dc7e2adzfb43f6b.bin
- switch=switch-10-5-23-1
- switchport=1
-
- #makehosts edgecoresw1
-
-
-#. Run ``switchdiscover`` command, it will find edgecore switch and update mac address on pre-defined switch node definition. ::
-
- #switchdiscover --range 192.168.5.170-190 -s nmap
- #lsdef edgecoresw1
- Object name: edgecoresw1
- groups=switch
- ip=192.168.23.1
- mac=8C:EA:1B:12:CA:40
- mgt=switch
- netboot=onie
- nodetype=switch
- postbootscripts=otherpkgs
- postscripts=syslog,remoteshell,syncfiles
- provmethod=/install/custom/sw/edgecore/cumulus-linux-3.1.0-bcm-armel-1471981017.dc7e2adzfb43f6b.bin
- status=Matched
- switch=switch-10-5-23-1
- switchport=1
- switchtype=cumulus
- usercomment=Edgecore switch
-
-
-#. Run ``makedhcp`` after edgecore switch discovered, it will update ``dhcpd.conf`` and response the DHCP request from the onie-installer. ::
-
- #makedhcp -n
- #makedhcp -a edgecoresw1
-
-
-#. Installation of the Cumulus Linux OS takes about 50 minutes. Monitor the /var/log/messages to check the status of the installation. ::
-
-
- Oct 27 15:28:08 fs4 dhcpd: DHCPDISCOVER from 8c:ea:1b:12:ca:40 via enP4p1s0f2
- Oct 27 15:28:08 fs4 dhcpd: DHCPOFFER on 192.168.23.1 to 8c:ea:1b:12:ca:40 via enP4p1s0f2
- Oct 27 15:28:08 fs4 dhcpd: DHCPREQUEST for 192.168.23.1 (192.168.3.25) from 8c:ea:1b:12:ca:40 via enP4p1s0f2
- Oct 27 15:28:08 fs4 dhcpd: DHCPACK on 192.168.23.1 to 8c:ea:1b:12:ca:40 via enP4p1s0f2
-
-
-#. Once installation finished, the pre-defined switch name and IP address will be configured on edgecore switch. ::
-
- cumulus@edgecoresw1:~$ ifconfig
- eth0 Link encap:Ethernet HWaddr 8c:ea:1b:12:ca:40
- inet addr:192.168.23.1 Bcast:192.168.255.255 Mask:255.255.0.0
- inet6 addr: fe80::8eea:1bff:fe12:ca40/64 Scope:Link
- UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
- cumulus@edgecoresw1:~$ hostname
- edgecoresw1
-
-
-Configure Edgecore Switch
--------------------------
-
-xCAT provides a script ``/opt/xcat/share/xcat/script/configcumulus`` to configure attributes in the Cumulus Switch. Use the ``--help`` option to see more details. ::
-
- #configcumulus --help
- Usage:
- configcumulus [-?│-h│--help]
- configcumulus [--switches switchnames] [--all]
- configcumulus [--switches switchnames] [--ssh]
- configcumulus [--switches switchnames] [--license filename ]
- configcumulus [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password]
- configcumulus [--switches switchnames] [--ntp]
-
-
-
-
-
-
-
-
diff --git a/docs/source/advanced/networks/edgecore_switches/index.rst b/docs/source/advanced/networks/edgecore_switches/index.rst
deleted file mode 100644
index 6d3bdf038..000000000
--- a/docs/source/advanced/networks/edgecore_switches/index.rst
+++ /dev/null
@@ -1,7 +0,0 @@
-Edgecore Switches
-=================
-
-.. toctree::
- :maxdepth: 2
-
- edgecore_switches.rst
diff --git a/docs/source/advanced/networks/index.rst b/docs/source/advanced/networks/index.rst
index 5f19f7890..cd29cd51f 100644
--- a/docs/source/advanced/networks/index.rst
+++ b/docs/source/advanced/networks/index.rst
@@ -5,7 +5,7 @@ Networks
:maxdepth: 2
ethernet_switches/index.rst
+ onie_switches/index.rst
switchdiscover/index.rst
infiniband/index.rst
ipv6/index.rst
- edgecore_switches/index.rst
diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst
index 0db6df69e..610dd6384 100644
--- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst
+++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskful.rst
@@ -24,14 +24,12 @@ Diskful Installation
-p postscripts="mlnxofed_ib_install -p /install// \
-m --add-kernel-support -end-"
-#. Provision the node
+#. Provision the node ::
+
+ rinstall osimage=
#. Verification
- * The Mellanox IB drivers are located at: ``/lib/modules//extra/``
-
- * Use the ``ibv_devinfo`` comamnd to obtain information about the InfiniBand adapter
-
* Check the status of ``openibd`` service
sysVinit: ::
@@ -42,3 +40,6 @@ Diskful Installation
systemctl status openibd.service
+ * Verify that the Mellanox IB drivers are located at: ``/lib/modules//extra/``
+
+ * Use the ``ibv_devinfo`` comamnd to obtain information about the InfiniBand adapter.
diff --git a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst
index ae1be14ca..36af543e7 100644
--- a/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst
+++ b/docs/source/advanced/networks/infiniband/mlnxofed_ib_install_v2_diskless.rst
@@ -44,14 +44,12 @@ Diskless Installation
packimage
-#. Provision the node
+#. Provision the node ::
+ rinstall osimage=rhels7.2-ppc64le-netboot-compute
+
#. Verification
- * The Mellanox IB drivers are located at: ``/lib/modules//extra/``
-
- * Use the ``ibv_devinfo`` comamnd to obtain information about the InfiniBand adapter
-
* Check the status of ``openibd`` service
sysVinit: ::
@@ -62,3 +60,6 @@ Diskless Installation
systemctl status openibd.service
+ * Verify that the Mellanox IB drivers are located at: ``/lib/modules//extra/``
+
+ * Use the ``ibv_devinfo`` comamnd to obtain information about the InfiniBand adapter.
diff --git a/docs/source/advanced/networks/onie_switches/index.rst b/docs/source/advanced/networks/onie_switches/index.rst
new file mode 100644
index 000000000..1539acb9b
--- /dev/null
+++ b/docs/source/advanced/networks/onie_switches/index.rst
@@ -0,0 +1,12 @@
+Open Network Install Environment Switches
+=========================================
+
+The Open Network Install Environment, or "ONIE" [1]_. is an open source project definining an **install environment** for bare metal switches. This environment allows choice for the end users when selecting a network operating system to install onto these bare metal switches.
+
+.. toctree::
+ :maxdepth: 2
+
+ os_cumulus/index.rst
+
+
+.. [1] Open Network Install Environment: Created by Cumulus Networks, Inc. in 2012, the Open Network Install Environment (ONIE) Project is a small operating system, pre-installed as firmware on bare metal network switches, that provides an environment for automated operating system provisioning.
diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/index.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/index.rst
new file mode 100644
index 000000000..d2b369957
--- /dev/null
+++ b/docs/source/advanced/networks/onie_switches/os_cumulus/index.rst
@@ -0,0 +1,12 @@
+Cumulus Linux OS
+================
+
+This documentation will focus on installing the Cumulus Network Operating System (https://www.cumulusnetworks.com/) onto a "white-box" Edgecore switch but the same concepts should apply to other ONIE enabled switches using other network operating systems.
+
+
+.. toctree::
+ :maxdepth: 2
+
+ prepare.rst
+ install.rst
+ manage.rst
diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst
new file mode 100644
index 000000000..8623a973e
--- /dev/null
+++ b/docs/source/advanced/networks/onie_switches/os_cumulus/install.rst
@@ -0,0 +1,112 @@
+Installation and Configuration
+==============================
+
+Cumulus OS Installtion
+----------------------
+
+**Note:** *The following assumes that the physical switches have power and have obtained a DHCP IP address from the xCAT open range.*
+
+xCAT provides support for detecting and installing the Cumulus Linux OS into ONIE enabled switches by utilizing DHCP to detect "**onie_vendor**" from the ``vendor-class-identifier`` string and then send it the Cumulus Linux OS installer.
+
+#. Create a pre-defined switch definition for the ONIE switch using the ``onieswitch`` template.
+
+ The mac address of the switch management port is required for xCAT to configure the DHCP information and send over the OS to install on the switch.
+
+ **[small clusters]** If you know the mac address of the management port on the switch, create the pre-defined switch defintion providing the mac address. ::
+
+ mkdef frame01sw1 --template onieswitch arch=armv71 \
+ ip=192.168.1.1 mac="aa:bb:cc:dd:ee:ff"
+
+ **[large clusters]** xCAT's :doc:`switchdiscover ` command can be used to discover the mac address and fill in the predefined switch definitions based on the switch/switchport mapping.
+
+
+ #. Define all the switch objects providing the switch/switchport mapping: ::
+
+ mkdef frame01sw1 --template onieswitch arch=armv71 \
+ ip=192.168.1.1 switch=coresw1 switchport=1
+ mkdef frame02sw1 --template onieswitch arch=armv71 \
+ ip=192.168.2.1 switch=coresw1 switchport=2
+ mkdef frame03sw1 --template onieswitch arch=armv71 \
+ ip=192.168.3.1 switch=coresw1 switchport=3
+ mkdef frame04sw1 --template onieswitch arch=armv71 \
+ ip=192.168.4.1 switch=coresw1 switchport=4
+ ...
+
+ #. Leverage ``switchdiscover`` over the DHCP range to automatically detect the MAC address and write them into the predefined swtiches above. ::
+
+ switchdiscover --range
+
+
+#. Set the ``provmethod`` attribute of the target switch(es) to the Cumulus Linux install image: ::
+
+ chdef frame[01-04]sw1 \
+ provmethod="/install/custom/sw_os/cumulus/cumulus-linux-3.1.0-bcm-armel.bin"
+
+#. Run ``makedhcp`` to prepare the DHCP/BOOTP lease information for the switch: ::
+
+ makedhcp -a frame[01-04]sw1
+
+ Executing the ``makedhcp`` command will kick off the network install of the ONIE enabled switch. If there is no OS pre-loaded on the switch, the switch continues to send a DHCPREQUEST out to the network. After ``makedhcp`` is run against the switch, an entry is added to the leases file that will respond to the request with the Cumulus Linux installer file. ::
+
+ host frame1sw1 {
+ dynamic;
+ hardware ethernet 8c:ea:1b:12:ca:40;
+ fixed-address 192.168.3.200;
+ supersede server.ddns-hostname = "frame1sw1";
+ supersede host-name = "frame1sw1";
+ if substring (option vendor-class-identifier, 0, 11) = "onie_vendor" {
+ supersede www-server = "http://192.168.27.1/install/custom/sw_os/cumulus/cumulus-linux-3.1.0-bcm-armel.bin";
+ }
+ }
+
+ *Typical installation time is around 1 hour*
+
+
+Configure xCAT Remote Commands
+------------------------------
+
+After Cumulus Linux OS is installed, a default user ``cumulus`` will be created with default password: ``CumulusLinux!``.
+
+To ease in the management of the switch, xCAT provides a script to help configure password-less ssh as the ``root`` user. This script sends over the xCAT ssh keys so that the xCAT remote commands (``xdsh``, ``xdcp``, etc) can be run against the ONIE switches.
+
+Execute the following to sync the xCAT keys to the switch: ::
+
+ /opt/xcat/share/xcat/scripts/configonie --switches frame01sw1 --ssh
+
+Validate the ssh keys are correctly configured by running a ``xdsh`` command: ::
+
+ xdsh frame01sw1 uptime
+
+
+Activate the License
+--------------------
+
+After Cumulus Linux OS is installed onto the ONIE switch, only the serial port console and the management ethernet port is enabled. To activate the rest of the switch ports, the license file needs to be installed onto the switch.
+
+#. Copy the license file to the switch: ::
+
+ xdcp frame01sw1 /install/custom/sw_os/cumulus/licensefile.txt /root/
+
+#. Activate the license: ::
+
+ xdsh frame01sw1 "/usr/cumulus/bin/cl-license -i /root/licensefile.txt"
+
+#. Verify that the license file is successfully installed: ::
+
+ xdsh frame01sw1 /usr/cumulus/bin/cl-license
+
+ Output should be similar to: ``frame01sw1 xxx@xx.com|xxxxxxxxxxxxxxx``
+
+#. Reboot the switch to apply the license file: ::
+
+ xdsh frame01sw1 reboot
+
+
+Enable SNMP
+------------
+
+In order to utilize ``xcatprobe switch_macmap``, snmp needs to be enabled. To enable, run the ``enablesnmp`` postscript on the switch: ::
+
+ updatenode frame01sw1 -P enablesnmp
+
+
diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/manage.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/manage.rst
new file mode 100644
index 000000000..0f3ce1184
--- /dev/null
+++ b/docs/source/advanced/networks/onie_switches/os_cumulus/manage.rst
@@ -0,0 +1,28 @@
+Switch Management
+=================
+
+VLAN Configuration
+------------------
+
+xCAT ships a simple configuration script that will set all the ports on the switch to be part of VLAN 1. See the Cumulus Networks documentation for more information regarding advanced networking configuration. ::
+
+ updatenode -P configinterface
+
+
+Re-install OS
+-------------
+
+There may be occasions where a re-install of the OS is required. Assuming the files are available on the xCAT management node, the following commands will invoke the install process:
+
+* **[use xCAT]** ``xdsh`` can be used to invoke the reinstall of the OS: ::
+
+ # to clear out all the previous configuration, use the -k option (optional)
+ xdsh "/usr/cumulus/bin/onie-select -k
+
+ # to invoke the reinstall of the OS
+ xdsh "/usr/cumulus/bin/onie-select -i -f;reboot"
+
+* **[manually]** Log into the Cumulus OS switch and run the following commands: ::
+
+ sudo onie-select -i
+ sudo reboot
diff --git a/docs/source/advanced/networks/onie_switches/os_cumulus/prepare.rst b/docs/source/advanced/networks/onie_switches/os_cumulus/prepare.rst
new file mode 100644
index 000000000..e68fd0895
--- /dev/null
+++ b/docs/source/advanced/networks/onie_switches/os_cumulus/prepare.rst
@@ -0,0 +1,19 @@
+Preparation
+===========
+
+Prepare the Cumulus Linux files on the xCAT Management Node.
+
+#. Obtain a valid Cumulus Linux License and download the Cumulus Linux OS installer.
+
+#. Copy the above files into a location under the xCAT ``/install`` directory. ::
+
+ # Create a directory to hold the cumulus linux files
+ mkdir -p /install/custom/sw_os/cumulus/
+
+ # copy the license file
+ cp licensefile.txt /install/custom/sw_os/cumulus/
+
+ # copy the installer
+ cp cumulus-linux-3.1.0-bcm-armel.bin /install/custom/sw_os/cumulus/
+
+
diff --git a/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst b/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst
index f67b76d10..d2b9df8b7 100644
--- a/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst
+++ b/docs/source/advanced/networks/switchdiscover/switch_based_switch_discovery.rst
@@ -8,34 +8,28 @@ Pre-requirement
In order to do switch-based switch discovery, the admin
-1. Needs to manually setup and configure core-switch, SNMP v3 needs to be enabled in order for xCAT access to it. **username** and **userpassword** attributes are for the remote login. It can be for **ssh** or **telnet**. If it is for **telnet**, set protocol to “telnet”. If the **username** is blank, the **username** and **password** will be retrieved from the passwd table with “switch” as the key. SNMP attributes will used for SNMPv3 communication. **nodetype** has to be set to "switch" to differentiate between switch-based node discovery or switch-based switch discovery. Refer to switches table attributes. Example of core-switch definition:
+1. Needs to manually setup and configure core-switch, SNMP v3 needs to be enabled in order for xCAT access to it. **username** and **userpassword** attributes are for the remote login. It can be for **ssh** or **telnet**. If it is for **telnet**, set protocol to “telnet”. If the **username** is blank, the **username** and **password** will be retrieved from the passwd table with “switch” as the key. SNMP attributes will used for SNMPv3 communication. **nodetype** has to be set to "switch" to differentiate between switch-based node discovery or switch-based switch discovery. Refer to switches table attributes. Example of core-switch definition: ::
-::
+ lsdef switch-10-5-23-1
+ Object name: switch-10-5-23-1
+ groups=switch
+ ip=10.5.23.1
+ mac=ab:cd:ef:gh:dc
+ mgt=switch
+ nodetype=switch
+ password=admin
+ postbootscripts=otherpkgs
+ postscripts=syslog,remoteshell,syncfiles
+ protocol=telnet
+ snmpauth=sha
+ snmppassword=userpassword
+ snmpusername=snmpadmin
+ snmpversion=3
+ switchtype=BNT
+ usercomment=IBM
+ username=root
- lsdef switch-10-5-23-1
- Object name: switch-10-5-23-1
- groups=switch
- ip=10.5.23.1
- mac=ab:cd:ef:gh:dc
- mgt=switch
- nodetype=switch
- password=admin
- postbootscripts=otherpkgs
- postscripts=syslog,remoteshell,syncfiles
- protocol=telnet
- snmpauth=sha
- snmppassword=userpassword
- snmpusername=snmpadmin
- snmpversion=3
- switchtype=BNT
- usercomment=IBM
- username=root
-
-
-
-2. Predefine all top-rack switches which connect to core-switch. The attribute **ip** is static ip address for the switch. When ``switchdiscover --setup`` command is issued, this ip address will replace dhcp IP address on the switch. **nodetype=switch** needs to be set to differentiate between switch-based node discovery or switch-based switch discovery during discovery process. the attribute **switch** is hostname of core-switch and **switchport** is the port number in the core-switch that top-rack switch is connected to.
-
-::
+2. Predefine all top-rack switches which connect to core-switch. The attribute **ip** is static IP address for the switch. When ``switchdiscover --setup`` command is issued, this IP address will replace dhcp IP address on the switch. **nodetype=switch** needs to be set to differentiate between switch-based node discovery or switch-based switch discovery during discovery process. the attribute **switch** is hostname of core-switch and **switchport** is the port number in the core-switch that top-rack switch is connected to. ::
lsdef switch-192-168-5-22
objtype=node
@@ -50,13 +44,13 @@ In order to do switch-based switch discovery, the admin
3. Add switches to /etc/hosts for hostname lookup and xdsh command. ::
- makehosts switch-192-168-5-23
- makehosts switch-192-168-5-22
+ makehosts switch-192-168-5-23
+ makehosts switch-192-168-5-22
4. Setup Dynamic IP range in network table for discovered switches to use. ::
- # tabdump networks
+ # tabdump networks
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
"192_168_0_0-255_255_0_0","192.168.0.0","255.255.0.0","enP4p1s0f2","",,"192.168.3.29",,,,"192.168.5.150-192.168.5.170",,,,,,,,,
@@ -67,7 +61,7 @@ dhcp should be restarted after seting up dynamic IP range.
Discover Switches
~~~~~~~~~~~~~~~~~
-xCAT supports **switchdiscover** command to discover the switches that are attached to the subnets on xCAT management node. Refer to http://xcat-docs.readthedocs.io/en/latest/advanced/networks/switchdiscover/switches_discovery.html for more info.
+xCAT supports **switchdiscover** command to discover the switches that are attached to the subnets on xCAT management node. Refer to :doc:`/advanced/networks/switchdiscover/switches_discovery` for more info.
For the switch-based switch discovery, we add **–setup** flag: ::
@@ -125,13 +119,11 @@ if **--setup** flag is specified, the command will perform following steps:
Configure switches
~~~~~~~~~~~~~~~~~~
-The **switchdiscover** command with ``--setup`` flag will set up switches with static ip address, change the hostname from predefine switches and enable snmpv3 configuration. For other switches configuration, Refer to http://xcat-docs.readthedocs.io/en/latest/advanced/networks/ethernet_switches/ethernet_switches.html and http://xcat-docs.readthedocs.io/en/latest/advanced/networks/infiniband/switch_configuration.html
+The **switchdiscover** command with ``--setup`` flag will set up switches with static IP address, change the hostname from predefine switches and enable snmpv3 configuration. For other switches configuration, refer to :doc:`/advanced/networks/ethernet_switches/ethernet_switches` and :doc:`/advanced/networks/infiniband/switch_configuration`.
-These two config files are located in the **/opt/xcat/share/xcat/scripts**. The **switchdiscover** process will call the config files with ``--all`` option. User can call these scripts to setup one of options manually.
+These two config files are located in the **/opt/xcat/share/xcat/scripts** directory. The **switchdiscover** process will call the config files with ``--all`` option. User can call these scripts to setup one of options manually.
-1. **configBNT** is for configure BNT switches.
-
-::
+1. **configBNT** is for configure BNT switches. ::
./configBNT --help
Usage:
@@ -142,21 +134,22 @@ These two config files are located in the **/opt/xcat/share/xcat/scripts**. The
configBNT [--switches switchnames] [--snmp] [--user snmp_user] [--password snmp_password] [--group snmp_group]
configBNT [--switches switchnames] [--port port] [--vlan vlan]
-2. **configMellanox** is for configuring Mellanox switch. The script will configure ntp service on the switch with xCAT MN and will use rspconfig command to
- * enable ssh
- * enable snmp function on the switch
- * enable the snmp trap
- * set logging destination to xCAT MN
+2. **configMellanox** is for configuring Mellanox switch. The script will configure ntp service on the switch with xCAT MN and will use rspconfig command to
-::
+ * enable ssh
+ * enable snmp function on the switch
+ * enable the snmp trap
+ * set logging destination to xCAT MN
- ./configMellanox --help
- Usage:
- configMellonax [-?│-h│--help]
- configMellonax [--switches switchnames] [--all]
- configMellonax [--switches switchnames] [--ip]
- configMellonax [--switches switchnames] [--name]
- configMellonax [--switches switchnames] [--config]
+ ::
+
+ ./configMellanox --help
+ Usage:
+ configMellonax [-?│-h│--help]
+ configMellonax [--switches switchnames] [--all]
+ configMellonax [--switches switchnames] [--ip]
+ configMellonax [--switches switchnames] [--name]
+ configMellonax [--switches switchnames] [--config]
Switch Status
@@ -166,7 +159,7 @@ During the switch-based switch discovery process, there are four states displaye
**Matched** --- Discovered switch is matched to predefine switch, **otherinterfaces** attribute is updated to dhcp IP address, and mac address, **switch type** and **usercomment** also updated with vendor information for the predefined switch.
-**ip_configed** --- switch is set up to static ip address based on predefine switch IP address. If failure to set up IP address, the status will stay as **Matched**.
+**ip_configed** --- switch is set up to static IP address based on predefine switch IP address. If failure to set up IP address, the status will stay as **Matched**.
**hostname_configed** -- switch host name is changed based on predefine switch hostname. If failure to change hostname on the switch, the status will stay as **ip_configed**.
diff --git a/docs/source/advanced/pdu/index.rst b/docs/source/advanced/pdu/index.rst
new file mode 100644
index 000000000..5141a09f5
--- /dev/null
+++ b/docs/source/advanced/pdu/index.rst
@@ -0,0 +1,10 @@
+PDUs
+====
+
+Power Distribution Units (PDUs) are devices that distribute power to servers in a frame. Intelligent PDUs have the capability of monitoring the amount of power that is being used by devices plugged into it.
+
+
+.. toctree::
+ :maxdepth: 2
+
+ pdu.rst
diff --git a/docs/source/advanced/pdu/pdu.rst b/docs/source/advanced/pdu/pdu.rst
new file mode 100644
index 000000000..781a7dbc9
--- /dev/null
+++ b/docs/source/advanced/pdu/pdu.rst
@@ -0,0 +1,125 @@
+PDU
+===
+
+xCAT provides basic remote management for each power outlet plugged into the PDUs using SNMP communication. This documentation will focus on configuration of the PDU and Node objects to allow xCAT to control power at the PDU outlet level.
+
+
+Define PDU Objects
+------------------
+
+
+
+#. Define pdu object ::
+
+ mkdef f5pdu3 groups=pdu ip=50.0.0.8 mgt=pdu nodetype=pdu
+
+#. Add hostname to /etc/hosts::
+
+ makehosts f5pdu3
+
+#. Verify the SNMP command responds against the PDU: ::
+
+ snmpwalk -v1 -cpublic -mALL f5pdu3 .1.3.6.1.2.1.1
+
+
+Define PDU Attribute
+--------------------
+
+Administrators will need to know the exact mapping of the outlets to each server in the frame. xCAT cannot validate the physical cable is connected to the correct server.
+
+Add a ``pdu`` attribute to the compute node definition in the form "PDU_Name:outlet": ::
+
+ #
+ # Compute server cn01 has two power supplies
+ # connected to outlet 6 and 7 on pdu=f5pdu3
+ #
+ chdef cn01 pdu=f5pdu3:6,f5pdu3:7
+
+
+Verify the setting: ``lsdef cn01 -i pdu``
+
+
+PDU Commands
+------------
+
+The following commands are supported against a compute node:
+
+ * Check the pdu status for a compute node: ::
+
+ # rpower cn01 pdustat
+ cn01: f5pdu3 outlet 6 is on
+ cn01: f5pdu3 outlet 7 is on
+
+
+ * Power off the PDU outlets on a compute node: ::
+
+ # rpower cn01 pduoff
+ cn01: f5pdu3 outlet 6 is off
+ cn01: f5pdu3 outlet 7 is off
+
+ * Power on the PDU outlets on a compute node: ::
+
+ # rpower cn01 pduon
+ cn01: f5pdu3 outlet 6 is on
+ cn01: f5pdu3 outlet 7 is on
+
+The following commands are supported against a PDU:
+
+ * Check the status of the full PDU: ::
+
+ # rinv f5pdu3
+ f5pdu3: outlet 1 is on
+ f5pdu3: outlet 2 is on
+ f5pdu3: outlet 3 is on
+ f5pdu3: outlet 4 is on
+ f5pdu3: outlet 5 is on
+ f5pdu3: outlet 6 is off
+ f5pdu3: outlet 7 is off
+ f5pdu3: outlet 8 is on
+ f5pdu3: outlet 9 is on
+ f5pdu3: outlet 10 is on
+ f5pdu3: outlet 11 is on
+ f5pdu3: outlet 12 is on
+
+ * Power off the full PDU: ::
+
+ # rpower f5pdu3 off
+ f5pdu3: outlet 1 is off
+ f5pdu3: outlet 2 is off
+ f5pdu3: outlet 3 is off
+ f5pdu3: outlet 4 is off
+ f5pdu3: outlet 5 is off
+ f5pdu3: outlet 6 is off
+ f5pdu3: outlet 7 is off
+ f5pdu3: outlet 8 is off
+ f5pdu3: outlet 9 is off
+ f5pdu3: outlet 10 is off
+ f5pdu3: outlet 11 is off
+ f5pdu3: outlet 12 is off
+
+ * Power on the full PDU: ::
+
+ # rpower f5pdu3 on
+ f5pdu3: outlet 1 is on
+ f5pdu3: outlet 2 is on
+ f5pdu3: outlet 3 is on
+ f5pdu3: outlet 4 is on
+ f5pdu3: outlet 5 is on
+ f5pdu3: outlet 6 is on
+ f5pdu3: outlet 7 is on
+ f5pdu3: outlet 8 is on
+ f5pdu3: outlet 9 is on
+ f5pdu3: outlet 10 is on
+ f5pdu3: outlet 11 is on
+ f5pdu3: outlet 12 is on
+
+
+**Note:** For BMC based compute nodes, turning the PDU outlet power on does not automatically power on the compute side. Users will need to issue ``rpower on`` to power on the compute node after the BMC boots.
+
+
+
+
+
+
+
+
diff --git a/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/ubuntu_os_other_pkg.rst b/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/ubuntu_os_other_pkg.rst
index e7a3fa7db..f8caa0e95 100644
--- a/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/ubuntu_os_other_pkg.rst
+++ b/docs/source/guides/admin-guides/manage_clusters/common/deployment/additionalpkg/ubuntu_os_other_pkg.rst
@@ -32,5 +32,8 @@ Compute nodes can access the internet
Compute nodes can not access the internet
------------------------------------------
-If compute nodes cannot access the internet, there are two ways to install additional packages:use apt proxy or use local mirror according to :ref:`ubuntu-install-non-internet`
+If compute nodes cannot access the internet, there are two ways to install additional packages
+
+ * use apt proxy
+ * use local mirror
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst
index d9fe7c2a0..d69d5d706 100644
--- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst
@@ -27,27 +27,17 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi
#. Detect the BMCs and add the node definitions into xCAT.
- Use the ``bmcdiscover`` command to discover the BMCs responding over an IP range and automatically write the output into the xCAT database. You **must** use the ``-w`` option to automatically write the output into the xCAT database.
+ Use the :doc:`bmcdiscover ` command to discover the BMCs responding over an IP range and write the output into the xCAT database. This discovered BMC node is used to control the physical server during hardware discovery and will be deleted after the correct server node object is matched to a pre-defined node. You **must** use the ``-w`` option to write the output into the xCAT database.
- To discover the BMC with an IP address of 172.30.0.1, use the command: ::
+ To discover the BMC with an IP address range of 50.0.100.1-100: ::
- bmcdiscover --range 172.30.0.1 -z -w
+ bmcdiscover --range 50.0.100.1-100 -z -w
- The discovered nodes will be written to xCAT database: ::
+ The discovered nodes will be written to xCAT database. The discovered BMC nodes are in the form **node-model_type-serial**. To view the discovered nodes: ::
- # lsdef node-8247-22l-10112ca
- Object name: node-8247-22l-10112ca
- bmc=172.30.0.1
- cons=ipmi
- groups=all
- hwtype=bmc
- mgt=ipmi
- mtm=8247-22L
- nodetype=mp
- postbootscripts=otherpkgs
- postscripts=syslog,remoteshell,syncfiles
- serial=10112CA
- nodetype=mp
+ lsdef /node-.*
+
+ **Note:** The ``bmcdiscover`` command will use the username/password from the ``passwd`` table corresponding to ``key=ipmi``. To overwrite with a different username/password use the ``-u`` and ``-p`` option to ``bmcdiscover``.
#. **Pre-define** the compute nodes:
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst
index f3388c855..3b3245171 100644
--- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst
@@ -3,31 +3,18 @@ Discover server and define
After environment is ready, and the server is powered, we can start server discovery process. The first thing to do is discovering the FSP/BMC of the server. It is automatically powered on when the physical server is powered.
-The following command can be used to discovery BMC within an IP range and write the discovered node definition into xCAT database::
+Use the :doc:`bmcdiscover ` command to discover the BMCs responding over an IP range and write the output into the xCAT database. This discovered BMC node is used to control the physical server during hardware discovery and will be deleted after the correct server node object is matched to a pre-defined node. You **must** use the ``-w`` option to write the output into the xCAT database.
- bmcdiscover -s nmap --range 50.0.100.1-100 -z -w
+To discover the BMC with an IP address range of 50.0.100.1-100: ::
-The discovered BMC node will be like this::
+ bmcdiscover --range 50.0.100.1-100 -z -w
- # lsdef node-8247-42l-10112ca
- Object name: node-8247-42l-10112ca
- bmc=50.0.100.1
- cons=ipmi
- groups=all
- hwtype=bmc
- mgt=ipmi
- mtm=8247-42L
- nodetype=mp
- postbootscripts=otherpkgs
- postscripts=syslog,remoteshell,syncfiles
- serial=10112CA
+The discovered nodes will be written to xCAT database. The discovered BMC nodes are in the form **node-model_type-serial**. To view the discovered nodes: ::
-**Note**:
- 1. The BMC node is just used to control the physical during hardware discovery process, it will be deleted after the correct server node object is found.
-
- 2. bmcdiscover will use username/password pair set in ``passwd`` table with **key** equal **ipmi**. If you'd like to use other username/password pair, you can use ::
+ lsdef /node-.*
+
+**Note:** The ``bmcdiscover`` command will use the username/password from the ``passwd`` table corresponding to ``key=ipmi``. To overwrite with a different username/password use the ``-u`` and ``-p`` option to ``bmcdiscover``.
- bmcdiscover -s nmap --range 50.0.100.1-100 -z -w -u -p
Start discovery process
-----------------------
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst
index 882086fa2..8744168df 100644
--- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/index.rst
@@ -13,6 +13,7 @@ These are machines use the IBM Power Architecture and is **IPMI** managed.
management.rst
diskful/index.rst
diskless/index.rst
+ statelite/index.rst
updatenode.rst
parallel_cmd.rst
virtual_machines/index.rst
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/advanced_features.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/advanced_features.rst
new file mode 100644
index 000000000..cb5aca4e9
--- /dev/null
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/advanced_features.rst
@@ -0,0 +1,266 @@
+Advanced features
+=================
+
+Both directory and its child items coexist in litefile table
+------------------------------------------------------------
+
+As described in the above chapters, we can add the files/directories to litefile table. Sometimes, it is necessary to put one directory and also its child item(s) into the litefile table. Due to the implementation of the statelite on Linux, some scenarios works, but some doesn't work.
+
+Here are some examples of both directory and its child items coexisting:
+
+ Both the parent directory and the child file coexist: ::
+
+ "ALL","/root/testblank/",,,
+ "ALL","/root/testblank/tempfschild","tempfs",,
+
+ One more complex example: ::
+
+ "ALL","/root/",,,
+ "ALL","/root/testblank/tempfschild","tempfs",,
+
+ Another more complex example, but we don't intend to support such one scenario: ::
+
+ "ALL","/root/",,,
+ "ALL","/root/testblank/",,,
+ "ALL","/root/testblank/tempfschild","tempfs",,
+
+For example, in scenario 1, the parent is ``/root/testblank/``, and the child is ``/root/testblank/tempfschild``.
+In scenario 2, the parent is ``/root/``, and the child is ``/root/testblank/tempfschild``.
+
+In order to describe the hierarchy scenarios we can use , ``P`` to denote parent, and ``C`` to denote child.
+
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| Option | Example | Remarks |
++==============+=====================================================+=================================================+
+| P:tmpfs | "ALL","/root/testblank/",,, | Both the parent and the child are mounted to |
+| | "ALL","/root/testblanktempfschild","tempfs",, | tmpfs on the booted node following their |
+| | | respective options. Only the parent are mounted |
+| | | to the local file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:tmpfs | "ALL","/root/testblank/",,, | Both parent and child are mounted to tmpfs |
+| C:persistent | "ALL","/root/testblank/testpersfile","persistent",, | on the booted node following their respective |
+| | | options. Only the parent is mounted to the local|
+| | | file |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:persistent | "ALL","/root/testblank/","persistent",, | Not permitted now. But plan to support it. |
+| C:tmpfs | "ALL","/root/testblank/tempfschild",,, | |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:persistent | "ALL","/root/testblank/","persistent",, | Both parent and child are mounted to tmpfs |
+| C:persistent | "ALL","/root/testblank/testpersfile","persistent",, | on the booted node following their respective |
+| | | options. Only the parent is mounted to local |
+| | | file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:ro C:any | | Not permitted |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:tmpfs C:ro | | Both parent and child are mounted to tmpfs |
+| | | on the booted node following their respective |
+| | | options. Only the parent is mounted to local |
+| | | file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:tmpfs | | Both parent and child are mounted to tmpfs |
+| C:con | | on the booted node following their respective |
+| | | options. Only the parent is mounted to local |
+| | | file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link | "ALL","/root/testlink/","link",, | Both parent and child are created in tmpfs |
+| C:link | "ALL","/root/testlink/testlinkchild","link",, | on the booted node following their respective |
+| | | options; there's only one symbolic link of |
+| | | the parent is created in the local file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P: link C: | "ALL","/root/testlinkpers/","link",, | Both parent and child are created in tmpfs |
+| link, | "ALL","/root/testlink/testlinkchild",, | on the booted node following their respective |
+| persistent | "link,persistent" | options; there's only one symbolic link of |
+| | | the parent is created in the local file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link, | "ALL","/root/testlinkpers/","link,persistent",, | NOT permitted |
+| persistent | | |
+| C: link | "ALL","/root/testlink/testlinkchild","link" | |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link, | "ALL","/root/testlinkpers/","link,persistent",, | Both parent and child are created in tmpfs |
+| persistent | "ALL","/root/testlink | on the booted node following "link,persistent" |
+| C:link, | | way; there's only one symbolic link of the |
+| persistent | | parent is created in the local file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link | "ALL","/root/testlink/","link",, | Both parent and child are created in tmpfs |
+| C:link,ro | "ALL","/root/testlink/testlinkro","link,ro",, | on the booted node, there's only one symbolic |
+| | | link of the parent is created in the local |
+| | | file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link | "ALL","/root/testlink/","link",, | Both parent and child are created in tmpfs |
+| C:link,con | "ALL","/root/testlink/testlinkconchild","link,con",,| on the booted node, there's only one symbolic |
+| | | link of the parent in the local file system. |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link, | | NOT Permitted |
+| persistent | | |
+| C:link,ro | | |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link, | | NOT Permitted |
+| persistent | | |
+| C:link,con | | |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:tmpfs | | NOT Permitted |
+| C:link | | |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+| P:link | | NOT Permitted |
+| C:persistent | | |
++--------------+-----------------------------------------------------+-------------------------------------------------+
+
+litetree table
+--------------
+
+The litetree table controls where the initial content of the files in the litefile table come from, and the long term content of the ``ro`` files. When a node boots up in statelite mode, it will by default copy all of its tmpfs files from the ``/.default`` directory of the root image, so there is not requirement to setup a litetree table. If you decide that you want some of the files pulled from different locations that are different per node, you can use this table.
+
+See litetree man page for description of attributes.
+
+For example, a user may have two directories with a different ``/etc/motd`` that should be used for nodes in two locations: ::
+
+ 10.0.0.1:/syncdirs/newyork-590Madison/rhels5.4/x86_64/compute/etc/motd
+ 10.0.0.1:/syncdirs/shanghai-11foo/rhels5.4/x86_64/compute/etc/motd
+
+You can specify this in one row in the litetree table: ::
+
+ 1,,10.0.0.1:/syncdirs/$nodepos.room/$nodetype.os/$nodetype.arch/$nodetype.profile
+
+When each statelite node boots, the variables in the litetree table will be substituted with the values for that node to locate the correct directory to use. Assuming that ``/etc/motd`` was specified in the litefile table, it will be searched for in all of the directories specified in the litetree table and found in this one.
+
+You may also want to look by default into directories containing the node name first: ::
+
+ $noderes.nfsserver:/syncdirs/$node
+
+The litetree prioritizes where node files are found. The first field is the priority. The second field is the image name (ALL for all images) and the final field is the mount point.
+
+Our example is as follows: ::
+
+ 1,,$noderes.nfsserver:/statelite/$node
+ 2,,cnfs:/gpfs/dallas/
+
+The two directories ``/statelite/$node`` on the node's $noderes.nfsserver and the ``/gpfs/dallas`` on the node cnfs contain root tree structures that are sparsely populated with files that we want to place in those nodes. If files are not found in the first directory, it goes to the next directory. If none of the files can be found in the litetree hierarchy, then they are searched for in ``/.default`` on the local image.
+
+Installing a new Kernel in the statelite image
+----------------------------------------------
+
+Obtain you new kernel and kernel modules on the MN, for example here we have a new SLES kernel.
+
+#. Copy the kernel into /boot : ::
+
+ cp **vmlinux-2.6.32.10-0.5-ppc64**/boot
+
+#. Copy the kernel modules into ``/lib/modules/`` ::
+
+ /lib/modules # ls -al
+ total 16
+ drwxr-xr-x 4 root root 4096 Apr 19 10:39 .
+ drwxr-xr-x 17 root root 4096 Apr 13 08:39 ..
+ drwxr-xr-x 3 root root 4096 Apr 13 08:51 2.6.32.10-0.4-ppc64
+ **drwxr-xr-x 4 root root 4096 Apr 19 10:12 2.6.32.10-0.5-ppc64**
+
+#. Run genimage to update the statelite image with the new kernel ::
+
+ genimage -k 2.6.32.10-0.5-ppc64
+
+#. Then after a nodeset command and netbooti, shows the new kernel::
+
+ uname -a
+
+Enabling the localdisk Option
+-----------------------------
+
+``Note``: You can skip this section if not using the ``localdisk`` option in your litefile table.
+
+Several things need to be done to enable the 'localdisk' support:
+
+Define how to partition the local disk
+``````````````````````````````````````
+
+When a node is deployed, the local hard disk needs to be partitioned and formatted before it can be used. This section explains how provide a configuration file that tells xCAT to partition a local disk and make it ready to use for the directories listed in the litefile table with the ``localdisk`` option.
+
+The configuration file needs to be specified in the ``partitionfile`` attribute of the osimage definition. The configuration file includes several parts:
+
+ * Global parameters to control enabling or disabling the function
+ * [disk] part to control the partitioning of the disk
+ * [localspace] part to control which partition will be used to store the localdisk directories listed in the litefile table
+ * [swapspace] part to control the enablement of the swap space for the node.
+
+An example localdisk configuration file: ::
+
+ enable=yes
+ enablepart=no
+
+ [disk]
+ dev=/dev/sdb
+ clear=yes
+ parts=100M-200M,1G-2G
+
+ [disk]
+ dev=/dev/sda
+ clear=yes
+ parts=10,20,30
+
+ [disk]
+ dev=/dev/sdc
+ clear=yes
+ parts=10,20,30
+
+ [localspace]
+ dev=/dev/sda1
+ fstype=ext3
+
+ [swapspace]
+ dev=/dev/sda2
+
+The two global parameters ``enable`` and ``enablepart`` can be used to control the enabling/disabling of the functions:
+
+ * enable: The localdisk feature only works when ``enable`` is set to *yes*. If it is set to *no*, the localdisk configuration will not be run.
+ * enablepart: The partition action (refer to the ``[disk]`` section) will be run only when ``enablepart=yes``.
+
+The ``[disk]`` section is used to configure how to partition a hard disk:
+
+ * dev: The path of the device file.
+ * clear: If set to ``yes`` it will clear all the existing partitions on this disk.
+ * fstype: The file system type for the new created partitions. ``ext3`` is the default value if not set.
+ * parts: A comma separated list of space ranges, one for each partition that will be created on the device. The valid format for each space range is ``-`` or ````. For example, you could set it to ``100M-10G`` or ``50``. If you set it to ``50``, that means 50% of the disk space will be assigned to that partition.
+
+The ``[localspace]`` section is used to specify which partition will be used as local storage for the node.
+
+ * dev: The path of the partition.
+ * fstype: The file system type on the partition.
+
+the ``[swapspace]`` section is used to configure the swap space for the statelite node.
+
+ * dev: The path of the partition file which will be used as the swap space.
+
+To enable the local disk capability, create the configuration file (for example in ``/install/custom``) and set the path in the partitionfile attribute for the osimage: ::
+
+ chdef -t osimage partitionfile=/install/custom/cfglocaldisk
+
+Now all nodes that use this osimage (i.e. have their provmethod attribute set to this osimage definition name), will have its local disk configured.
+
+Configure the files in the litefile table
+`````````````````````````````````````````
+
+For the files/directories that you would like xCAT to store on the local disk, add an entry in the litefile table like this: ::
+
+ "ALL","/tmp/","localdisk",,
+
+``Note``: you do not need to specify the swap space in the litefile table. Just putting it in the partitionfile config file is enough.
+
+Add an entry in policy table to permit the running of the ``getpartitioin`` command from the node ::
+
+ chtab priority=7.1 policy.commands=getpartition policy.rule=allow
+
+If Using the RAMdisk-based Image
+````````````````````````````````
+
+If you want to use the local disk option with a RAMdisk-based image, remember to follow the instructions in :doc:`Switch to the RAMdisk based solution <./provision_statelite>`.
+
+If your reason for using a RAMdisk image is to avoid compute node runtime dependencies on the service node or management node, then the only entries you should have in the litefile table should be files/dirs that use the localdisk option.
+
+Debugging techniques
+--------------------
+
+ When a node boots up in statelite mode, there is a script that runs called statelite that is in the root directory of ``$imageroot/etc/init.d/statelite``. This script is not run as part of the rc scripts, but as part of the pre-switch root environment. Thus, all the linking is done in this script. There is a ``set x`` near the top of the file. You can uncomment it and see what the script runs. You will then see lots of mkdirs and links on the console.
+
+ You can also set the machine to shell. Just add the word ``shell`` on the end of the pxeboot file of the node in the append line. This will make the init script in the initramfs pause 3 times before doing a switch_root.
+
+ When all the files are linked they are logged in ``/.statelite/statelite.log`` on the node. You can get into the node after it has booted and look in the ``/.statelite`` directory.
+
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst
new file mode 100644
index 000000000..9e8a9c312
--- /dev/null
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/config_statelite.rst
@@ -0,0 +1,134 @@
+Configuration
+=============
+
+Statelite configuration is done using the following tables in xCAT:
+ * litefile
+ * litetree
+ * statelite
+ * policy
+ * noderes
+
+litefile table
+--------------
+
+The litefile table specifies the directories and files on the statelite nodes that should be read/write, persistent, or read-only overlay. All other files in the statelite nodes come from the read-only statelite image.
+
+#. The first column in the litefile table is the image name this row applies to. It can be an exact osimage definition name, an osimage group (set in the groups attribute of osimages), or the keyword ``ALL``.
+
+#. The second column in the litefile table is the full path of the directory or file on the node that you are setting options for.
+
+#. The third column in the litefile table specifies options for the directory or file:
+
+ #. tmpfs - It provides a file or directory for the node to use when booting, its permission will be the same as the original version on the server. In most cases, it is read-write; however, on the next statelite boot, the original version of the file or directory on the server will be used, it means it is non-persistent. This option can be performed on files and directories.
+ #. rw - Same as Above.Its name "rw" does NOT mean it always be read-write, even in most cases it is read-write. Do not confuse it with the "rw" permission in the file system.
+ #. persistent - It provides a mounted file or directory that is copied to the xCAT persistent location and then over-mounted on the local file or directory. Anything written to that file or directory is preserved. It means, if the file/directory does not exist at first, it will be copied to the persistent location. Next time the file/directory in the persistent location will be used. The file/directory will be persistent across reboots. Its permission will be the same as the original one in the statelite location. It requires the statelite table to be filled out with a spot for persistent statelite. This option can be performed on files and directories.
+ #. con - The contents of the pathname are concatenated to the contents of the existing file. For this directive the searching in the litetree hierarchy does not stop when the first match is found. All files found in the hierarchy will be concatenated to the file when found. The permission of the file will be "-rw-r--r--", which means it is read-write for the root user, but readonly for the others. It is non-persistent, when the node reboots, all changes to the file will be lost. It can only be performed on files. Do not use it for one directory.
+ #. ro - The file/directory will be overmounted read-only on the local file/directory. It will be located in the directory hierarchy specified in the litetree table. Changes made to this file or directory on the server will be immediately seen in this file/directory on the node. This option requires that the file/directory to be mounted must be available in one of the entries in the litetree table. This option can be performed on files and directories.
+ #. tmpfs,rw - Only for compatibility it is used as the default option if you leave the options column blank. It has the same semantics with the link option, so when adding new items into the _litefile table, the link option is recommended.
+ #. link - It provides one file/directory for the node to use when booting, it is copied from the server, and will be placed in tmpfs on the booted node. In the local file system of the booted node, it is one symbolic link to one file/directory in tmpfs. And the permission of the symbolic link is "lrwxrwxrwx", which is not the real permission of the file/directory on the node. So for some application sensitive to file permissions, it will be one issue to use "link" as its option, for example, "/root/.ssh/", which is used for SSH, should NOT use "link" as its option. It is non-persistent, when the node is rebooted, all changes to the file/directory will be lost. This option can be performed on files and directories.
+ #. link,ro - The file is readonly, and will be placed in tmpfs on the booted node. In the local file system of the booted node, it is one symbolic link to the tmpfs. It is non-persistent, when the node is rebooted, all changes to the file/directory will be lost. This option requires that the file/directory to be mounted must be available in one of the entries in the litetree table. The option can be performed on files and directories.
+ #. link,con - Similar to the "con" option. All the files found in the litetree hierarchy will be concatenated to the file when found. The final file will be put to the tmpfs on the booted node. In the local file system of the booted node, it is one symbolic link to the file/directory in tmpfs. It is non-persistent, when the node is rebooted, all changes to the file will be lost. The option can only be performed on files.
+ #. link,persistent - It provides a mounted file or directory that is copied to the xCAT persistent location and then over-mounted to the tmpfs on the booted node, and finally the symbolic link in the local file system will be linked to the over-mounted tmpfs file/directory on the booted node. The file/directory will be persistent across reboots. The permission of the file/directory where the symbolic link points to will be the same as the original one in the statelite location. It requires the statelite table to be filled out with a spot for persistent statelite. The option can be performed on files and directories.
+ #. localdisk - The file or directory will be stored in the local disk of the statelite node. Refer to the section To enable the localdisk option to enable the 'localdisk' support.
+
+Currently, xCAT does not handle the relative links very well. The relative links are commonly used by the system libraries, for example, under ``/lib/`` directory, there will be one relative link matching one ``.so`` file. So, when you add one relative link to the litefile table (Not recommend), make sure the real file also be included, or put its directory name into the litefile table.
+
+**Note**: It is recommended that you specify at least the entries listed below in the litefile table, because most of these files need to be writeable for the node to boot up successfully. When any changes are made to their options, make sure they won't affect the whole system.
+
+Sample Data for Redhat statelite setup
+``````````````````````````````````````
+
+This is the minimal list of files needed, you can add additional files to the litefile table. ::
+
+ #image,file,options,comments,disable
+ "ALL","/etc/adjtime","tmpfs",,
+ "ALL","/etc/securetty","tmpfs",,
+ "ALL","/etc/lvm/","tmpfs",,
+ "ALL","/etc/ntp.conf","tmpfs",,
+ "ALL","/etc/rsyslog.conf","tmpfs",,
+ "ALL","/etc/rsyslog.conf.XCATORIG","tmpfs",,
+ "ALL","/etc/udev/","tmpfs",,
+ "ALL","/etc/ntp.conf.predhclient","tmpfs",,
+ "ALL","/etc/resolv.conf","tmpfs",,
+ "ALL","/etc/yp.conf","tmpfs",,
+ "ALL","/etc/resolv.conf.predhclient","tmpfs",,
+ "ALL","/etc/sysconfig/","tmpfs",,
+ "ALL","/etc/ssh/","tmpfs",,
+ "ALL","/etc/inittab","tmpfs",,
+ "ALL","/tmp/","tmpfs",,
+ "ALL","/var/","tmpfs",,
+ "ALL","/opt/xcat/","tmpfs",,
+ "ALL","/xcatpost/","tmpfs",,
+ "ALL","/etc/systemd/system/multi-user.target.wants/","tmpfs",,
+ "ALL","/root/.ssh/","tmpfs",,
+ "ALL","/etc/rc3.d/","tmpfs",,
+ "ALL","/etc/rc2.d/","tmpfs",,
+ "ALL","/etc/rc4.d/","tmpfs",,
+ "ALL","/etc/rc5.d/","tmpfs",,
+
+Sample Data for SLES statelite setup
+````````````````````````````````````
+
+This is the minimal list of files needed, you can add additional files to the litefile table. ::
+
+ #image,file,options,comments,disable
+ "ALL","/etc/lvm/","tmpfs",,
+ "ALL","/etc/ntp.conf","tmpfs",,
+ "ALL","/etc/ntp.conf.org","tmpfs",,
+ "ALL","/etc/resolv.conf","tmpfs",,
+ "ALL","/etc/ssh/","tmpfs",,
+ "ALL","/etc/sysconfig/","tmpfs",,
+ "ALL","/etc/syslog-ng/","tmpfs",,
+ "ALL","/etc/inittab","tmpfs",,
+ "ALL","/tmp/","tmpfs",,
+ "ALL","/etc/init.d/rc3.d/","tmpfs",,
+ "ALL","/etc/init.d/rc5.d/","tmpfs",,
+ "ALL","/var/","tmpfs",,
+ "ALL","/etc/yp.conf","tmpfs",,
+ "ALL","/etc/fstab","tmpfs",,
+ "ALL","/opt/xcat/","tmpfs",,
+ "ALL","/xcatpost/","tmpfs",,
+ "ALL","/root/.ssh/","tmpfs",,
+
+litetree table
+--------------
+
+The litetree table controls where the initial content of the files in the litefile table come from, and the long term content of the ``ro`` files. When a node boots up in statelite mode, it will by default copy all of its tmpfs files from the ``.default`` directory of the root image, for example ``/install/netboot/rhels7.3/x86_64/compute/rootimg/.default``, so there is not required to set up a litetree table. If you decide that you want some of the files pulled from different locations that are different per node, you can use this table.
+
+You can choose to use the defaults and not set up a litetree table.
+
+statelite table
+---------------
+
+The statelite table specifies location on an NFS server where a nodes persistent files are stored. This is done by entering the information into the statelite table.
+
+In the statelite table, the node or nodegroups in the table must be unique; that is a node or group should appear only once in the first column table. This makes sure that only one statelite image can be assigned to a node. An example would be: ::
+
+ "compute",,":/gpfs/state",,
+
+Any nodes in the compute node group will have their state stored in the ``/gpfs/state`` directory on the machine with ```` as its IP address.
+
+When the node boots up, then the value of the ``statemnt`` attribute will be mounted to ``/.statelite/persistent``. The code will then create the following subdirectory ``/.statelite/persistent/``, if there are persistent files that have been added in the litefile table. This directory will be the root of the image for this node's persistent files. By default, xCAT will do a hard NFS mount of the directory. You can change the mount options by setting the mntopts attribute in the statelite table.
+
+Also, to set the ``statemnt`` attribute, you can use variables from xCAT database. It follows the same grammar as the litetree table. For example: ::
+
+ #node,image,statemnt,mntopts,comments,disable
+ "cn1",,"$noderes.nfsserver:/lite/state/$nodetype.profile","soft,timeo=30",,
+
+``Note``: Do not name your persistent storage directory with the node name, as the node name will be added in the directory automatically. If you do, then a directory named ``/state/cn1`` will have its state tree inside ``/state/cn1/cn1``.
+
+Policy
+------
+
+Ensure policies are set up correctly in the Policy Table. When a node boots up, it queries the xCAT database to get the litefile and litetree table information. In order for this to work, the commands (of the same name) must be set in the policy table to allow nodes to request it. This should happen automatically when xCAT is installed, but you may want to verify that the following lines are in the policy table: ::
+
+ chdef -t policy -o 4.7 commands=litefile rule=allow
+ chdef -t policy -o 4.8 commands=litetree rule=allow
+
+noderes
+-------
+
+``noderes.nfsserver`` attribute can be set for the NFSroot server. If this is not set, then the default is the Management Node.
+
+``noderes.nfsdir`` can be set. If this is not set, the the default is ``/install``
+
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/hierarchy_support.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/hierarchy_support.rst
new file mode 100644
index 000000000..449533bfe
--- /dev/null
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/hierarchy_support.rst
@@ -0,0 +1,43 @@
+Hierarchy Support
+-----------------
+
+In the ``statelite`` environment, the service node needs to provide NFS service for the compute node with ``statelite``, the service nodes must to be setup with diskfull installation.
+
+Setup the diskfull service node
+```````````````````````````````
+
+#. Setup one diskfull service node at first.
+
+#. Since statelite is a kind of NFS-hybrid method, you should remove the installloc attribute in the site table. This makes sure that the service node does not mount the ``/install`` directory from the management node on the service node.
+
+Generate the statelite image
+````````````````````````````
+
+To generate the statelite image for your own profile follow instructions in :doc:`Customize your statelite osimage <./provision_statelite>`.
+
+``NOTE``: if the NFS directories defined in the litetree table are on the service node, it is better to setup the NFS directories in the service node following the chapter.
+
+Sync the ``/install`` directory
+```````````````````````````````
+
+The command prsync is used to sync the ``/install`` directory to the service nodes.
+
+Run the following: ::
+
+ cd /
+ prsync install :/
+
+```` is the hostname of the service node you defined.
+
+Since the ``prsync`` command will sync all the contents in the ``/install`` directory to the service nodes, the first time will take a long time. But after the first time, it will take very short time to sync.
+
+``NOTE``: if you make any changes in the ``/install`` directory on the management node, and the changes can affect the statelite image, you need to sync the ``/install`` directory to the service node again.
+
+Set the boot state to statelite
+```````````````````````````````
+
+You can now deploy the node: ::
+
+ rinstall osimage=rhel5.3-x86_64-statelite-compute
+
+This will create the necessary files in ``/tftpboot`` for the node to boot correctly.
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/index.rst
new file mode 100644
index 000000000..7ae22087e
--- /dev/null
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/index.rst
@@ -0,0 +1,45 @@
+Statelite Installation
+======================
+
+**Overview**
+
+This document details the design and setup for the statelite solution of xCAT. **Statelite** is an intermediate mode between **diskful** and **diskless**.
+
+Statelite provides two kinds of efficient and flexible solutions, most of the OS image can be NFS mounted read-only, or the OS image can be in the ramdisk with tmpfs type. Different from the stateless solution, statelite provides a configurable list of directories and files that can be read-write. These read-write directories and files can be configured to either persist or not persist across reboots.
+
+**Solutions**
+
+There are two solutions: ``NFSROOT-based`` and ``RAMdisk-based``.
+
+#. NFSROOT-based(default):
+ #. rootfstype in the osimage xCAT data objects is left as blank, or set to ``nfs``, the ``NFSROOT-base`` statelite solution will be enabled.
+ #. the ROOTFS is NFS mounted read-only.
+
+#. RAMdisk-based:
+ #. rootfstype in the osimage xCAT data objects is set to ``ramdisk``.
+ #. one image file will be downloaded when the node is booting up, and the file will be extracted to the ramdisk, and used as the ROOTFS.
+
+**Advantages**
+
+``Statelite`` offers the following advantages over xCAT's stateless (RAMdisk) implementation:
+
+#. Some files can be made persistent over reboot. This is useful for license files or database servers where some state is needed. However, you still get the advantage of only having to manage a single image.
+#. Changes to hundreds of machines can take place instantly, and automatically, by updating one main image. In most cases, machines do not need to reboot for these changes to take affect. This is only for the ``NFSROOT-based`` solution.
+#. Ease of administration by being able to lock down an image. Many parts of the image can be read-only, so no modifications can transpire without updating the central image.
+#. Files can be managed in a hierarchical manner. For example: Suppose you have a machine that is in one lab in Tokyo and another in London. You could set table values for those machines in the xCAT database to allow machines to sync from different places based on their attributes. This allows you to have one base image with multiple sources of file overlay.
+#. Ideal for virtualization. In a virtual environment, you may not want a disk image (neither stateless nor stateful) on every virtual node as it consumes memory and disk. Virtualizing with the statelite approach allows for images to be smaller, easier to manage, use less disk, less memory, and more flexible.
+
+**Disadvantages**
+
+However, there're still several disadvantages, especially for the ``NFSROOT-based`` solution.
+
+#. NFS Root requires more network traffic to run as the majority of the disk image runs over NFS. This may depend on your workload, but can be minimized. Since the bulk of the image is read-only, NFS caching on the server helps minimize the disk access on the server, and NFS caching on the client helps reduce the network traffic.
+#. NFS Root can be complex to set up. As more files are created in different places, there are greater chances for failures. This flexibility is also one of the great virtues of Statelite. The image can work in nearly any environment.
+
+.. toctree::
+ :maxdepth: 2
+
+ config_statelite.rst
+ provision_statelite.rst
+ hierarchy_support.rst
+ advanced_features.rst
diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/provision_statelite.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/provision_statelite.rst
new file mode 100644
index 000000000..240aed782
--- /dev/null
+++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/statelite/provision_statelite.rst
@@ -0,0 +1,257 @@
+Provision statelite
+===================
+
+Show current provisioning method
+--------------------------------
+
+To determine the current provisioning method of your node, execute: ::
+
+ lsdef -i provmethod
+
+``Note``: syncfiles is not currently supported for statelite nodes.
+
+Generate default statelite image from distoro media
+---------------------------------------------------
+
+In this example, we are going to create a new compute node osimage for ``rhels7.3`` on ``ppc64le``. We will set up a test directory structure that we can use to create our image. Later we can just move that into production.
+
+Use the copycds command to copy the appropriate iso image into the ``/install`` directory for xCAT. The copycds commands will copy the contents to ``/install/rhels7.3/``. For example: ::
+
+ copycds RHEL-7.3-20161019.0-Server-ppc64le-dvd1.iso
+
+The contents are copied into ``/install/rhels7.3/ppc64le/``
+
+The configuration files pointed to by the attributes are the defaults shipped with xCAT. We will want to copy them to the ``/install`` directory, in our example the ``/install/test`` directory and modify them as needed.
+
+Statelite Directory Structure
+-----------------------------
+
+Each statelite image will have the following directories: ::
+
+ /.statelite/tmpfs/
+ /.default/
+ /etc/init.d/statelite
+
+All files with link options, which are symbolic links, will link to ``/.statelite/tmpfs``.
+
+tmpfs files that are persistent link to ``/.statelite/persistent//``, ``/.statelite/persistent/`` is the directory where the node's individual storage will be mounted to.
+
+``/.default`` is where default files will be copied to from the image to tmpfs if the files are not found in the litetree hierarchy.
+
+Customize your statelite osimage
+--------------------------------
+
+Create the osimage definition
+`````````````````````````````
+
+Setup your osimage/linuximage tables with new test image name, osvers,osarch, and paths to all the files for building and installing the node. So using the above generated ``rhels7.3-ppc64le-statelite-compute`` as an example, I am going to create my own image. The value for the provisioning method attribute is osimage in my example.::
+
+ mkdef rhels7.3-custom-statelite -u profile=compute provmethod=statelite
+
+Check your setup: ::
+
+ lsdef -t osimage rhels7.3-custom-statelite
+
+Customize the paths to your ``pkglist``, ``syncfile``, etc to the osimage definition, that you require. ``Note``, if you modify the files on the ``/opt/xcat/share/...`` path then copy to the appropriate ``/install/custom/...`` path. Remember all files must be under ``/install`` if using hierarchy (service nodes).
+
+Copy the sample ``*list`` files and modify as needed: ::
+
+ mkdir -p /install/test/netboot/rh
+ cp -p /opt/xcat/share/xcat/netboot/rh/compute.rhels7.ppc64le.pkglist \
+ /install/test/netboot/rh/compute.rhels7.ppc64le.pkglist
+ cp -p /opt/xcat/share/xcat/netboot/rh/compute.exlist \
+ /install/test/netboot/rh/compute.exlist
+
+ chdef -t osimage -o rhels7.3-custom-statelite \
+ pkgdir=/install/rhels7.3/ppc64le \
+ pkglist=/install/test/netboot/rh/compute.rhels7.ppc64le.pkglist \
+ exlist=/install/test/netboot/rh/compute.exlist \
+ rootimgdir=/install/test/netboot/rh/ppc64le/compute
+
+Setup pkglists
+``````````````
+
+In the above example, you have defined your pkglist to be in ``/install/test/netboot/rh/compute.rhels7.ppc64le.pkglist``.
+
+Edit ``compute.rhels7.ppc64le.pkglist`` and ``compute.exlist`` as needed. ::
+
+ vi /install/test/netboot/rh/compute.rhels7.ppc64le.pkglist
+ vi /install/test/netboot/rh/compute.exlist
+
+Make sure nothing is excluded in compute.exlist that you need.
+
+Install other specific packages
+```````````````````````````````
+
+Make the directory to hold additional rpms to install on the compute node. ::
+
+ mkdir -p /install/test/post/otherpkgs/rh/ppc64le
+
+Now copy all the additional OS rpms you want to install into ``/install/test/post/otherpkgs/rh/ppc64le``.
+
+At first you need to create one text file which contains the complete list of files to include in the repository. The name of the text file is rpms.list and must be in ``/install/test/post/otherpkgs/rh/ppc64le`` directory. Create rpms.list: ::
+
+ cd /install/test/post/otherpkgs/rh/ppc64le
+ ls *.rpm > rpms.list
+
+Then, run the following command to create the repodata for the newly-added packages: ::
+
+ createrepo -i rpms.list /install/test/post/otherpkgs/rh/ppc64le
+
+The ``createrepo`` command with -i rpms.list option will create the repository for the rpm packages listed in the rpms.list file. It won't destroy or affect the rpm packages that are in the same directory, but have been included into another repository.
+
+Or, if you create a sub-directory to contain the rpm packages, for example, named other in ``/install/test/post/otherpkgs/rh/ppc64le``. Run the following command to create repodata for the directory ``/install/test/post/otherpkgs/rh/ppc64le``. ::
+
+ createrepo /install/post/otherpkgs///**other**
+
+``Note``: Replace other with your real directory name.
+
+Define the location of of your otherpkgs in your osimage: ::
+
+ chdef -t osimage -o rhels7.3-custom-statelite \
+ otherpkgdir=/install/test/post/otherpkgs/rh/ppc64le \
+ otherpkglist=/install/test/netboot/rh/compute.otherpkgs.pkglist
+
+There are examples under ``/opt/xcat/share/xcat/netboot/`` of typical ``*otherpkgs.pkglist`` files that can used as an example of the format.
+
+Set up Post scripts for statelite
+`````````````````````````````````
+
+The rules to create post install scripts for statelite image is the same as the rules for stateless/diskless install images.
+
+There're two kinds of postscripts for statelite (also for stateless/diskless).
+
+The first kind of postscript is executed at genimage time, it is executed again the image itself on the MN . It was setup in The postinstall file section before the image was generated.
+
+The second kind of postscript is the script that runs on the node during node deployment time. During init.d timeframe, ``/etc/init.d/gettyset`` calls ``/opt/xcat/xcatdsklspost`` that is in the image. This script uses wget to get all the postscripts under ``mn:/install/postscripts`` and copy them to the ``/xcatpost`` directory on the node. It uses openssl or stunnel to connect to the xcatd on the mn to get all the postscript names for the node from the postscripts table. It then runs the postscripts for the node.
+
+Setting up postinstall files (optional)
+```````````````````````````````````````
+
+Using postinstall files is optional. There are some examples shipped in ``/opt/xcat/share/xcat/netboot/``.
+
+If you define a postinstall file to be used by genimage, then ::
+
+ chdef -t osimage -o rhels7.3-custom-statelite postinstall=.
+
+Generate the image
+------------------
+
+Run the following command to generate the image based on your osimage named ``rhels7.3-custom-statelite``. Adjust your genimage parameters to your architecture and network settings. See man genimage. ::
+
+ genimage rhels7.3-custom-statelite
+
+The genimage will create a default ``/etc/fstab`` in the image, if you want to change the defaults, on the management node, edit fstab in the image: ::
+
+ cd /install/netboot/rhels7/ppc64le/compute/rootimg/etc
+ cp fstab fstab.ORIG
+ vi fstab
+
+``Note``: adding ``/tmp`` and ``/var/tmp`` to ``/etc/fstab`` is optional, most installations can simply use ``/``. It was documented her to show that you can restrict the size of filesystems, if you need to. The indicated values are just and example, and you may need much bigger filessystems, if running applications like OpenMPI.
+
+Pack the image
+--------------
+
+Execute liteimg ::
+
+ liteimg rhels7.3-custom-statelite
+
+Boot the statelite node
+-----------------------
+
+Execute ``rinstall`` ::
+
+ rinstall node1 osimage=rhels7.3-custom-statelite
+
+Switch to the RAMdisk based solution
+------------------------------------
+
+It is optional, if you want to use RAMdisk-based solution, follow this section.
+
+Set rootfstype
+``````````````
+
+If you want the node to boot with a RAMdisk-based image instead of the NFS-base image, set the rootfstype attribute for the osimage to ``ramdisk``. For example: ::
+
+ chdef -t osimage -o rhels7.3-custom-statelite rootfstype=ramdisk
+
+Run liteimg command
+```````````````````
+
+The ``liteimg`` command will modify your statelite image (the image that ``genimage`` just created) by creating a series of links. Once you are satisfied with your image contains what you want it to, run ``liteimg ``: ::
+
+ liteimg rhels7.3-custom-statelite
+
+For files with link options, the ``liteimg`` command creates two levels of indirection, so that files can be modified while in their image state as well as during runtime. For example, a file like ``$imageroot/etc/ntp.conf`` with link option in the litefile table, will have the following operations done to it:
+
+In our case ``$imageroot`` is ``/install/netboot/rhels5.3/x86_64/compute/rootimg``
+
+The ``liteimg`` script, for example, does the following to create the two levels of indirection. ::
+
+ mkdir -p $imageroot/.default/etc
+ mkdir -p $imageroot/.statelite/tmpfs/etc
+ mv $imgroot/etc/ntp.conf $imgroot/.default/etc
+ cd $imgroot/.statelite/tmpfs/etc
+ ln -sf ../../../.default/etc/ntp.conf .
+ cd $imgroot/etc
+ ln -sf ../.statelite/tmpfs/etc/ntp.conf .
+
+When finished, the original file will reside in ``$imgroot/.default/etc/ntp.conf``. ``$imgroot/etc/ntp.conf`` will link to ``$imgroot/.statelite/tmpfs/etc/ntp.conf`` which will in turn link to ``$imgroot/.default/etc/ntp.conf``.
+
+But for files without link options, the ``liteimg`` command only creates clones in ``$imageroot/.default/`` directory, when the node is booting up, the mount command with ``--bind`` option will get the corresponding files from the ``litetree`` places or ``.default`` directory to the sysroot directory.
+
+``Note``: If you make any changes to your litefile table after running ``liteimg`` then you will need to rerun ``liteimg`` again. This is because files and directories need to have the two levels of redirects created.
+
+Boot the statelite node
+```````````````````````
+
+Make sure you have set up all the attributes in your node definitions correctly following the node installation instructions corresponding to your hardware:
+
+You can now deploy the node by running the following commmands: ::
+
+ rinstall
+
+You can then use ``rcons`` or ``wcons`` to watch the node boot up.
+
+Adding/updating software and files for the running nodes
+--------------------------------------------------------
+
+Make changes to the files which configured in the litefile table
+````````````````````````````````````````````````````````````````
+
+During the preparation or booting of node against statelite mode, there are specific processes to handle the files which configured in the litefile table. The following operations need to be done after made changes to the statelite files.
+
+#. Run ``liteimg`` against the osimage and reboot the node : Added, removed or changed the entries in the litefile table.
+
+#. Reboot the node :
+
+ * Changed the location directory in the litetree table.
+ * Changed the location directory in the statelite table.
+ * Changed, removed the original files in the location of litetree or statelite table.
+
+``Note``: Thing should not do:
+
+ * When there are node running on the nfs-based statelite osimage, do not run the packimage against this osimage.
+
+Make changes to the common files
+````````````````````````````````
+
+Because most of system files for the nodes are NFS mounted on the Management Node with read-only option, installing or updating software and files should be done to the image. The image is located under ``/install/netboot////rootimg`` directory.
+
+To install or update an rpm, do the following:
+
+ * Install the rpm package into rootimg ::
+
+ rpm --root /install/netboot////rootimg -ivh rpm_name
+
+ * Restart the software application on the nodes ::
+
+ xdsh
+
+It is recommended to follow the section (Adding third party softeware) to add the new rpm to the otherpkgs.pkglist file, so that the rpm will get installed into the new image next time the image is rebuilt.
+
+``Note``: The newly added rpms are not shown when running ``rpm -qa`` on the nodes although the rpm is installed. It will shown next time the node is rebooted.
+
+To create or update a file for the nodes, just modify the file in the image and restart any application that uses the file.
+
+For the ramdisk-based node, you need to reboot the node to take the changes.
diff --git a/docs/source/guides/admin-guides/references/man1/pping.1.rst b/docs/source/guides/admin-guides/references/man1/pping.1.rst
index 3d0763566..92e680380 100644
--- a/docs/source/guides/admin-guides/references/man1/pping.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/pping.1.rst
@@ -25,7 +25,7 @@ DESCRIPTION
\ **pping**\ is a utility used to ping a list of nodes in parallel.
\ **pping**\ will return an unsorted list of nodes with a ping or noping status.
-\ **pping**\ front-ends nmap or fping if available.
+\ **pping**\ front-ends \ **nmap**\ or \ **fping**\ if available.
This command does not support the xcatd client/server communication. It must be run on the management node.
@@ -48,7 +48,7 @@ OPTIONS
\ **-f | -**\ **-use_fping**\
- Use fping instead of nmap
+ Use \ **fping**\ instead of \ **nmap**\
diff --git a/docs/source/guides/admin-guides/references/man1/prsync.1.rst b/docs/source/guides/admin-guides/references/man1/prsync.1.rst
index 352f4db03..7bee4871f 100644
--- a/docs/source/guides/admin-guides/references/man1/prsync.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/prsync.1.rst
@@ -21,7 +21,7 @@ prsync - parallel rsync
\ **prsync**\ \ *filename*\ [\ *filename*\ \ *...*\ ] \ *noderange:destinationdirectory*\
-\ **prsync**\ [\ **-o**\ \ *rsync options*\ ] [\ **-f**\ \ *fanout*\ ] [\ *filename*\ \ *filename*\ \ *...*\ ] [\ *directory*\ \ *directory*\ \ *...*\ ]
+\ **prsync**\ [\ **-o**\ \ *rsyncopts*\ ] [\ **-f**\ \ *fanout*\ ] [\ *filename*\ \ *filename*\ \ *...*\ ] [\ *directory*\ \ *directory*\ \ *...*\ ]
\ *noderange:destinationdirectory*\
\ **prsync**\ {\ **-h | -**\ **-help | -v | -**\ **-version**\ }
@@ -32,11 +32,9 @@ prsync - parallel rsync
*******************
-\ **prsync**\ is a front-end to rsync for a single or range of nodes and/or
-groups in parallel.
+\ **prsync**\ is a front-end to rsync for a single or range of nodes and/or groups in parallel.
-Note: this command does not support the xcatd client/server communication and therefore must be run on the management node. It does not support hierarchy, use xdcp -F to run rsync from the
-management node to the compute node via a service node
+Note: this command does not support the xcatd client/server communication and therefore must be run on the management node. It does not support hierarchy, use \ **xdcp -F**\ to run rsync from the management node to the compute node via a service node
\ **prsync**\ is NOT multicast, but is parallel unicasts.
@@ -47,7 +45,7 @@ management node to the compute node via a service node
-\ *rsyncopts*\
+\ **-o**\ \ *rsyncopts*\
rsync options. See \ **rsync(1)**\ .
@@ -55,8 +53,7 @@ management node to the compute node via a service node
\ **-f**\ \ *fanout*\
- Specifies a fanout value for the maximum number of concur-
- rently executing remote shell processes.
+ Specifies a fanout value for the maximum number of concurrently executing remote shell processes.
diff --git a/docs/source/guides/admin-guides/references/man1/rinv.1.rst b/docs/source/guides/admin-guides/references/man1/rinv.1.rst
index cb7675e8d..bc796df6a 100644
--- a/docs/source/guides/admin-guides/references/man1/rinv.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/rinv.1.rst
@@ -25,7 +25,7 @@ BMC/MPA specific:
=================
-\ **rinv**\ \ *noderange*\ {\ **pci | model | serial | asset | vpd | mprom | deviceid | guid | firm | diag | bios | mparom | mac | all**\ }
+\ **rinv**\ \ *noderange*\ {\ **pci | model | serial | asset | vpd | mprom | deviceid | guid | firm | diag | dimm | bios | mparom | mac | all**\ }
OpenPOWER server specific:
@@ -65,6 +65,13 @@ VMware specific:
\ **rinv**\ \ *noderange*\ [\ **-t**\ ]
+pdu specific:
+=============
+
+
+\ **rinv**\ \ *noderange*\
+
+
zVM specific:
=============
diff --git a/docs/source/guides/admin-guides/references/man1/rpower.1.rst b/docs/source/guides/admin-guides/references/man1/rpower.1.rst
index 86239842f..9eda41449 100644
--- a/docs/source/guides/admin-guides/references/man1/rpower.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/rpower.1.rst
@@ -29,6 +29,8 @@ BMC (using IPMI) specific:
\ **rpower**\ \ *noderange*\ [\ **on | off | softoff | reset | boot | stat | state | status | wake | suspend**\ [\ **-w**\ \ *timeout*\ ] [\ **-o**\ ] [\ **-r**\ ]]
+\ **rpower**\ \ *noderange*\ [\ **pduon | pduoff | pdustat**\ ]
+
PPC (with IVM or HMC) specific:
===============================
@@ -102,6 +104,13 @@ docker specific:
\ **rpower**\ \ *noderange*\ [\ **start | stop | restart | pause | unpause | state**\ ]
+pdu specific:
+=============
+
+
+\ **rpower**\ \ *noderange*\ [\ **stat | off | on**\ ]
+
+
***********
DESCRIPTION
diff --git a/docs/source/guides/admin-guides/references/man1/rvitals.1.rst b/docs/source/guides/admin-guides/references/man1/rvitals.1.rst
index 74cb1bc39..55d29d53b 100644
--- a/docs/source/guides/admin-guides/references/man1/rvitals.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/rvitals.1.rst
@@ -142,14 +142,16 @@ Processor for a single or range of nodes and groups.
\ **powertime**\
Retrieves total power uptime. This value only increases, unless
- the Service Processor flash gets updated.
+ the Service Processor flash gets updated. This option is not valid
+ for x86 architecture systems.
\ **reboot**\
Retrieves total number of reboots. This value only increases,
- unless the Service Processor flash gets updated.
+ unless the Service Processor flash gets updated. This option
+ is not valid for x86 architecture systems.
diff --git a/docs/source/guides/admin-guides/references/man1/xdsh.1.rst b/docs/source/guides/admin-guides/references/man1/xdsh.1.rst
index fb84e802b..51f71f74d 100644
--- a/docs/source/guides/admin-guides/references/man1/xdsh.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/xdsh.1.rst
@@ -527,8 +527,7 @@ running commands, are terminated (SIGTERM).
\ **DSH_TIMEOUT**\
Specifies the time, in seconds, to wait for output from
- each remote target. This variable is overridden by the \ **-t**\
- flag.
+ each remote target. This variable is overridden by the \ **-t**\ flag.
diff --git a/docs/source/guides/admin-guides/references/man1/xdshbak.1.rst b/docs/source/guides/admin-guides/references/man1/xdshbak.1.rst
index 91326fd13..aa9e3a74e 100644
--- a/docs/source/guides/admin-guides/references/man1/xdshbak.1.rst
+++ b/docs/source/guides/admin-guides/references/man1/xdshbak.1.rst
@@ -19,7 +19,7 @@ NAME
****************
-\ **xdshbak**\ [\ **-c**\ | \ **-x**\ | \ **-h**\ | \ **-q**\ ]
+\ **xdshbak**\ [\ **-c**\ | \ **-x**\ [ \ **-b**\ ] | \ **-h**\ | \ **-q**\ ]
***********
@@ -93,6 +93,9 @@ the output by hostname for easier viewing:
.
+If the \ **-b**\ flag is specified in addition to \ **-x**\ , the hostname at the beginning
+of each line is stripped.
+
Standard Error
==============
@@ -109,6 +112,13 @@ OPTIONS
+\ **-b**\
+
+ Strip the host prefix from the beginning of the lines. This only
+ works with the \ **-x**\ option.
+
+
+
\ **-c**\
If the output from multiple nodes is identical it will be collapsed
diff --git a/docs/source/guides/admin-guides/references/man5/pdu.5.rst b/docs/source/guides/admin-guides/references/man5/pdu.5.rst
new file mode 100644
index 000000000..a77ea0b32
--- /dev/null
+++ b/docs/source/guides/admin-guides/references/man5/pdu.5.rst
@@ -0,0 +1,82 @@
+
+#####
+pdu.5
+#####
+
+.. highlight:: perl
+
+
+****
+NAME
+****
+
+
+\ **pdu**\ - a table in the xCAT database.
+
+
+********
+SYNOPSIS
+********
+
+
+\ **pdu Attributes:**\ \ *pdu*\ , \ *machinetype*\ , \ *modelnum*\ , \ *serialnum*\ , \ *outletCount*\ , \ *comments*\ , \ *disable*\
+
+
+***********
+DESCRIPTION
+***********
+
+
+Parameters to use when interrogating pdus
+
+
+***************
+pdu Attributes:
+***************
+
+
+
+\ **pdu**\
+
+ The hostname/address of the pdu to which the settings apply
+
+
+
+\ **machinetype**\
+
+ The pdu machine type
+
+
+
+\ **modelnum**\
+
+ The pdu model number
+
+
+
+\ **serialnum**\
+
+ The pdu serial number
+
+
+
+\ **outletCount**\
+
+
+
+\ **comments**\
+
+
+
+\ **disable**\
+
+
+
+
+********
+SEE ALSO
+********
+
+
+\ **nodels(1)**\ , \ **chtab(8)**\ , \ **tabdump(8)**\ , \ **tabedit(8)**\
+
diff --git a/docs/source/guides/admin-guides/references/man5/pduoutlet.5.rst b/docs/source/guides/admin-guides/references/man5/pduoutlet.5.rst
new file mode 100644
index 000000000..cbed931c1
--- /dev/null
+++ b/docs/source/guides/admin-guides/references/man5/pduoutlet.5.rst
@@ -0,0 +1,70 @@
+
+###########
+pduoutlet.5
+###########
+
+.. highlight:: perl
+
+
+****
+NAME
+****
+
+
+\ **pduoutlet**\ - a table in the xCAT database.
+
+
+********
+SYNOPSIS
+********
+
+
+\ **pduoutlet Attributes:**\ \ *node*\ , \ *pdu*\ , \ *comments*\ , \ *disable*\
+
+
+***********
+DESCRIPTION
+***********
+
+
+Contains list of outlet numbers on the pdu each node is connected to.
+
+
+*********************
+pduoutlet Attributes:
+*********************
+
+
+
+\ **node**\
+
+ The node name or group name.
+
+
+
+\ **pdu**\
+
+ a comma-separated list of outlet number for each PDU, ex: pdu1:outlet1,pdu2:outlet1
+
+
+
+\ **comments**\
+
+ Any user-written notes.
+
+
+
+\ **disable**\
+
+ Set to 'yes' or '1' to comment out this row.
+
+
+
+
+********
+SEE ALSO
+********
+
+
+\ **nodels(1)**\ , \ **chtab(8)**\ , \ **tabdump(8)**\ , \ **tabedit(8)**\
+
diff --git a/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst b/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst
index 2e15caff4..e95ece5c8 100644
--- a/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst
+++ b/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst
@@ -585,6 +585,18 @@ passwd(5)|passwd.5
+pdu(5)|pdu.5
+
+ Parameters to use when interrogating pdus
+
+
+
+pduoutlet(5)|pduoutlet.5
+
+ Contains list of outlet numbers on the pdu each node is connected to.
+
+
+
performance(5)|performance.5
Describes the system performance every interval unit of time.
diff --git a/docs/source/guides/admin-guides/references/man7/group.7.rst b/docs/source/guides/admin-guides/references/man7/group.7.rst
index 36f2c82b3..4a9954df5 100644
--- a/docs/source/guides/admin-guides/references/man7/group.7.rst
+++ b/docs/source/guides/admin-guides/references/man7/group.7.rst
@@ -19,7 +19,7 @@ SYNOPSIS
********
-\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
+\ **group Attributes:**\ \ *addkcmdline*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groupname*\ , \ *grouptype*\ , \ *hcp*\ , \ *height*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *membergroups*\ , \ *members*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outletcount*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *wherevals*\ , \ *xcatmaster*\
***********
@@ -435,6 +435,12 @@ group Attributes:
+\ **machinetype**\ (pdu.machinetype)
+
+ The pdu machine type
+
+
+
\ **membergroups**\ (nodegroup.membergroups)
This attribute stores a comma-separated list of nodegroups that this nodegroup refers to. This attribute is only used by PCM.
@@ -501,6 +507,12 @@ group Attributes:
+\ **modelnum**\ (pdu.modelnum)
+
+ The pdu model number
+
+
+
\ **monserver**\ (noderes.monserver)
The monitoring aggregation point for this node. The format is "x,y" where x is the ip address as known by the management node and y is the ip address as known by the node.
@@ -695,6 +707,12 @@ group Attributes:
+\ **outletcount**\ (pdu.outletcount)
+
+ The pdu outlet count
+
+
+
\ **parent**\ (ppc.parent)
For LPARs: the CEC; for FSPs: the CEC; for CEC: the frame (if one exists); for BPA: the frame; for frame: the building block number (which consists 1 or more service nodes and compute/storage nodes that are serviced by them - optional).
@@ -749,6 +767,12 @@ group Attributes:
+\ **pdu**\ (pduoutlet.pdu)
+
+ a comma-separated list of outlet number for each PDU, ex: pdu1:outlet1,pdu2:outlet1
+
+
+
\ **postbootscripts**\ (postscripts.postbootscripts)
Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list.
@@ -866,6 +890,12 @@ group Attributes:
+\ **serialnum**\ (pdu.serialnum)
+
+ The pdu serial number
+
+
+
\ **serialport**\ (nodehm.serialport)
The serial port for this node, in the linux numbering style (0=COM1/ttyS0, 1=COM2/ttyS1). For SOL on IBM blades, this is typically 1. For rackmount IBM servers, this is typically 0.
diff --git a/docs/source/guides/admin-guides/references/man7/node.7.rst b/docs/source/guides/admin-guides/references/man7/node.7.rst
index e430a5316..b06375b96 100644
--- a/docs/source/guides/admin-guides/references/man7/node.7.rst
+++ b/docs/source/guides/admin-guides/references/man7/node.7.rst
@@ -19,7 +19,7 @@ SYNOPSIS
********
-\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
+\ **node Attributes:**\ \ *addkcmdline*\ , \ *appstatus*\ , \ *appstatustime*\ , \ *arch*\ , \ *authdomain*\ , \ *bmc*\ , \ *bmcpassword*\ , \ *bmcport*\ , \ *bmcusername*\ , \ *bmcvlantag*\ , \ *cfgmgr*\ , \ *cfgmgtroles*\ , \ *cfgserver*\ , \ *chain*\ , \ *chassis*\ , \ *cmdmapping*\ , \ *cons*\ , \ *conserver*\ , \ *consoleondemand*\ , \ *cpucount*\ , \ *cputype*\ , \ *currchain*\ , \ *currstate*\ , \ *dhcpinterfaces*\ , \ *disksize*\ , \ *displayname*\ , \ *dockercpus*\ , \ *dockerflag*\ , \ *dockerhost*\ , \ *dockermemory*\ , \ *dockernics*\ , \ *domainadminpassword*\ , \ *domainadminuser*\ , \ *domaintype*\ , \ *getmac*\ , \ *groups*\ , \ *hcp*\ , \ *height*\ , \ *hidden*\ , \ *hostcluster*\ , \ *hostinterface*\ , \ *hostmanager*\ , \ *hostnames*\ , \ *hosttype*\ , \ *hwtype*\ , \ *id*\ , \ *initrd*\ , \ *installnic*\ , \ *interface*\ , \ *ip*\ , \ *iscsipassword*\ , \ *iscsiserver*\ , \ *iscsitarget*\ , \ *iscsiuserid*\ , \ *kcmdline*\ , \ *kernel*\ , \ *linkports*\ , \ *mac*\ , \ *machinetype*\ , \ *memory*\ , \ *mgt*\ , \ *micbridge*\ , \ *michost*\ , \ *micid*\ , \ *miconboot*\ , \ *micpowermgt*\ , \ *micvlog*\ , \ *migrationdest*\ , \ *modelnum*\ , \ *monserver*\ , \ *mpa*\ , \ *mtm*\ , \ *nameservers*\ , \ *netboot*\ , \ *nfsdir*\ , \ *nfsserver*\ , \ *nicaliases*\ , \ *niccustomscripts*\ , \ *nicdevices*\ , \ *nicextraparams*\ , \ *nichostnameprefixes*\ , \ *nichostnamesuffixes*\ , \ *nicips*\ , \ *nicnetworks*\ , \ *nicsadapter*\ , \ *nictypes*\ , \ *nimserver*\ , \ *node*\ , \ *nodetype*\ , \ *ondiscover*\ , \ *os*\ , \ *osvolume*\ , \ *otherinterfaces*\ , \ *ou*\ , \ *outletcount*\ , \ *parent*\ , \ *passwd.HMC*\ , \ *passwd.admin*\ , \ *passwd.celogin*\ , \ *passwd.general*\ , \ *passwd.hscroot*\ , \ *password*\ , \ *pdu*\ , \ *postbootscripts*\ , \ *postscripts*\ , \ *power*\ , \ *pprofile*\ , \ *prescripts-begin*\ , \ *prescripts-end*\ , \ *primarynic*\ , \ *primarysn*\ , \ *productkey*\ , \ *profile*\ , \ *protocol*\ , \ *provmethod*\ , \ *rack*\ , \ *room*\ , \ *routenames*\ , \ *serial*\ , \ *serialflow*\ , \ *serialnum*\ , \ *serialport*\ , \ *serialspeed*\ , \ *servicenode*\ , \ *setupconserver*\ , \ *setupdhcp*\ , \ *setupftp*\ , \ *setupipforward*\ , \ *setupldap*\ , \ *setupnameserver*\ , \ *setupnfs*\ , \ *setupnim*\ , \ *setupntp*\ , \ *setupproxydhcp*\ , \ *setuptftp*\ , \ *sfp*\ , \ *side*\ , \ *slot*\ , \ *slotid*\ , \ *slots*\ , \ *snmpauth*\ , \ *snmppassword*\ , \ *snmpprivacy*\ , \ *snmpusername*\ , \ *snmpversion*\ , \ *status*\ , \ *statustime*\ , \ *storagcontroller*\ , \ *storagetype*\ , \ *supernode*\ , \ *supportedarchs*\ , \ *supportproxydhcp*\ , \ *switch*\ , \ *switchinterface*\ , \ *switchport*\ , \ *switchtype*\ , \ *switchvlan*\ , \ *syslog*\ , \ *termport*\ , \ *termserver*\ , \ *tftpdir*\ , \ *tftpserver*\ , \ *unit*\ , \ *updatestatus*\ , \ *updatestatustime*\ , \ *urlpath*\ , \ *usercomment*\ , \ *userid*\ , \ *username*\ , \ *vmbeacon*\ , \ *vmbootorder*\ , \ *vmcfgstore*\ , \ *vmcluster*\ , \ *vmcpus*\ , \ *vmhost*\ , \ *vmmanager*\ , \ *vmmaster*\ , \ *vmmemory*\ , \ *vmnicnicmodel*\ , \ *vmnics*\ , \ *vmothersetting*\ , \ *vmphyslots*\ , \ *vmstorage*\ , \ *vmstoragecache*\ , \ *vmstorageformat*\ , \ *vmstoragemodel*\ , \ *vmtextconsole*\ , \ *vmvirtflags*\ , \ *vmvncport*\ , \ *webport*\ , \ *xcatmaster*\ , \ *zonename*\
***********
@@ -447,6 +447,12 @@ node Attributes:
+\ **machinetype**\ (pdu.machinetype)
+
+ The pdu machine type
+
+
+
\ **memory**\ (hwinv.memory)
The size of the memory for the node in MB.
@@ -501,6 +507,12 @@ node Attributes:
+\ **modelnum**\ (pdu.modelnum)
+
+ The pdu model number
+
+
+
\ **monserver**\ (noderes.monserver)
The monitoring aggregation point for this node. The format is "x,y" where x is the ip address as known by the management node and y is the ip address as known by the node.
@@ -701,6 +713,12 @@ node Attributes:
+\ **outletcount**\ (pdu.outletcount)
+
+ The pdu outlet count
+
+
+
\ **parent**\ (ppc.parent)
For LPARs: the CEC; for FSPs: the CEC; for CEC: the frame (if one exists); for BPA: the frame; for frame: the building block number (which consists 1 or more service nodes and compute/storage nodes that are serviced by them - optional).
@@ -755,6 +773,12 @@ node Attributes:
+\ **pdu**\ (pduoutlet.pdu)
+
+ a comma-separated list of outlet number for each PDU, ex: pdu1:outlet1,pdu2:outlet1
+
+
+
\ **postbootscripts**\ (postscripts.postbootscripts)
Comma separated list of scripts that should be run on this node after diskful installation or diskless boot. Each script can take zero or more parameters. For example: "script1 p1 p2,script2,...". On AIX these scripts are run during the processing of /etc/inittab. On Linux they are run at the init.d time. xCAT automatically adds the scripts in the xcatdefaults.postbootscripts attribute to run first in the list.
@@ -878,6 +902,12 @@ node Attributes:
+\ **serialnum**\ (pdu.serialnum)
+
+ The pdu serial number
+
+
+
\ **serialport**\ (nodehm.serialport)
The serial port for this node, in the linux numbering style (0=COM1/ttyS0, 1=COM2/ttyS1). For SOL on IBM blades, this is typically 1. For rackmount IBM servers, this is typically 0.
diff --git a/docs/source/guides/admin-guides/references/man8/copycds.8.rst b/docs/source/guides/admin-guides/references/man8/copycds.8.rst
index a5ba210ec..37c399113 100644
--- a/docs/source/guides/admin-guides/references/man8/copycds.8.rst
+++ b/docs/source/guides/admin-guides/references/man8/copycds.8.rst
@@ -35,7 +35,7 @@ The \ **copycds**\ command copies all contents of Distribution DVDs/ISOs or Ser
You can specify \ **-i**\ or \ **-**\ **-inspection**\ option to check whether the DVDs/ISOs can be recognized by xCAT. If recognized, the distribution name, architecture and the disc no (the disc sequence number of DVDs/ISOs in multi-disk distribution) of the DVD/ISO is displayed. If xCAT doesn't recognize the DVD/ISO, you must manually specify the distro name and architecture using the \ **-n**\ and \ **-a**\ options. This is sometimes the case for distros that have very recently been released, and the xCAT code hasn't been updated for it yet.
-You can get xCAT to recognize new DVDs/ISOs by adding them to /opt/xcat/lib/perl/xCAT/data/discinfo.pm and reloading xcatd (\ **service xcatd reload**\ ).
+You can get xCAT to recognize new DVDs/ISOs by adding them to /opt/xcat/lib/perl/xCAT/data/discinfo.pm (the key of the hash is the first line of .discinfo) and reloading xcatd (\ **service xcatd reload**\ ).
*******
diff --git a/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst b/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst
index 28221da31..19ae43ea6 100644
--- a/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst
+++ b/docs/source/guides/admin-guides/references/man8/makeconservercf.8.rst
@@ -19,7 +19,7 @@ SYNOPSIS
********
-\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-d|-**\ **-delete**\ ] \ *noderange*\
+\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-d|-**\ **-delete**\ ] [\ *noderange*\ ]
\ **makeconservercf**\ [\ **-V|-**\ **-verbose**\ ] [\ **-l|-**\ **-local**\ ] [\ *noderange*\ ]
@@ -36,14 +36,16 @@ DESCRIPTION
The \ **makeconservercf**\ command will write out the /etc/conserver.cf, using information from the nodehm table
-and related tables (e.g. mp, ipmi, ppc). Normally, \ **makeconservercf**\ will write all nodes to the conserver.cf
-file. If a noderange is specified, it will write on those nodes to the file. In either case, if a node
+and related tables (e.g. mp, ipmi, ppc). Normally, \ **makeconservercf**\ will write all nodes to the /etc/conserver.cf
+file. If a \ *noderange*\ is specified, it will write only those nodes to the file. In either case, if a node
does not have nodehm.cons set, it will not be written to the file.
+If \ **-d**\ is specified, \ **makeconservercf**\ will remove specified nodes from /etc/conserver.cf file. If \ *noderange*\ is not specified, all xCAT nodes will be removed from /etc/conserver.cf file.
+
In the case of a hierarchical cluster (i.e. one with service nodes) \ **makeconservercf**\ will determine
which nodes will have their consoles accessed from the management node and which from a service node
(based on the nodehm.conserver attribute). The /etc/conserver.cf file will be created accordingly on
-all relevant management/service nodes. If -l is specified, it will only create the local file.
+all relevant management/service nodes. If \ **-l**\ is specified, it will only create the local file.
*******
diff --git a/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst b/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst
index 94b90dec3..8dad0e800 100644
--- a/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst
+++ b/docs/source/guides/admin-guides/references/man8/makeknownhosts.8.rst
@@ -29,7 +29,7 @@ DESCRIPTION
***********
-\ **makeknownhosts**\ Replaces or removes in the known_hosts file in the $ROOTHOME/.ssh directory, the enties for the nodes from the noderange input to the command.
+\ **makeknownhosts**\ Replaces or removes entries for the nodes in the known_hosts file in the $ROOTHOME/.ssh directory.
The known_hosts file entry is built from the shared ssh host key that xCAT distributes to the installed nodes.
HMCs, AMM, switches, etc., where xCAT does not distribute the shared ssh host key, should not be put in the noderange.
@@ -37,7 +37,7 @@ HMCs, AMM, switches, etc., where xCAT does not distribute the shared ssh host ke
To build the known_hosts entry for a node, you are only required to have the node in the database, and name resolution working for the node. You do not have to be able to access the node.
Having this file with correct entries, will avoid the ssh warning when nodes are automatically added to the known_hosts file.
-The file should be distributed using xdcp to all the nodes, if you want node to node communication not to display the warning.
+The file should be distributed using \ **xdcp**\ to all the nodes, if you want node to node communication not to display the warning.
*******
@@ -49,7 +49,7 @@ OPTIONS
\ *noderange*\
A set of comma delimited node names and/or group names.
- See the "noderange" man page for details on supported formats.
+ See the \ *noderange*\ man page for details on supported formats.
diff --git a/docs/source/guides/install-guides/apt/update_xcat.rst b/docs/source/guides/install-guides/apt/update_xcat.rst
index dfa08f6f5..650a03f8e 100644
--- a/docs/source/guides/install-guides/apt/update_xcat.rst
+++ b/docs/source/guides/install-guides/apt/update_xcat.rst
@@ -3,6 +3,6 @@ Updating xCAT
If at a later date you want to update xCAT, first, update the software repositories and then run: ::
apt-get update
- apt-get --only-upgrade install xcat*
+ apt-get -y --only-upgrade install .*xcat.*
diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst
index ec71b0834..a87d50a50 100644
--- a/docs/source/overview/xcat2_release.rst
+++ b/docs/source/overview/xcat2_release.rst
@@ -7,6 +7,38 @@ The following table is a summary of the new operating system (OS), hardware, and
* **SLES** - Suse Linux Enterprise Server
* **UBT** - Ubuntu
+xCAT 2.13.x
+-----------
+
++---------------------------------+---------------+-------------+----------------------------------+
+|xCAT |New OS |New |New Feature |
+|Version | |Hardware | |
++=================================+===============+=============+==================================+
+|| xCAT 2.13.2 | | |- Refine ONIE switch support doc |
+|| 2017/2/24 | | |- Add -p for xcatprobe osdeploy |
+|| | | | to support performance calculate|
+| `2.13.2 Release Notes `_ | | | |
+| | | | |
++---------------------------------+---------------+-------------+----------------------------------+
+|| xCAT 2.13.1 | | |- ONIE switch support |
+|| 2017/1/13 | | |- refine xcatprobe subcommand: |
+|| | | | xcatmn, osdeploy |
+| `2.13.1 Release Notes `_ | | | |
+| | | | |
++---------------------------------+---------------+-------------+----------------------------------+
+|| xCAT 2.13 |- SLES 12.2 | |- update drivers for genesis-base |
+|| 2016/12/09 | | | mlx4-en 3.2-1.0.1.1 |
+|| | | | i40e 1.5.16 |
+| `2.13 Release Notes `_ | | |- statelite image create by copyds|
+| | | | |
++---------------------------------+---------------+-------------+----------------------------------+
+
xCAT 2.12.x
-----------
diff --git a/docs/source/security/2017/20170126_openssl.rst b/docs/source/security/2017/20170126_openssl.rst
new file mode 100644
index 000000000..037ad97cb
--- /dev/null
+++ b/docs/source/security/2017/20170126_openssl.rst
@@ -0,0 +1,27 @@
+2017-01-27 - OpenSSL Vulnerabilities
+====================================
+
+*Jan 26, 2017*, OpenSSL announced the following security advisories: https://www.openssl.org/news/secadv/20170126.txt
+
+
+Advisory CVEs
+-------------
+
+* CVE-2017-3731 - **Truncated packet could crash via OOB read** (Severity:Moderate)
+
+* CVE-2017-3730 - **Bad (EC)DHE parameters cause a client crash** (Severity: Moderate)
+
+* CVE-2017-3732 - **BN_mod_exp may produce incorrect results on x86_64** (Severity: Moderate)
+
+* CVE-2016-7055 - **Montgomery multiplication may produce incorrect results** (Severity: Low)
+
+Please see the security bulletin above for patch, upgrade, or suggested work around information.
+
+Action
+------
+
+xCAT uses OpenSSL for client-server communication but **does not** ship it.
+
+It is highly recommended to keep your OpenSSL levels up-to-date with the indicated versions in the security bulletins to prevent any potential security threats. Obtain the updated software packages from your Operating system distribution channels.
+
+
diff --git a/docs/source/security/2017/index.rst b/docs/source/security/2017/index.rst
new file mode 100644
index 000000000..7c5b764ff
--- /dev/null
+++ b/docs/source/security/2017/index.rst
@@ -0,0 +1,7 @@
+2017 Notices
+============
+
+.. toctree::
+ :maxdepth: 1
+
+ 20170126_openssl.rst
diff --git a/docs/source/security/index.rst b/docs/source/security/index.rst
index 4f9535ac9..911c9ec62 100644
--- a/docs/source/security/index.rst
+++ b/docs/source/security/index.rst
@@ -4,5 +4,6 @@ Security Notices
.. toctree::
:maxdepth: 2
+ 2017/index.rst
2016/index.rst
2015/index.rst
diff --git a/makerpm b/makerpm
index c80ed0edf..4fc2bab20 100755
--- a/makerpm
+++ b/makerpm
@@ -9,7 +9,29 @@
# set -x
-# Make one of the following rpms: perl-xCAT, xCAT-server, xCAT-client, xCAT-IBMhpc, xCAT-rmc, xCAT-UI, xCAT-test
+function xcat_probe_copy {
+ # xCAT-probe uses some functions shipped with xCAT, copying for the following reasons:
+ # 1. make xCAT-probe code be self-contained
+ # 2. do not maintain two files for each script
+ # 3. symbolic link can't work during packaging
+ RPMNAME=${1}
+ if [ $RPMNAME = "xCAT-probe" ]; then
+ mkdir -p ${RPMNAME}/lib/perl/xCAT/
+ files=("NetworkUtils.pm" "GlobalDef.pm" "ServiceNodeUtils.pm")
+ for f in "${files[@]}"; do
+ cp perl-xCAT/xCAT/$f ${RPMNAME}/lib/perl/xCAT/
+ done
+ fi
+}
+
+function xcat_probe_cleanup {
+ RPMNAME=${1}
+ if [ $RPMNAME = "xCAT-probe" ]; then
+ rm -rf ${RPMNAME}/lib/perl/xCAT/
+ fi
+}
+
+# Make the noarch rpms
function makenoarch {
RPMNAME=$1
if [ "$OSNAME" = "AIX" ]; then
@@ -41,17 +63,7 @@ function makenoarch {
fi
fi
- #xcat probe use some functions shipped by xCAT, for below reasons we need to copy files to xCAT-probe directory
- #1 make xcat probe code to be self-contained
- #2 don't maintain two files for each script
- #3 symbolic link can't work during package
- if [ $RPMNAME = "xCAT-probe" ]; then
- CURDIR=$(pwd)
- mkdir -p ${CURDIR}/xCAT-probe/lib/perl/xCAT/
- cp -f ${CURDIR}/perl-xCAT/xCAT/NetworkUtils.pm ${CURDIR}/xCAT-probe/lib/perl/xCAT/
- cp -f ${CURDIR}/perl-xCAT/xCAT/GlobalDef.pm ${CURDIR}/xCAT-probe/lib/perl/xCAT/
- cp -f ${CURDIR}/perl-xCAT/xCAT/ServiceNodeUtils.pm ${CURDIR}/xCAT-probe/lib/perl/xCAT/
- fi
+ xcat_probe_copy ${RPMNAME}
tar --exclude .svn -czf $RPMROOT/SOURCES/$RPMNAME-$VER.tar.gz $RPMNAME
rm -f $RPMROOT/SRPMS/$RPMNAME-$VER*rpm $RPMROOT/RPMS/noarch/$RPMNAME-$VER*rpm
@@ -62,6 +74,9 @@ function makenoarch {
# undo the modifications above to leave the sandbox prestine on the build machine
git checkout xCAT-UI/xCAT-UI.spec
fi
+
+ xcat_probe_cleanup ${RPMNAME}
+
fi
}
@@ -107,6 +122,13 @@ function makexcat {
TARGET="--target $ARCH"
if [ "$RPMNAME" = "xCAT" ]; then
+ cd `dirname $0`/
+ # shipping bmcsetup and getipmi scripts as part of postscripts
+ files=("bmcsetup" "getipmi")
+ for f in "${files[@]}"; do
+ cp "xCAT-genesis-scripts/bin/"$f ${RPMNAME}/postscripts/$f
+ sed -i "s/xcat.genesis.$f/$f/g" ${RPMNAME}/postscripts/$f
+ done
cd `dirname $0`/$RPMNAME
tar --exclude .svn --exclude upflag -czf $RPMROOT/SOURCES/postscripts.tar.gz postscripts LICENSE.html
tar --exclude .svn -czf $RPMROOT/SOURCES/prescripts.tar.gz prescripts
@@ -139,6 +161,12 @@ function makexcat {
echo "Building $RPMROOT/RPMS/$ARCH/$RPMNAME-$VER-snap*.$ARCH.rpm $EMBEDTXT..."
rpmbuild $QUIET -ba $RPMNAME/$RPMNAME.spec $TARGET --define "version $VER" $REL "$EASE"
RC=$?
+ if [ "$RPMNAME" = "xCAT" ]; then
+ files=("bmcsetup" "getipmi")
+ for f in "${files[@]}"; do
+ rm -f `dirname $0`/${RPMNAME}/postscripts/$f
+ done
+ fi
fi
}
diff --git a/perl-xCAT/debian/compat b/perl-xCAT/debian/compat
index 7ed6ff82d..ec635144f 100644
--- a/perl-xCAT/debian/compat
+++ b/perl-xCAT/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/perl-xCAT/debian/control b/perl-xCAT/debian/control
index 5222978b0..cd7877d24 100644
--- a/perl-xCAT/debian/control
+++ b/perl-xCAT/debian/control
@@ -2,12 +2,13 @@ Source: perl-xcat
Section: libs
Priority: extra
Maintainer: xCAT
-Build-Depends: debhelper (>= 5), libsoap-lite-perl, libdbi-perl
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 9), libsoap-lite-perl, libdbi-perl
+Standards-Version: 3.9.4
+Homepage: https://xcat.org/
Package: perl-xcat
Architecture: all
-Depends: ${perl:Depends}
+Depends: ${perl:Depends}
Description: xCAT perl libraries
Provides perl xCAT libraries for core functionality. Required for all xCAT installations.
Includes xCAT::Table, xCAT::NodeRange, among others.
diff --git a/perl-xCAT/debian/rules b/perl-xCAT/debian/rules
index e5a0aa6fd..763812bba 100755
--- a/perl-xCAT/debian/rules
+++ b/perl-xCAT/debian/rules
@@ -9,9 +9,6 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-export DH_COMPAT=5
-
-
build:
dh_testdir
./db2man
@@ -27,7 +24,6 @@ install:
dh_installdirs
dh_install -X".svn"
-
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
@@ -36,7 +32,7 @@ binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
- dh_installchangelogs
+ dh_installchangelogs
dh_installdocs
# dh_installexamples
dh_install -X".svn"
diff --git a/perl-xCAT/perl-xCAT.spec b/perl-xCAT/perl-xCAT.spec
index b1bb44274..86c15f41a 100644
--- a/perl-xCAT/perl-xCAT.spec
+++ b/perl-xCAT/perl-xCAT.spec
@@ -1,7 +1,7 @@
Summary: xCAT perl libraries
Name: perl-xCAT
Version: %{?version:%{version}}%{!?version:%(cat Version)}
-Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
+Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: System Environment/Libraries
@@ -17,8 +17,6 @@ BuildArch: noarch
#Requires: perl-SOAP-Lite
%endif
-Provides: perl-xCAT = %{epoch}:%{version}
-
%description
Provides perl xCAT libraries for core functionality. Required for all xCAT installations.
Includes xCAT::Table, xCAT::NodeRange, among others.
diff --git a/perl-xCAT/xCAT/DBobjUtils.pm b/perl-xCAT/xCAT/DBobjUtils.pm
index 5400fb7c8..31bc6c14a 100755
--- a/perl-xCAT/xCAT/DBobjUtils.pm
+++ b/perl-xCAT/xCAT/DBobjUtils.pm
@@ -424,7 +424,6 @@ sub getobjdefs
# get the key to look for, for this object type
my $objkey = $datatype->{'objkey'};
-
# go through the list of valid attrs
foreach my $this_attr (@{ $datatype->{'attrs'} }) {
my $ent;
@@ -487,7 +486,6 @@ sub getobjdefs
my $intabhash = 0;
my $notsearched = 0;
foreach my $lookup_attr (keys %{ $tabentry{'lookup_attrs'} }) {
-
# Check whether the attribute is already in %tabhash
# The %tabhash is for performance considerations
if (($lookup_attr eq 'node') && ($objtype eq 'node')) {
@@ -513,7 +511,6 @@ sub getobjdefs
# Not in tabhash,
# Need to lookup the table
if ($intabhash == 0 && $notsearched == 1) {
-
# look up attr values
my @rows = xCAT::DBobjUtils->getDBtable($lookup_table);
if (@rows) {
@@ -2502,6 +2499,7 @@ sub judge_node
Arguments:
nicsattr value, like niccsips=eth0!1.1.1.1|2.1.1.1,eth1!3.1.1.1|4.1.1.1
+ node name, like frame10node10
nicnames: only return the value for specific nics, like "eth0,eth1"
Returns:
expanded format, like:
@@ -2524,8 +2522,8 @@ sub expandnicsattr()
if (($nicstr) && ($nicstr =~ /xCAT::/)) {
$nicstr = shift;
}
+ my $node = shift;
my $nicnames = shift;
-
my $ret;
$nicstr =~ /^(.*?)=(.*?)$/;
@@ -2547,7 +2545,6 @@ sub expandnicsattr()
#$nicval Value: node(d+)|eth0!192.1.1.($1+10)
if (($nicval) && ($nicval =~ /\|/)) {
my ($str1, $str2) = split('\|', $nicval);
-
#$nivval Value: eth0!192.1.1.($1+10)
$nicval = $str2;
}
@@ -2576,6 +2573,7 @@ sub expandnicsattr()
}
}
+ $nicv[1]= xCAT::Table::transRegexAttrs($node, $nicv[1]);
# ignore the line that does not have nicname or value
if ($nicv[0] && $nicv[1]) {
$ret .= " $nicattr.$nicv[0]=$nicv[1]\n";
@@ -2628,7 +2626,6 @@ sub collapsenicsattr()
$nodeattrhash = shift;
}
my $objname = shift;
-
my %nicattrs = ();
foreach my $nodeattr (keys %{$nodeattrhash}) {
diff --git a/perl-xCAT/xCAT/DSHCLI.pm b/perl-xCAT/xCAT/DSHCLI.pm
index a0b5788c9..8121f475d 100644
--- a/perl-xCAT/xCAT/DSHCLI.pm
+++ b/perl-xCAT/xCAT/DSHCLI.pm
@@ -979,8 +979,9 @@ sub fork_fanout_dsh
)
= @_;
- #get username and passeword for ether net switches (EthSwitch type)
- if ($$options{'devicetype'} =~ /EthSwitch/) {
+ #get username and passeword for switches
+ if (($$options{'devicetype'} =~ /EthSwitch/) ||
+ (($$options{'devicetype'} =~ /IBSwitch/) && !($$options{'user'})) ){
if (@$targets_waiting > 0) {
if ($ENV{'DSH_REMOTE_PASSWORD'}) {
foreach my $t (keys(%$resolved_targets)) {
@@ -1010,13 +1011,15 @@ sub fork_fanout_dsh
if (defined($entry->[0]->{protocol})) {
$protocol = $entry->[0]->{protocol};
}
- if ((!$username) && (!$password) && (!$protocol)) { #use passwd table as default
+ if ((!$username) && (!$password)) { #use passwd table as default
if (defined($passwd_ent[0]->{username})) {
$username = $passwd_ent[0]->{username};
}
if (defined($passwd_ent[0]->{password})) {
$password = $passwd_ent[0]->{password};
}
+ }
+ if (!$protocol){
if (defined($passwd_ent[0]->{comments}) && ($passwd_ent[0]->{comments} eq "telnet")) {
$protocol = $passwd_ent[0]->{comments};
}
diff --git a/perl-xCAT/xCAT/FSPvm.pm b/perl-xCAT/xCAT/FSPvm.pm
index 15badd518..a00285672 100644
--- a/perl-xCAT/xCAT/FSPvm.pm
+++ b/perl-xCAT/xCAT/FSPvm.pm
@@ -2037,7 +2037,7 @@ sub query_cec_info {
if (scalar(@$rethash)) {
push @result, @$rethash;
} else {
- push @result, [ $name, "No information got", -1 ];
+ push @result, [ $name, "No information obtained.", -1 ];
last;
}
$lpar_hash{$name} = \%tmp_hash;
@@ -2048,7 +2048,7 @@ sub query_cec_info {
if (scalar(@$rethash)) {
push @result, @$rethash;
} else {
- push @result, [ @td[3], "No information got", -1 ];
+ push @result, [ @td[3], "No information obtained.", -1 ];
last;
}
diff --git a/perl-xCAT/xCAT/MacMap.pm b/perl-xCAT/xCAT/MacMap.pm
index e857cf9f5..54edb1824 100644
--- a/perl-xCAT/xCAT/MacMap.pm
+++ b/perl-xCAT/xCAT/MacMap.pm
@@ -329,14 +329,14 @@ sub dump_mac_info {
foreach my $switch (keys %{ $self->{switchparmhash} }) {
if ($dump_all_switches or defined($switches_to_dump{$switch})) {
if ($self->{show_verbose_info}) {
- xCAT::MsgUtils->message("I", { data => ["$switch: Start to get information"] }, $self->{callback});
+ xCAT::MsgUtils->message("I", { data => ["$switch: Attempting to refresh switch information..."] }, $self->{callback});
}
$self->refresh_switch(undef, $community, $switch);
if ($self->{show_verbose_info}) {
- xCAT::MsgUtils->message("I", { data => ["$switch: Finish to get information"] }, $self->{callback});
+ xCAT::MsgUtils->message("I", { data => ["$switch: Finished refreshing switch information."] }, $self->{callback});
}
if (!defined($self->{macinfo}->{$switch})) {
- $ret{$switch}->{ErrorStr} = "No information get";
+ $ret{$switch}->{ErrorStr} = "No switch information obtained.";
foreach my $defportname (keys %{ $self->{switches}->{$switch} }) {
$ret{$switch}->{$defportname}->{Node} = $self->{switches}->{$switch}->{$defportname};
}
diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm
index 423ea320d..a66576cf4 100755
--- a/perl-xCAT/xCAT/NetworkUtils.pm
+++ b/perl-xCAT/xCAT/NetworkUtils.pm
@@ -1471,7 +1471,7 @@ sub nodeonmynet
my $nettab = xCAT::Table->new("networks");
my @vnets = $nettab->getAllAttribs('net', 'mgtifname', 'mask');
foreach (@vnets) {
- if ((defined $_->{mgtifname}) && ($_->{mgtifname} eq '!remote!'))
+ if ((defined $_->{mgtifname}) && ($_->{mgtifname} =~ /!remote!/))
{
if (xCAT::NetworkUtils->ishostinsubnet($nodeip, $_->{mask}, $_->{net}))
{
@@ -1508,7 +1508,7 @@ sub nodeonmynet
my $nettab = xCAT::Table->new("networks");
my @vnets = $nettab->getAllAttribs('net', 'mgtifname', 'mask');
foreach (@vnets) {
- if ((defined $_->{mgtifname}) && ($_->{mgtifname} eq '!remote!'))
+ if ((defined $_->{mgtifname}) && ($_->{mgtifname} =~ /!remote!/))
{ #global scoped network
my $curm = unpack("N", inet_aton($_->{mask}));
my $bits = 32;
diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm
index 228ab4770..8a0639ea4 100755
--- a/perl-xCAT/xCAT/Schema.pm
+++ b/perl-xCAT/xCAT/Schema.pm
@@ -678,6 +678,20 @@ passed as argument rather than by table value',
disable => "Set to 'yes' or '1' to comment out this row.",
},
},
+ pdu => {
+ cols => [qw(node nodetype machinetype modelnum serialnum outletCount comments disable)],
+ keys => [qw(node)],
+ nodecol => "node",
+ table_desc => 'Parameters to use when interrogating pdus',
+ descriptions => {
+ node => 'The hostname/address of the pdu to which the settings apply',
+ nodetype => 'The node type should be pdu ',
+ machinetype => 'The pdu machine type',
+ modelnum => 'The pdu model number',
+ serialnum => 'The pdu serial number',
+ outletcount => 'The pdu outlet count',
+ },
+ },
switches => {
cols => [qw(switch snmpversion username password privacy auth linkports sshusername sshpassword protocol switchtype comments disable)],
keys => [qw(switch)],
@@ -1255,6 +1269,17 @@ passed as argument rather than by table value',
disable => "Set to 'yes' or '1' to comment out this row.",
},
},
+ pduoutlet => {
+ cols => [qw(node pdu comments disable)],
+ keys => [qw(node)],
+ table_desc => 'Contains list of outlet numbers on the pdu each node is connected to.',
+ descriptions => {
+ node => 'The node name or group name.',
+ pdu => 'a comma-separated list of outlet number for each PDU, ex: pdu1:outlet1,pdu2:outlet1',
+ comments => 'Any user-written notes.',
+ disable => "Set to 'yes' or '1' to comment out this row.",
+ }
+ },
switch => {
cols => [qw(node switch port vlan interface comments disable)],
keys => [qw(node switch port)],
@@ -1816,6 +1841,7 @@ foreach my $tabname (keys(%xCAT::ExtTab::ext_tabspec)) {
zone => { attrs => [], attrhash => {}, objkey => 'zonename' },
firmware => { attrs => [], attrhash => {}, objkey => 'cfgfile' },
taskstate => { attrs => [], attrhash => {}, objkey => 'node' },
+ pdu => { attrs => [], attrhash => {}, objkey => 'node' },
);
@@ -2699,6 +2725,14 @@ my @nodeattrs = (
tabentry => 'websrv.password',
access_tabentry => 'websrv.node=attr:node',
},
+######################
+ # pduoutlet table #
+######################
+ { attr_name => 'pdu',
+ tabentry => 'pduoutlet.pdu',
+ access_tabentry => 'pduoutlet.node=attr:node',
+ },
+
######################
# switch table #
######################
@@ -2817,6 +2851,35 @@ my @nodeattrs = (
access_tabentry => 'hwinv.node=attr:node',
},
+#########################
+## pdu table #
+#########################
+ { attr_name => 'nodetype',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.nodetype',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'machinetype',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.machinetype',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'modelnum',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.modelnum',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'serialnum',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.serialnum',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'outletcount',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.outletcount',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+
#########################
## switches table #
#########################
@@ -4019,6 +4082,47 @@ push(@{ $defspec{group}->{'attrs'} }, @nodeattrs);
},
);
+#############################
+# pdu object #
+#############################
+#############################
+# pdu table #
+#############################
+@{ $defspec{pdu}->{'attrs'} } =
+ (
+ { attr_name => 'node',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.node',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'nodetype',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.nodetype',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'machinetype',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.machinetype',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'modelnum',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.modelnum',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'serialnum',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.serialnum',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+ { attr_name => 'outletcount',
+ only_if => 'nodetype=pdu',
+ tabentry => 'pdu.outletcount',
+ access_tabentry => 'pdu.node=attr:node',
+ },
+);
+
+
###################################################
diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm
index 67b1b2b8f..5f1714f50 100644
--- a/perl-xCAT/xCAT/Table.pm
+++ b/perl-xCAT/xCAT/Table.pm
@@ -2299,6 +2299,91 @@ $evalcpt->permit('require');
#--------------------------------------------------------------------------
+=head3 transRegexAttrs
+
+ Description: Transform the regular expression attribute to the target value
+ based on the node name.
+
+ Arguments:
+ Node
+ Attribute value (may have regular expression)
+ Returns:
+ Attribute value
+ undef
+ Globals:
+
+ Error:
+
+ Example:
+ if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) {
+ $datum->{$attrib} = $retval;
+ } else {
+ delete $datum->{$attrib};
+ }
+
+ Comments:
+ none
+
+=cut
+
+#---------------------------------------------------------------------------
+sub transRegexAttrs
+{
+ my ($node, $attr) = @_;
+ my $retval = $attr;
+ if ($attr =~ /^\/[^\/]*\/[^\/]*\/$/) {
+ my $exp = substr($attr, 1);
+ chop $exp;
+ my @parts = split('/', $exp, 2);
+ $retval = $node;
+ $retval =~ s/$parts[0]/$parts[1]/;
+ } elsif ($attr =~ /^\|.*\|$/) {
+ my $exp = substr($attr, 1);
+ chop $exp;
+ my @parts = split('\|', $exp, 2);
+ my $arraySize = @parts;
+ if ($arraySize < 2) { # easy regx, generate lhs from node
+ my $lhs;
+ my @numbers = $node =~ m/[\D0]*(\d+)/g;
+ $lhs = '[\D0]*(\d+)' x scalar(@numbers);
+ $lhs .= '.*$';
+ unshift(@parts, $lhs);
+ }
+ my ($curr, $next, $prev);
+ $retval = $parts[1];
+
+ ($curr, $next, $prev) =
+ extract_bracketed($retval, '()', qr/[^()]*/);
+ unless ($curr) { #If there were no paramaters to save, treat this one like a plain regex
+ undef $@; #extract_bracketed would have set $@ if it didn't return, undef $@
+ $retval = $node;
+ $retval =~ s/$parts[0]/$parts[1]/;
+ }
+ while ($curr)
+ {
+ my $value = $node;
+ $value =~ s/$parts[0]/$curr/;
+ $value = $evalcpt->reval('use integer;' . $value);
+ $retval = $prev . $value . $next;
+ ($curr, $next, $prev) =
+ extract_bracketed($retval, '()', qr/[^()]*/);
+ }
+ undef $@;
+
+ #At this point, $retval is the expression after being arithmetically contemplated, a generated regex, and therefore
+ #must be applied in total
+ my $answval = $node;
+ $answval =~ s/$parts[0]/$retval/;
+ $retval = $answval;
+ }
+ if ($retval =~ /^$/) {
+ $retval = undef;
+ }
+ return $retval;
+}
+
+#--------------------------------------------------------------------------
+
=head3 getNodeAttribs
Description: Retrieves the requested attribute
@@ -2392,77 +2477,10 @@ sub getNodeAttribs
#skip undefined values, save time
next;
}
- if ($datum->{$attrib} =~ /^\/[^\/]*\/[^\/]*\/$/)
- {
- my $exp = substr($datum->{$attrib}, 1);
- chop $exp;
- my @parts = split('/', $exp, 2);
- my $retval = $node;
- $retval =~ s/$parts[0]/$parts[1]/;
+ my $retval;
+ if (defined($retval = transRegexAttrs($node, $datum->{$attrib}))) {
$datum->{$attrib} = $retval;
- }
- elsif ($datum->{$attrib} =~ /^\|.*\|$/)
- {
-
- #Perform arithmetic and only arithmetic operations in bracketed issues on the right.
- #Tricky part: don't allow potentially dangerous code, only eval if
- #to-be-evaled expression is only made up of ()\d+-/%$
- #Futher paranoia? use Safe module to make sure I'm good
- my $exp = substr($datum->{$attrib}, 1);
- chop $exp;
- my @parts = split('\|', $exp, 2);
- my $arraySize = @parts;
- if ($arraySize < 2) { # easy regx, generate lhs from node
- my $lhs;
- my @numbers = $node =~ m/[\D0]*(\d+)/g;
- $lhs = '[\D0]*(\d+)' x scalar(@numbers);
- $lhs .= '.*$';
- unshift(@parts, $lhs);
- }
- my $curr;
- my $next;
- my $prev;
- my $retval = $parts[1];
- ($curr, $next, $prev) =
- extract_bracketed($retval, '()', qr/[^()]*/);
-
- unless ($curr) { #If there were no paramaters to save, treat this one like a plain regex
- undef $@; #extract_bracketed would have set $@ if it didn't return, undef $@
- $retval = $node;
- $retval =~ s/$parts[0]/$parts[1]/;
- $datum->{$attrib} = $retval;
- if ($datum->{$attrib} =~ /^$/) {
-
- #If regex forces a blank, act like a normal blank does
- delete $datum->{$attrib};
- }
- next; #skip the redundancy that follows otherwise
- }
- while ($curr)
- {
-
- #my $next = $comps[0];
- my $value = $node;
- $value =~ s/$parts[0]/$curr/;
- $value = $evalcpt->reval('use integer;' . $value);
- $retval = $prev . $value . $next;
- ($curr, $next, $prev) =
- extract_bracketed($retval, '()', qr/[^()]*/);
- }
- undef $@;
-
- #At this point, $retval is the expression after being arithmetically contemplated, a generated regex, and therefore
- #must be applied in total
- my $answval = $node;
- $answval =~ s/$parts[0]/$retval/;
- $datum->{$attrib} = $answval; #$retval;
-
- #print Data::Dumper::Dumper(extract_bracketed($parts[1],'()',qr/[^()]*/));
- #use text::balanced extract_bracketed to parse earch atom, make sure nothing but arith operators, parans, and numbers are in it to guard against code execution
- }
- if ($datum->{$attrib} =~ /^$/) {
-
- #If regex forces a blank, act like a normal blank does
+ } else {
delete $datum->{$attrib};
}
}
diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm
index 5dfb9494c..1b8e1d5c3 100755
--- a/perl-xCAT/xCAT/Usage.pm
+++ b/perl-xCAT/xCAT/Usage.pm
@@ -50,6 +50,9 @@ my %usage = (
rpower noderange [stat|state|on|off|reset|boot]
docker specific:
rpower noderange [start|stop|restart|pause|unpause|state]
+ pdu specific:
+ rpower noderange [off|on|stat]
+ rpower noderange [pduoff|pduon|pdustat]
",
"rbeacon" =>
"Usage: rbeacon [on|off|stat] [-V|--verbose]
@@ -81,7 +84,7 @@ my %usage = (
rinv [all|model|serial] [-V|--verbose]
rinv [-h|--help|-v|--version]
BMC specific:
- rinv [mprom|deviceid|uuid|guid|vpd|all]
+ rinv [mprom|deviceid|uuid|guid|vpd|dimm|all]
OpenPOWER server specific:
rinv [model|serial|deviceid|uuid|guid|vpd|mprom|firm|all]
MPA specific:
@@ -100,7 +103,9 @@ my %usage = (
zVM specific:
rinv noderange [all|config]
MIC specific:
- rinv noderange [system|ver|board|core|gddr|all]",
+ rinv noderange [system|ver|board|core|gddr|all]
+ pdu specific:
+ rinv noderange ",
"rsetboot" =>
"Usage: rsetboot [net|hd|cd|floppy|def|stat] [-V|--verbose] [-u] [-p]
rsetboot [-h|--help|-v|--version]",
diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm
index af8f42fcf..a39ea8bb2 100644
--- a/perl-xCAT/xCAT/Utils.pm
+++ b/perl-xCAT/xCAT/Utils.pm
@@ -4645,7 +4645,7 @@ sub splitkcmdline {
my %cmdhash;
- my @cmdlist = split(/[, ]/, $kcmdline);
+ my @cmdlist = split(/[ ]/, $kcmdline);
foreach my $cmd (@cmdlist) {
if ($cmd =~ /^R::(.*)$/) {
$cmdhash{persistent} .= "$1 ";
diff --git a/perl-xCAT/xCAT/data/discinfo.pm b/perl-xCAT/xCAT/data/discinfo.pm
index 43272157d..75274be3e 100755
--- a/perl-xCAT/xCAT/data/discinfo.pm
+++ b/perl-xCAT/xCAT/data/discinfo.pm
@@ -12,34 +12,42 @@ require Exporter;
@EXPORT_OK = qw(distnames numdiscs);
-%distnames = (
- "1310229985.226287" => "centos6",
- "1323560292.885204" => "centos6.2",
- "1341569670.539525" => "centos6.3", #x86
- "1362445555.957609" => "centos6.4", #x86_64
- "1385726732.061157" => "centos6.5", #x86_64
- "1438724467.511049" => "centos6.7", #x86_64
- "1463897259.552895" => "centos6.8", #x86_64
- "1404489053.504589" => "centos7.0",
- "1427495138.035654" => "centos7.1",
+my %distnames = (
+ "1480943823.812754" => "centos7.3", #x86_64
"1450147276.351714" => "centos7.2", #ppc64le
+ "1449699925.561114" => "centos7.2", #x86_64
+ "1427495138.035654" => "centos7.1",
+ "1404489053.504589" => "centos7.0",
+
+ "1463897259.552895" => "centos6.8", #x86_64
+ "1438724467.511049" => "centos6.7", #x86_64
+ "1414159991.958686" => "centos6.6",
+ "1385726732.061157" => "centos6.5", #x86_64
+ "1362445555.957609" => "centos6.4", #x86_64
+ "1341569670.539525" => "centos6.3", #x86
+ "1323560292.885204" => "centos6.2",
+ "1310229985.226287" => "centos6",
+
+ "1381776971.473332" => "centos5.10", #x86_64
+ "1357930415.252042" => "centos5.9", #x86_64
+ "1330913492.861127" => "centos5.8", #x86_64
+ "1301444731.448392" => "centos5.6",
+ "1272326751.405938" => "centos5.5",
+ "1254416275.453877" => "centos5.4", #x86_64
+ "1237641529.260981" => "centos5.3",
+ "1214240246.285059" => "centos5.2",
+ "1213888991.267240" => "centos5.2",
+ "1195929637.060433" => "centos5.1",
+ "1195929648.203590" => "centos5.1",
"1176234647.982657" => "centos5",
+
"1156364963.862322" => "centos4.4",
"1178480581.024704" => "centos4.5",
- "1195929648.203590" => "centos5.1",
- "1195929637.060433" => "centos5.1",
- "1213888991.267240" => "centos5.2",
- "1214240246.285059" => "centos5.2",
- "1237641529.260981" => "centos5.3",
- "1272326751.405938" => "centos5.5",
- "1330913492.861127" => "centos5.8", #x86_64
- "1357930415.252042" => "centos5.9", #x86_64
- "1381776971.473332" => "centos5.10", #x86_64
"1195488871.805863" => "centos4.6",
"1195487524.127458" => "centos4.6",
- "1301444731.448392" => "centos5.6",
- "1414159991.958686" => "centos6.6",
+
"1170973598.629055" => "rhelc5",
+
"1170978545.752040" => "rhels5",
"1192660014.052098" => "rhels5.1",
"1192663619.181374" => "rhels5.1",
@@ -87,6 +95,7 @@ require Exporter;
"1446216863.790260" => "rhels7.2", #x86_64
"1446216863.764721" => "rhels7.2", #ppc64
"1446216863.771788" => "rhels7.2", #ppc64le
+
"1285193176.593806" => "rhelhpc6", #x86_64
"1305067719.718814" => "rhelhpc6.1", #x86_64
"1321545261.599847" => "rhelhpc6.2", #x86_64
@@ -99,6 +108,7 @@ require Exporter;
"1399449226.140088" => "rhelhpc7.0", #x86_64, RHEL ComputeNode
"1424360759.772760" => "rhelhpc7.1", #x86_64, RHEL ComputeNode
"1446216863.725127" => "rhelhpc7.2", #x86_64, RHEL ComputeNode
+
"1194015916.783841" => "fedora8",
"1194015385.299901" => "fedora8",
"1210112435.291709" => "fedora9",
@@ -113,6 +123,7 @@ require Exporter;
"1372355769.065812" => "fedora19", #x86_64 DVD ISO
"1372402928.663653" => "fedora19", #ppc64 DVD ISO
"1386856788.124593" => "fedora20", #x86_64 DVD ISO
+
"1194512200.047708" => "rhas4.6",
"1194512327.501046" => "rhas4.6",
"1241464993.830723" => "rhas4.8", #x86-64
diff --git a/xCAT-IBMhpc/debian/compat b/xCAT-IBMhpc/debian/compat
index 7ed6ff82d..ec635144f 100644
--- a/xCAT-IBMhpc/debian/compat
+++ b/xCAT-IBMhpc/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/xCAT-IBMhpc/debian/control b/xCAT-IBMhpc/debian/control
index 38a06c9af..2bdffb1be 100644
--- a/xCAT-IBMhpc/debian/control
+++ b/xCAT-IBMhpc/debian/control
@@ -2,14 +2,14 @@ Source: xcat-ibmhpc
Section: admin
Priority: extra
Maintainer: Arif Ali
-Build-Depends: debhelper (>= 5)
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
Package: xcat-ibmhpc
Architecture: all
-Depends: ${perl:Depends}, perl-xcat (>= 2.8.0), xcat-client (>= 2.8.0)
-Description: Install and configuration utilities for IBM HPC products in an xCAT cluster
- xCAT-IBMhpc provides sample installation and configuration scripts for running
- the IBM HPC software stack in an xCAT cluser. Support for the following IBM
- products is provided: GPFS, LoadLeveler, Parallel Environment, ESSL and Parallel
+Depends: ${perl:Depends}, perl-xcat (>= 2.13-snap000000000000), xcat-client (>= 2.13-snap000000000000)
+Description: Utilities for manage IBM HPC products in an xCAT cluster
+ xCAT-IBMhpc provides sample installation and configuration scripts for running
+ the IBM HPC software stack in an xCAT cluser. Support for the following IBM
+ products is provided: GPFS, LoadLeveler, Parallel Environment, ESSL and Parallel
ESSL libraries, some compilers (vac, xlC, xlf).
diff --git a/xCAT-IBMhpc/debian/rules b/xCAT-IBMhpc/debian/rules
index 659821bd5..1bd639730 100755
--- a/xCAT-IBMhpc/debian/rules
+++ b/xCAT-IBMhpc/debian/rules
@@ -9,9 +9,6 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-export DH_COMPAT=5
-
-
build:
pwd
dh_quilt_patch
@@ -29,7 +26,6 @@ install:
dh_install -X".svn"
dh_link
-
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
@@ -39,7 +35,7 @@ binary-arch:
pwd
dh_testdir
dh_testroot
- dh_installchangelogs
+ dh_installchangelogs
dh_installdocs
# dh_installexamples
dh_install -X".svn"
diff --git a/xCAT-IBMhpc/xCAT-IBMhpc.spec b/xCAT-IBMhpc/xCAT-IBMhpc.spec
index 32ed7f3d8..5de637f3d 100644
--- a/xCAT-IBMhpc/xCAT-IBMhpc.spec
+++ b/xCAT-IBMhpc/xCAT-IBMhpc.spec
@@ -1,7 +1,7 @@
Summary: Install and configuration utilities for IBM HPC products in an xCAT cluster
Name: xCAT-IBMhpc
Version: %{?version:%{version}}%{!?version:%(cat Version)}
-Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
+Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@@ -20,7 +20,6 @@ AutoReqProv: no
# also need to fix Requires for AIX
%ifos linux
BuildArch: noarch
-#Requires:
%endif
Requires: perl-xCAT >= %{epoch}:%{version}
@@ -85,7 +84,3 @@ fi
%post
%preun
-
-
-
-
diff --git a/xCAT-OpenStack-baremetal/debian/compat b/xCAT-OpenStack-baremetal/debian/compat
index 45a4fb75d..ec635144f 100644
--- a/xCAT-OpenStack-baremetal/debian/compat
+++ b/xCAT-OpenStack-baremetal/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/xCAT-OpenStack-baremetal/debian/control b/xCAT-OpenStack-baremetal/debian/control
index 61ad678eb..b62fc34bb 100644
--- a/xCAT-OpenStack-baremetal/debian/control
+++ b/xCAT-OpenStack-baremetal/debian/control
@@ -2,13 +2,11 @@ Source: xcat-openstack-baremetal
Section: admin
Priority: extra
Maintainer: xCAT
-Build-Depends: debhelper (>= 8.0.0)
+Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.4
-Homepage: http://xcat.org
-#Vcs-Git: git://git.debian.org/collab-maint/xcat-openstack-baremetal.git
-#Vcs-Browser: http://git.debian.org/?p=collab-maint/xcat-openstack-baremetal.git;a=summary
+Homepage: https://xcat.org/
Package: xcat-openstack-baremetal
Architecture: all
Depends: xcat-client
-Description: Executables and data of the xCAT baremetal driver for OpenStack
+Description: Executables and data of xCAT baremetal driver for OpenStack
diff --git a/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec b/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec
index c82d9b36e..ff45e5bd6 100644
--- a/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec
+++ b/xCAT-OpenStack-baremetal/xCAT-OpenStack-baremetal.spec
@@ -1,7 +1,7 @@
Summary: Executables and data of the xCAT baremetal driver for OpenStack
Name: xCAT-OpenStack-baremetal
Version: %{?version:%{version}}%{!?version:%(cat Version)}
-Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
+Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: IBM
Group: Applications/System
diff --git a/xCAT-OpenStack/debian/compat b/xCAT-OpenStack/debian/compat
index 45a4fb75d..ec635144f 100644
--- a/xCAT-OpenStack/debian/compat
+++ b/xCAT-OpenStack/debian/compat
@@ -1 +1 @@
-8
+9
diff --git a/xCAT-OpenStack/debian/control b/xCAT-OpenStack/debian/control
index 04cff6ab9..9f6ac5661 100644
--- a/xCAT-OpenStack/debian/control
+++ b/xCAT-OpenStack/debian/control
@@ -2,13 +2,13 @@ Source: xcat-openstack
Section: admin
Priority: extra
Maintainer: xCAT
-Build-Depends: debhelper (>= 8.0.0)
-Standards-Version: 3.9.2
-#Vcs-Git: git://git.debian.org/collab-maint/xcat-openstack.git
-#Vcs-Browser: http://git.debian.org/?p=collab-maint/xcat-openstack.git;a=summary
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
Package: xcat-openstack
Architecture: all
Depends: xcat
-Description: Meta-Metapackage for a common, default xCAT management node setup with OpenStack
- xCAT-OpenStack is an xCAT management node package intended for at-scale management with OpenStack, including hardware management and software management.
+Description: Metapackage for a xCAT management node setup with OpenStack
+ xCAT-OpenStack is an xCAT management node package intended for at-scale
+ management with OpenStack, including hardware management and software
+ management.
diff --git a/xCAT-OpenStack/xCAT-OpenStack.spec b/xCAT-OpenStack/xCAT-OpenStack.spec
index b1fae31be..a502b20d5 100644
--- a/xCAT-OpenStack/xCAT-OpenStack.spec
+++ b/xCAT-OpenStack/xCAT-OpenStack.spec
@@ -1,7 +1,7 @@
-Summary: Meta-Metapackage for a common, default xCAT management node setup with OpenStack
+Summary: Meta-Metapackage for a common, default xCAT management node setup with OpenStack
Name: xCAT-OpenStack
Version: %{?version:%{version}}%{!?version:%(cat Version)}
-Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
+Release: %{?release:%{release}}%{!?release:%(cat Release)}
License: EPL
Group: Applications/System
Vendor: IBM Corp.
@@ -16,8 +16,8 @@ Provides: xCAT-OpenStack = %{version}
Requires: xCAT
%description
-xCAT-OpenStack is an xCAT management node package intended for at-scale
-management with OpenStack, including hardware management and software
+xCAT-OpenStack is an xCAT management node package intended for at-scale
+management with OpenStack, including hardware management and software
management.
%prep
@@ -28,7 +28,6 @@ management.
# Then convert the pods to man pages and html pages.
./db2man
-
%install
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_schema
mkdir -p $RPM_BUILD_ROOT/%{prefix}/lib/perl/xCAT_plugin
@@ -89,9 +88,8 @@ rm -rf $RPM_BUILD_ROOT
%ifos linux
if [ -f "/proc/cmdline" ]; then # prevent running it during install into chroot image
if [ -f $RPM_INSTALL_PREFIX0/sbin/xcatd ]; then
- /etc/init.d/xcatd restart
+ /etc/init.d/xcatd restart
fi
fi
%endif
exit 0
-
diff --git a/xCAT-SoftLayer/xCAT-SoftLayer.spec b/xCAT-SoftLayer/xCAT-SoftLayer.spec
index 7166d1e9d..683b98ea8 100644
--- a/xCAT-SoftLayer/xCAT-SoftLayer.spec
+++ b/xCAT-SoftLayer/xCAT-SoftLayer.spec
@@ -1,7 +1,7 @@
Summary: Utilities to make xCAT work in a SoftLayer environment
Name: xCAT-SoftLayer
Version: %{?version:%{version}}%{!?version:%(cat Version)}
-Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
+Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
diff --git a/xCAT-UI/debian/compat b/xCAT-UI/debian/compat
index 7ed6ff82d..ec635144f 100644
--- a/xCAT-UI/debian/compat
+++ b/xCAT-UI/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/xCAT-UI/debian/control b/xCAT-UI/debian/control
index 4e91971ef..f9fe95278 100644
--- a/xCAT-UI/debian/control
+++ b/xCAT-UI/debian/control
@@ -2,11 +2,12 @@ Source: xcat-ui
Section: admin
Priority: extra
Maintainer: xCAT
-Build-Depends: debhelper (>= 5)
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
Package: xcat-ui
Architecture: all
-Depends: ${perl:Depends}, python (>= 2.3), apache2, libapache2-mod-php5
-Description: Provides a browser-based interface for xCAT (extreme Cluster Administration Tool).
- Provides a browser-based interface for xCAT (extreme Cluster Administration Tool).
+Depends: ${perl:Depends}, python (>= 2.3), apache2, libapache2-mod-php
+Description: Provides a browser-based interface for xCAT
+ Provides a browser-based interface for xCAT (extreme Cluster Administration
+ Tool).
diff --git a/xCAT-UI/debian/rules b/xCAT-UI/debian/rules
index ce79be57f..1cf265aa1 100755
--- a/xCAT-UI/debian/rules
+++ b/xCAT-UI/debian/rules
@@ -9,9 +9,6 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-export DH_COMPAT=5
-
-
build:
pwd
@@ -38,7 +35,7 @@ binary-arch:
pwd
dh_testdir
dh_testroot
- dh_installchangelogs
+ dh_installchangelogs
dh_installdocs
# dh_installexamples
dh_install -X".svn"
diff --git a/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf
index 2d94d8887..11d5b3445 100644
--- a/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf
+++ b/xCAT-UI/etc/apache2/conf.d/xcat-ui.conf
@@ -1,5 +1,12 @@
Alias /xcat "/opt/xcat/ui"
PHPINIDir "/opt/xcat/ui"
+
+# Redirect all http request to https
+RewriteEngine On
+RewriteCond %{SERVER_PORT} 80
+RewriteCond %{HTTPS} !=on
+RewriteRule ^/?xcat/(.*) https://%{SERVER_NAME}/xcat/$1 [R,L]
+
Options FollowSymLinks
AllowOverride None
diff --git a/xCAT-UI/js/configure/service.js b/xCAT-UI/js/configure/service.js
index 352c01d14..515b86296 100644
--- a/xCAT-UI/js/configure/service.js
+++ b/xCAT-UI/js/configure/service.js
@@ -60,7 +60,7 @@ function loadServicePage(tabId) {
title = 'z/VM';
// Get zVM host names
- if (!$.cookie('zvms')){
+ if (!$.cookie('xcat_zvms')){
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
diff --git a/xCAT-UI/js/configure/update.js b/xCAT-UI/js/configure/update.js
index 1422f1023..65d339292 100644
--- a/xCAT-UI/js/configure/update.js
+++ b/xCAT-UI/js/configure/update.js
@@ -39,7 +39,7 @@ function loadUpdatePage() {
/**
* Show the RPM repository (it can use the user's last choice and input)
- *
+ *
* @param data Data returned from HTTP request
*/
function showRepository(data) {
@@ -61,7 +61,7 @@ function showRepository(data) {
// Display the Devel Repository, remember user's last selection
show = show + "
";
@@ -70,7 +70,7 @@ function showRepository(data) {
// Display the Stable Repository, remember user's last selection
show = "
";
@@ -78,23 +78,23 @@ function showRepository(data) {
repoList.append(show);
// Display the Input Repository, remember user's last selection
- if (($.cookie('xcatrepository')) && ($.cookie('xcatrepository') != 1)
- && ($.cookie('xcatrepository') != 2)) {
+ if (($.cookie('xcat_repository')) && ($.cookie('xcat_repository') != 1)
+ && ($.cookie('xcat_repository') != 2)) {
show = "
Other: ";
show += "";
+ + $.cookie('xcat_repository') + "'
";
} else {
show = "
Other: ";
show += "";
}
repoList.append(show);
-
+
$('#repository fieldset').append(repoList);
}
/**
* Show all xCAT RPMs
- *
+ *
* @param data Data returned from HTTP request
*/
function showRpmInfo(data) {
@@ -109,7 +109,7 @@ function showRpmInfo(data) {
}
rpms = data.rsp.split(/\n/);
-
+
// No rpm installed, return
if (1 > rpms.length) {
$('#rpm fieldset').append("No RPMs installed!");
@@ -201,7 +201,7 @@ function updateRpm() {
if (pattern.test(rpms)) {
return true;
}
-
+
rpms = rpms + temp + ",";
});
@@ -227,8 +227,9 @@ function updateRpm() {
}
// Remember users' choice and input
- $.cookie('xcatrepository', rpmPathType, {
+ $.cookie('xcat_repository', rpmPathType, {
path : '/xcat',
+ secure : true,
expires : 10
});
@@ -255,7 +256,7 @@ function updateRpm() {
/**
* Show the results of the RPM update
- *
+ *
* @param data Data returned from HTTP request
*/
function showUpdateResult(data) {
diff --git a/xCAT-UI/js/custom/blade.js b/xCAT-UI/js/custom/blade.js
index bf722afc2..adbfefb66 100644
--- a/xCAT-UI/js/custom/blade.js
+++ b/xCAT-UI/js/custom/blade.js
@@ -14,14 +14,14 @@ var bladePlugin = function() {
/**
* Load node inventory
- *
+ *
* @param data Data from HTTP request
*/
bladePlugin.prototype.loadInventory = function(data) {
var args = data.msg.split(',');
var tabId = args[0].replace('out=', '');
var node = args[1].replace('node=', '');
-
+
// Get node inventory
var inv = data.rsp;
@@ -30,7 +30,7 @@ bladePlugin.prototype.loadInventory = function(data) {
// Create division to hold inventory
var invDiv = $('');
-
+
// Create a fieldset
var fieldSet = $('');
var legend = $('');
@@ -58,7 +58,7 @@ bladePlugin.prototype.loadInventory = function(data) {
/**
* Load clone page
- *
+ *
* @param node Source node to clone
*/
bladePlugin.prototype.loadClonePage = function(node) {
@@ -78,13 +78,13 @@ bladePlugin.prototype.loadClonePage = function(node) {
// Add clone tab
tab.add(newTabId, 'Clone', cloneForm, true);
}
-
+
tab.select(newTabId);
};
/**
* Load provision page
- *
+ *
* @param tabId The provision tab ID
*/
bladePlugin.prototype.loadProvisionPage = function(tabId) {
@@ -142,14 +142,14 @@ bladePlugin.prototype.loadResources = function() {
var tabId = 'bladeResourceTab';
// Remove loader
$('#' + tabId).find('img').remove();
-
+
// Create info bar
var infoBar = createInfoBar('Not yet supported');
// Create resource form
var resrcForm = $('');
resrcForm.append(infoBar);
-
+
$('#' + tabId).append(resrcForm);
};
@@ -160,18 +160,18 @@ bladePlugin.prototype.addNode = function() {
var addNodeForm = $('');
var info = createInfoBar('Add a BladeCenter node');
addNodeForm.append(info);
-
+
var typeFS = $('');
var typeLegend = $('');
typeFS.append(typeLegend);
addNodeForm.append(typeFS);
-
+
var settingsFS = $('');
var nodeLegend = $('');
settingsFS.append(nodeLegend);
addNodeForm.append(settingsFS);
-
- typeFS.append('
' +
+
+ typeFS.append('
' +
'' +
'' +
'
');
-
+
// Change dialog width
$('#addBladeCenter').dialog('option', 'width', '400');
-
+
typeFS.find('#typeSelect').bind('change', function(){
// Remove any existing warnings
$('#addBladeCenter .ui-state-error').remove();
settingsFS.find('div').remove();
-
+
// Change dialog width
$('#addBladeCenter').dialog('option', 'width', '400');
-
+
var nodeType = $(this).val();
switch (nodeType) {
case 'amm':
@@ -208,17 +208,17 @@ bladePlugin.prototype.addNode = function() {
break;
case 'scan':
settingsFS.append('');
-
+
// Change dialog width
$('#addBladeCenter').dialog('option', 'width', '650');
break;
}
-
+
// Do not continue if node type is AMM
if ($(this).val() == 'amm') {
return;
}
-
+
// Gather AMM nodes
settingsFS.find('select:eq(0)').after(createLoader());
$.ajax({
@@ -234,16 +234,16 @@ bladePlugin.prototype.addNode = function() {
var position = 0;
var tmp = '';
var options = '';
-
+
// Remove the loading image
settingsFS.find('img').remove();
-
+
// Do not continue if no AMM nodes are found
if (data.rsp.length < 1) {
$('#addBladeCenter').prepend(createWarnBar('Please define an AMM node before continuing'));
return;
}
-
+
// Create options for AMM nodes
for (var i in data.rsp){
tmp = data.rsp[i];
@@ -257,7 +257,7 @@ bladePlugin.prototype.addNode = function() {
if (data.msg != 'scan') {
return;
}
-
+
// Create Scan button
var scan = createButton('Scan');
scan.bind('click', function(){
@@ -273,10 +273,10 @@ bladePlugin.prototype.addNode = function() {
args : '',
msg : ''
},
-
+
/**
* Show scanned results for AMM
- *
+ *
* @param data Data returned from HTTP request
*/
success: function(data){
@@ -284,12 +284,12 @@ bladePlugin.prototype.addNode = function() {
}
});
});
-
+
settingsFS.find('select:eq(0)').after(scan);
}
});
});
-
+
// Create dialog for BladeCenter
addNodeForm.dialog({
modal : true,
@@ -306,7 +306,7 @@ bladePlugin.prototype.addNode = function() {
// Remove any existing warnings
$('#addBladeCenter .ui-state-error').remove();
var addMethod = $('#typeSelect').val();
-
+
if (addMethod == "amm") {
addAmmNode();
} else if(addMethod == "blade") {
@@ -320,7 +320,7 @@ bladePlugin.prototype.addNode = function() {
}
}
});
-
+
addNodeForm.find('#typeSelect').trigger('change');
};
@@ -331,16 +331,16 @@ bladePlugin.prototype.addNode = function() {
function addAmmNode(){
var args = '';
var errorMsg = '';
-
+
// Check for missing inputs
$('#addBladeCenter input').each(function(){
if (!$(this).val()) {
errorMsg = 'Please provide a value for each missing field!';
}
-
+
args += $(this).val() + ',';
});
-
+
// Do not continue if error was found
if (errorMsg) {
$('#addBladeCenter').prepend(createWarnBar(errorMsg));
@@ -348,7 +348,7 @@ function addAmmNode(){
}
args = args.substring(0, args.length - 1);
-
+
// Add the loader
$('#addBladeCenter').append(createLoader());
$('.ui-dialog-buttonpane .ui-button').attr('disabled', true);
@@ -385,17 +385,17 @@ function addBladeNode(){
var series = $('#bcSettings input[name="bladeSeries"]:selected').val();
var mpa = $('#bcSettings select[name="bladeMpa"]').val();
- var args = '-t;node;-o;' + name
- + ';id=' + id
- + ';nodetype=osi;groups=' + group
- + ';mgt=blade;mpa=' + mpa
+ var args = '-t;node;-o;' + name
+ + ';id=' + id
+ + ';nodetype=osi;groups=' + group
+ + ';mgt=blade;mpa=' + mpa
+ ';serialflow=hard';
-
+
// Set the serial speed and port for LS series blade
if (series != 'js') {
args += ';serialspeed=19200;serialport=1';
}
-
+
// Check for missing inputs
if (!name || !group || !id || !mpa) {
$('#addBladeCenter').prepend(createWarnBar("Please provide a value for each missing field!"));
@@ -427,7 +427,7 @@ function addBladeNode(){
// Append response message to dialog
$('#addBladeCenter').prepend(createInfoBar(rspMessage));
-
+
// Change dialog button
$('#addBladeCenter').dialog("option", "buttons", {
"Close" : function() {
@@ -440,29 +440,29 @@ function addBladeNode(){
/**
* Show rscan results
- *
+ *
* @param results Results from rscan of blade MPA
*/
function showScanAmmResult(results){
var rSection = $('');
-
+
// Create table to hold results
var rTable = $('
');
-
+
// Reset scan results area
$('#addBladeCenter #scanResults').remove();
$('#bcSettings img').remove();
$('#bcSettings button').attr('disabled', '');
if (!results)
return;
-
+
// Do not continue if there are no results
var rows = results.split("\n");
if (rows.length < 2){
$('#bcSettings').prepend(createWarnBar(rows[0]));
return;
}
-
+
// Add the table header
var fields = rows[0].match(/\S+/g);
var column = fields.length;
@@ -472,23 +472,23 @@ function showScanAmmResult(results){
row.append('
' + fields[i] + '
');
}
rTable.append(row);
-
+
// Add table body
var line;
for (var i = 1; i < rows.length; i++) {
line = rows[i];
-
+
if (!line)
continue;
-
+
var fields = line.match(/\S+/g);
if (fields[0] == 'mm')
continue;
-
+
// Create a row for each result
var row = $('
');
row.append('
');
-
+
// Add column for each field
for (var j = 0; j < column; j++){
if (fields[j]) {
@@ -501,11 +501,11 @@ function showScanAmmResult(results){
row.append('
');
}
}
-
+
// Append row to table
rTable.append(row);
}
-
+
rSection.append(rTable);
$('#bcSettings').prepend(rSection);
}
@@ -517,25 +517,25 @@ function addMmScanNode(){
// Get the AMM name
var ammName = $('#bcSettings select').val();
var nodeName = '';
-
+
$('#bcSettings :checked').each(function() {
if ($(this).attr('name')) {
nodeName += $(this).attr('name') + ',';
nodeName += $(this).parents('tr').find('input').eq(1).val() + ',';
}
});
-
+
if (!nodeName) {
$('#addBladeCenter').prepend(createWarnBar('Please select a node!'));
return;
}
-
+
// Disabled button
$('.ui-dialog-buttonpane button').attr('disabled', 'disabled');
-
+
nodeName = nodeName.substr(0, nodeName.length - 1);
$('#nodeAttrs').append(createLoader());
-
+
// Send add request
$.ajax({
url : 'lib/cmd.php',
@@ -554,7 +554,7 @@ function addMmScanNode(){
/**
* Create provision existing node division
- *
+ *
* @param inst Provision tab instance
* @return Provision existing node division
*/
@@ -566,22 +566,22 @@ function createBladeProvisionExisting(inst) {
var nodeFS = $('');
var nodeLegend = $('');
nodeFS.append(nodeLegend);
-
+
var nodeAttr = $('');
nodeFS.append($('
'));
nodeFS.append(nodeAttr);
-
+
// Create image fieldset
var imgFS = $('');
var imgLegend = $('');
imgFS.append(imgLegend);
-
+
var imgAttr = $('');
imgFS.append($('
'));
imgFS.append(imgAttr);
-
+
provExisting.append(nodeFS, imgFS);
-
+
// Create group input
var group = $('');
var groupLabel = $('');
@@ -589,7 +589,7 @@ function createBladeProvisionExisting(inst) {
// Turn on auto complete for group
var dTableDivId = 'bladeNodesDatatableDIV' + inst; // Division ID where nodes datatable will be appended
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
// Split group names into an array
var tmp = groupNames.split(',');
@@ -642,13 +642,13 @@ function createBladeProvisionExisting(inst) {
method.append(methodLabel);
method.append(methodSelect);
imgAttr.append(method);
-
+
// Create operating system input
var os = $('');
var osLabel = $('');
var osInput = $('');
osInput.one('focus', function() {
- var tmp = $.cookie('osvers');
+ var tmp = $.cookie('xcat_osvers');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -665,7 +665,7 @@ function createBladeProvisionExisting(inst) {
var archLabel = $('');
var archInput = $('');
archInput.one('focus', function() {
- var tmp = $.cookie('osarchs');
+ var tmp = $.cookie('xcat_osarchs');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -682,7 +682,7 @@ function createBladeProvisionExisting(inst) {
var profileLabel = $('');
var profileInput = $('');
profileInput.one('focus', function() {
- var tmp = $.cookie('profiles');
+ var tmp = $.cookie('xcat_profiles');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -706,7 +706,7 @@ function createBladeProvisionExisting(inst) {
// Get provision tab ID
var thisTabId = 'bladeProvisionTab' + inst;
-
+
// Get nodes that were checked
var dTableId = 'bladeNodesDatatable' + inst;
var tgts = getNodesChecked(dTableId);
@@ -714,7 +714,7 @@ function createBladeProvisionExisting(inst) {
errorMessage += 'You need to select a node. ';
ready = false;
}
-
+
// Check booth method
var boot = $('#' + thisTabId + ' select[name=bootMethod]');
if (!boot.val()) {
@@ -724,7 +724,7 @@ function createBladeProvisionExisting(inst) {
} else {
boot.css('border', 'solid #BDBDBD 1px');
}
-
+
// Check operating system image
var os = $('#' + thisTabId + ' input[name=os]');
if (!os.val()) {
@@ -734,7 +734,7 @@ function createBladeProvisionExisting(inst) {
} else {
os.css('border', 'solid #BDBDBD 1px');
}
-
+
// Check architecture
var arch = $('#' + thisTabId + ' input[name=arch]');
if (!arch.val()) {
@@ -744,7 +744,7 @@ function createBladeProvisionExisting(inst) {
} else {
arch.css('border', 'solid #BDBDBD 1px');
}
-
+
// Check profile
var profile = $('#' + thisTabId + ' input[name=profile]');
if (!profile.val()) {
@@ -754,12 +754,12 @@ function createBladeProvisionExisting(inst) {
} else {
profile.css('border', 'solid #BDBDBD 1px');
}
-
+
// If all inputs are valid, ready to provision
- if (ready) {
+ if (ready) {
// Disable provision button
$(this).attr('disabled', 'true');
-
+
// Prepend status bar
var statBar = createStatusBar('bladeProvisionStatBar' + inst);
statBar.append(createLoader(''));
@@ -768,11 +768,11 @@ function createBladeProvisionExisting(inst) {
// Disable all inputs
var inputs = $('#' + thisTabId + ' input');
inputs.attr('disabled', 'disabled');
-
+
// Disable all selects
var selects = $('#' + thisTabId + ' select');
selects.attr('disabled', 'disabled');
-
+
/**
* (1) Set operating system
*/
@@ -801,7 +801,7 @@ function createBladeProvisionExisting(inst) {
/**
* Update the provision existing node status
- *
+ *
* @param data Data returned from HTTP request
*/
function updateBladeProvisionExistingStatus(data) {
@@ -813,11 +813,11 @@ function updateBladeProvisionExistingStatus(data) {
var cmd = args[0].replace('cmd=', '');
// Get provision tab instance
var inst = args[1].replace('out=', '');
-
+
// Get provision tab and status bar ID
var statBarId = 'bladeProvisionStatBar' + inst;
var tabId = 'bladeProvisionTab' + inst;
-
+
/**
* (2) Remote install
*/
@@ -830,11 +830,11 @@ function updateBladeProvisionExistingStatus(data) {
var os = $('#' + tabId + ' input[name="os"]').val();
var profile = $('#' + tabId + ' input[name="profile"]').val();
var arch = $('#' + tabId + ' input[name="arch"]').val();
-
+
// Get nodes that were checked
var dTableId = 'bladeNodesDatatable' + inst;
var tgts = getNodesChecked(dTableId);
-
+
// Begin installation
$.ajax( {
url : 'lib/cmd.php',
@@ -848,19 +848,19 @@ function updateBladeProvisionExistingStatus(data) {
success : updateBladeProvisionExistingStatus
});
- }
-
+ }
+
/**
* (3) Prepare node for boot
*/
if (cmd == 'nodeadd') {
// Get provision method
var bootMethod = $('#' + tabId + ' select[name=bootMethod]').val();
-
+
// Get nodes that were checked
var dTableId = 'bladeNodesDatatable' + inst;
var tgts = getNodesChecked(dTableId);
-
+
// Prepare node for boot
$.ajax( {
url : 'lib/cmd.php',
@@ -875,18 +875,18 @@ function updateBladeProvisionExistingStatus(data) {
success : updateBladeProvisionExistingStatus
});
}
-
+
/**
* (4) Power on node
*/
if (cmd == 'nodeset') {
- var prg = writeRsp(rsp, '');
+ var prg = writeRsp(rsp, '');
$('#' + statBarId).find('div').append(prg);
-
+
// Get nodes that were checked
var dTableId = 'bladeNodesDatatable' + inst;
var tgts = getNodesChecked(dTableId);
-
+
// Prepare node for boot
$.ajax( {
url : 'lib/cmd.php',
@@ -901,16 +901,16 @@ function updateBladeProvisionExistingStatus(data) {
success : updateBladeProvisionExistingStatus
});
}
-
+
/**
* (5) Done
*/
else if (cmd == 'rpower') {
// Write ajax response to status bar
- var prg = writeRsp(rsp, '');
+ var prg = writeRsp(rsp, '');
$('#' + statBarId).find('div').append(prg);
$('#' + statBarId).find('img').remove();
-
+
// If installation was successful
if (prg.html().indexOf('Error') == -1) {
$('#' + statBarId).find('div').append('
It will take several minutes before the nodes are up and ready. Use rcons to monitor the status of the install.
');
diff --git a/xCAT-UI/js/custom/customUtils.js b/xCAT-UI/js/custom/customUtils.js
index 51ab0498b..56b10854c 100644
--- a/xCAT-UI/js/custom/customUtils.js
+++ b/xCAT-UI/js/custom/customUtils.js
@@ -1,6 +1,6 @@
/**
* Create nodes datatable for a given group
- *
+ *
* @param group Group name
* @param outId Division ID to append datatable
* @return Nodes datatable
@@ -19,26 +19,26 @@ function createNodesDatatable(group, outId) {
/**
* Create nodes datatable
- *
+ *
* @param data Data returned from HTTP request
*/
success : function(data) {
// Data returned
var rsp = data.rsp;
-
+
// Get output ID
var outId = data.msg;
// Get datatable ID
var dTableId = outId.replace('DIV', '');
-
+
// Node attributes hash
var attrs = new Object();
// Node attributes
var headers = new Object();
-
+
// Clear nodes datatable division
$('#' + outId).empty();
-
+
// Create nodes datatable
var node = null;
var args;
@@ -48,22 +48,22 @@ function createNodesDatatable(group, outId) {
if (pos > -1) {
var temp = rsp[i].split(': ');
node = jQuery.trim(temp[1]);
-
+
// Create a hash for the node attributes
attrs[node] = new Object();
i++;
}
-
+
// Get key and value
args = rsp[i].split('=');
var key = jQuery.trim(args[0]);
var val = jQuery.trim(args[1]);
-
+
// Create hash table
attrs[node][key] = val;
headers[key] = 1;
}
-
+
// Sort headers
var sorted = new Array();
for ( var key in headers) {
@@ -73,14 +73,14 @@ function createNodesDatatable(group, outId) {
}
}
sorted.sort();
-
+
// Add column for check box and node
sorted.unshift('', 'node');
-
+
// Create nodes datatable
var dTable = new DataTable(dTableId);
dTable.init(sorted);
-
+
// Go through each node
for ( var node in attrs) {
// Create a row
@@ -88,7 +88,7 @@ function createNodesDatatable(group, outId) {
// Create a check box
var checkBx = '';
row.push(checkBx, node);
-
+
// Go through each header
for ( var i = 2; i < sorted.length; i++) {
// Add node attributes to the row
@@ -100,11 +100,11 @@ function createNodesDatatable(group, outId) {
row.push('');
}
}
-
+
// Add row to table
dTable.add(row);
}
-
+
$('#' + outId).append(dTable.object());
$('#' + dTableId).dataTable({
'iDisplayLength': 50,
@@ -120,7 +120,7 @@ function createNodesDatatable(group, outId) {
}
}
});
-
+
// Fix table styling
$('#' + dTableId + '_wrapper .dataTables_filter label').css('width', '250px');
} // End of function(data)
@@ -129,7 +129,7 @@ function createNodesDatatable(group, outId) {
/**
* Create provision existing node division
- *
+ *
* @param plugin Plugin name to create division for
* @param inst Provision tab instance
* @return Provision existing node division
@@ -145,7 +145,7 @@ function createProvisionExisting(plugin, inst) {
// Turn on auto complete for group
var dTableDivId = plugin + 'NodesDatatableDIV' + inst; // Division ID where nodes datatable will be appended
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
// Split group names into an array
var tmp = groupNames.split(',');
@@ -215,7 +215,7 @@ function createProvisionExisting(plugin, inst) {
var osLabel = $('');
var osInput = $('');
osInput.one('focus', function() {
- var tmp = $.cookie('osvers');
+ var tmp = $.cookie('xcat_osvers');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -232,7 +232,7 @@ function createProvisionExisting(plugin, inst) {
var archLabel = $('');
var archInput = $('');
archInput.one('focus', function() {
- var tmp = $.cookie('osarchs');
+ var tmp = $.cookie('xcat_osarchs');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -249,7 +249,7 @@ function createProvisionExisting(plugin, inst) {
var profileLabel = $('');
var profileInput = $('');
profileInput.one('focus', function() {
- var tmp = $.cookie('profiles');
+ var tmp = $.cookie('xcat_profiles');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -276,7 +276,7 @@ function createProvisionExisting(plugin, inst) {
/**
* Create provision new node division
- *
+ *
* @param inst Provision tab instance
* @return Provision new node division
*/
@@ -293,7 +293,7 @@ function createProvisionNew(plugin, inst) {
var groupLabel = $('');
var groupInput = $('');
groupInput.one('focus', function() {
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
// Turn on auto complete
$(this).autocomplete({
@@ -336,7 +336,7 @@ function createProvisionNew(plugin, inst) {
var osLabel = $('');
var osInput = $('');
osInput.one('focus', function() {
- var tmp = $.cookie('osvers');
+ var tmp = $.cookie('xcat_osvers');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -353,7 +353,7 @@ function createProvisionNew(plugin, inst) {
var archLabel = $('');
var archInput = $('');
archInput.one('focus', function() {
- var tmp = $.cookie('osarchs');
+ var tmp = $.cookie('xcat_osarchs');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -370,7 +370,7 @@ function createProvisionNew(plugin, inst) {
var profileLabel = $('');
var profileInput = $('');
profileInput.one('focus', function() {
- var tmp = $.cookie('profiles');
+ var tmp = $.cookie('xcat_profiles');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -397,31 +397,31 @@ function createProvisionNew(plugin, inst) {
/**
* Create section to provision node
- *
+ *
* @param plugin Plugin name
* @param container Container to hold provision section
*/
function appendProvisionSection(plugin, container) {
// Get provision tab ID
var tabId = container.parents('.tab').attr('id');
-
- if (plugin == 'quick')
+
+ if (plugin == 'quick')
appendProvision4Url(container); // For provisioning based on argmunents found in URL
else
appendProvision4NoUrl(plugin, container);
-
+
// Add provision button
var provisionBtn = createButton('Provision');
provisionBtn.bind('click', function(){
provisionNode(tabId);
});
container.append(provisionBtn);
-
+
// Bind image select to change event
container.find('select[name=image]').bind('change', function() {
createAdvancedOptions($(this).val(), tabId);
});
-
+
$.ajax({
url : 'lib/cmd.php',
dataType : 'json',
@@ -441,15 +441,15 @@ function appendProvisionSection(plugin, container) {
$('#' + tabId).prepend(createWarnBar('Please run copycds and genimage in provision page before continuing!'));
return;
}
-
+
for (i in data.rsp) {
imageName = data.rsp[i];
position = imageName.indexOf(' ');
imageName = imageName.substr(0, position);
-
+
$('#' + tabId + ' select[name=image]').append($(''));
}
-
+
// Trigger select change event
$('#' + tabId + ' select[name=image]').trigger('change');
// Show provision button
@@ -460,102 +460,102 @@ function appendProvisionSection(plugin, container) {
/**
* Create provision node section using URL
- *
+ *
* @param container Container to hold provision section
* @returns Nothing
*/
-function appendProvision4Url(container){
+function appendProvision4Url(container){
// Create node fieldset
var nodeFS = $('');
var nodeLegend = $('');
nodeFS.append(nodeLegend);
container.append(nodeFS);
-
+
var nodeAttr = $('');
nodeFS.append($('
'));
nodeFS.append(nodeAttr);
-
+
// Create image fieldset
var imgFS = $('');
var imgLegend = $('');
imgFS.append(imgLegend);
container.append(imgFS);
-
+
var imgAttr = $('');
imgFS.append($('
'));
imgFS.append(imgAttr);
-
+
var query = window.location.search;
var args = query.substr(1).split('&');
var parms = new Object();
var tmp;
-
+
// Turn URL arguments into hash array
for (var i = 0; i < args.length; i++) {
tmp = args[i].split('=');
parms[tmp[0]] = tmp[1];
}
-
+
var master = '';
if (parms['master'])
master = parms['master'];
-
+
var nfsserver = '';
if (parms['nfsserver'])
nfsserver = parms['nfsserver'];
-
+
var tftpserver = '';
if (parms['tftpserver'])
tftpserver = parms['tftpserver'];
-
+
nodeAttr.append('');
-
+
imgAttr.append('');
imgAttr.append('');
imgAttr.append( '');
- imgAttr.append('');
+ imgAttr.append('');
imgAttr.append('');
imgAttr.append('');
imgAttr.append('');
-
+
return;
}
/**
* Create section to provision node using no URL
- *
+ *
* @param plugin Create provision section for given plugin
* @param container Container to hold provision section
*/
function appendProvision4NoUrl(plugin, container){
// Get provision tab ID
var tabId = container.parents('.tab').attr('id');
-
+
// Create node fieldset
var nodeFS = $('');
var nodeLegend = $('');
nodeFS.append(nodeLegend);
container.append(nodeFS);
-
+
var nodeAttr = $('');
nodeFS.append($('
'));
nodeFS.append(nodeAttr);
-
+
// Create image fieldset
var imgFS = $('');
var imgLegend = $('');
imgFS.append(imgLegend);
container.append(imgFS);
-
+
var imgAttr = $('');
imgFS.append($('
'));
imgFS.append(imgAttr);
-
+
// Select group name
var group = $('').append('');
var groupSelect = $('');
group.append(groupSelect);
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
var tmp = groupNames.split(',');
groupSelect.append(''); // Append empty group name
@@ -569,14 +569,14 @@ function appendProvision4NoUrl(plugin, container){
var nodesTable = $('
Select a group to view its nodes
');
nodes.append(nodesTable);
nodeAttr.append(nodes);
-
+
// Select architecture
- var arch = $('').append('');
- var archName = $.cookie('osarchs');
+ var arch = $('').append('');
+ var archName = $.cookie('xcat_osarchs');
if (archName) {
var archSelect = $('');
arch.append(archSelect);
-
+
var tmp = archName.split(',');
for (var i in tmp)
archSelect.append('');
@@ -591,30 +591,30 @@ function appendProvision4NoUrl(plugin, container){
imgAttr.append('');
imgAttr.append('');
imgAttr.append('');
-
+
// When a group is selected, show the nodes belonging to that group
groupSelect.bind('change', function() {
var nodesTableId = '#' + tabId + ' #nodesTable';
$(nodesTableId).append(createLoader());
createNodesTable($(this).val(), nodesTableId);
});
-
+
return;
}
/**
* Provision node
- *
+ *
* @param tabId Provision tab ID
*/
function provisionNode(tabId) {
var errorMessage = "";
var args = new Array();
var node = "";
-
+
// Delete any existing warnings
$('#' + tabId + ' .ui-state-error').remove();
-
+
// Go through each input
$('#' + tabId + ' input[type!="checkbox"]').each(function() {
if (!$(this).val()) {
@@ -624,13 +624,13 @@ function provisionNode(tabId) {
args.push($(this).val());
}
});
-
+
// Do not continue if error was found
if (errorMessage) {
$('#' + tabId).prepend(createWarnBar(errorMessage));
return;
}
-
+
// If jumped from nodes page, get node name
if (tabId == 'quick') {
node = args.shift();
@@ -639,25 +639,25 @@ function provisionNode(tabId) {
args.unshift($('#' + tabId + ' input[name=arch]').val());
node = getCheckedByObj($('#' + tabId + ' #nodesTable'));
}
-
+
// Do not continue if a node is not given
if (!node) {
$('#' + tabId).prepend(createWarnBar('Please select a node!'));
return;
}
-
+
var software = getCheckedByObj($('#' + tabId + ' #advanced'));
var imageName = $('#' + tabId + ' select[name=image]').val();
var provision = args.join(',');
-
- var url = 'lib/cmd.php?cmd=webrun&tgt=&args=provision;' +
+
+ var url = 'lib/cmd.php?cmd=webrun&tgt=&args=provision;' +
node + ';' + imageName + ';' + provision + ';' + software + '&msg=&opts=flush';
$('#' + tabId).prepend(createIFrame(url));
}
/**
* Create advance option
- *
+ *
* @param image Image name
* @param outId Output area ID
*/
@@ -678,29 +678,29 @@ function createAdvancedOptions(image, outId) {
var provMethod = '';
var tmpStr = '';
var position = 0;
-
+
for (var i = 0; i < data.rsp.length; i++) {
tmpStr = data.rsp[i];
if (tmpStr.indexOf('osname') != -1) {
position = tmpStr.indexOf('=');
osName = tmpStr.substr(position + 1);
}
-
+
if (tmpStr.indexOf('provmethod') != -1) {
position = tmpStr.indexOf('=');
provMethod = tmpStr.substr(position + 1);
}
}
-
+
$('#' + outId + ' #advanced').remove();
if (osName.toLowerCase() == 'aix')
return;
-
+
if (provMethod == 'install') {
// Create advanced fieldset
var advancedFS = $('').append($(''));
$('#' + outId + ' div.form fieldset:eq(1)').after(advancedFS);
-
+
advancedFS.append('
Install Ganglia monitoring
');
}
}
@@ -709,11 +709,11 @@ function createAdvancedOptions(image, outId) {
/**
* Create nodes table
- *
+ *
* @param group Group name
* @param outId Output section ID
*/
-function createNodesTable(group, outId) {
+function createNodesTable(group, outId) {
// Get group nodes
$.ajax({
url : 'lib/cmd.php',
@@ -728,26 +728,26 @@ function createNodesTable(group, outId) {
success : function(data) {
var outId = $(data.msg);
var nodes = data.rsp;
-
+
// Create table to hold nodes
var nTable = $('
');
var tHead = $('
Node
');
nTable.append(tHead);
var tBody = $('');
nTable.append(tBody);
-
+
for (var i in nodes) {
var node = nodes[i][0];
-
+
// Go to next node if there is nothing here
if (!node)
continue;
// Insert node into table
tBody.append('
' + node + '
');
}
-
+
outId.empty().append(nTable);
-
+
if (nodes.length > 10)
outId.css('height', '300px');
else
@@ -758,13 +758,13 @@ function createNodesTable(group, outId) {
/**
* Get select element names
- *
+ *
* @param obj Object to get selected element names
* @return Nodes name seperate by a comma
*/
function getCheckedByObj(obj) {
var str = '';
-
+
// Get nodes that were checked
obj.find('input:checked').each(function() {
if ($(this).attr('name')) {
@@ -781,7 +781,7 @@ function getCheckedByObj(obj) {
/**
* Select all checkboxes in the table
- *
+ *
* @param event Event on element
* @param obj Object triggering event
*/
diff --git a/xCAT-UI/js/custom/esx.js b/xCAT-UI/js/custom/esx.js
index 901e8f95a..c20b05c3c 100644
--- a/xCAT-UI/js/custom/esx.js
+++ b/xCAT-UI/js/custom/esx.js
@@ -7,7 +7,7 @@ $(document).ready(function() {
/**
* Constructor
- *
+ *
* @return Nothing
*/
var esxPlugin = function() {
@@ -17,9 +17,9 @@ var esxPlugin = function() {
/**
* Configure self-service page
*/
-esxPlugin.prototype.loadConfigPage = function(tabId) {
+esxPlugin.prototype.loadConfigPage = function(tabId) {
var configAccordion = $('');
-
+
// Create accordion panel for profiles
var profileSection = $('');
var profileLnk = $('
'));
vmFS.append(vmAttr);
-
+
// Create hardware fieldset
var hwFS = $('');
var hwLegend = $('');
hwFS.append(hwLegend);
-
+
var hwAttr = $('');
hwFS.append($('
'));
hwFS.append(hwAttr);
-
+
// Create image fieldset
var imgFS = $('');
var imgLegend = $('');
imgFS.append(imgLegend);
-
+
var imgAttr = $('');
imgFS.append($('
'));
imgFS.append(imgAttr);
-
+
provForm.append(vmFS, hwFS, imgFS);
-
+
// Create hypervisor input
var host = $('');
var hostLabel = $('');
@@ -255,14 +255,14 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
var hostInput = $('');
host.append(hostInput);
vmAttr.append(host);
-
+
// Create group input
var group = $('');
var groupLabel = $('');
group.append(groupLabel);
// Turn on auto complete for group
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
// Split group names into an array
var tmp = groupNames.split(',');
@@ -298,7 +298,7 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
memory.append(memoryLabel);
memory.append(memoryInput);
hwAttr.append(memory);
-
+
// Create processor dropdown
var cpu = $('');
var cpuLabel = $('');
@@ -315,7 +315,7 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
cpu.append(cpuLabel);
cpu.append(cpuSelect);
hwAttr.append(cpu);
-
+
// Create NIC dropdown
var nic = $('');
var nicLabel = $('');
@@ -323,7 +323,7 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
nic.append(nicLabel);
nic.append(nicInput);
hwAttr.append(nic);
-
+
// Create disk input
var disk = $('');
var diskLabel = $('');
@@ -334,7 +334,7 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
);
disk.append(diskLabel, diskInput, diskSizeSelect);
hwAttr.append(disk);
-
+
// Create disk storage input
var storage = $('');
var storageLabel = $('');
@@ -342,13 +342,13 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
storage.append(storageLabel);
storage.append(storageInput);
hwAttr.append(storage);
-
+
// Create operating system input
var os = $('');
var osLabel = $('');
var osInput = $('');
osInput.one('focus', function() {
- var tmp = $.cookie('osvers');
+ var tmp = $.cookie('xcat_osvers');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -359,13 +359,13 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
os.append(osLabel);
os.append(osInput);
imgAttr.append(os);
-
+
// Create architecture input
var arch = $('');
var archLabel = $('');
var archInput = $('');
archInput.one('focus', function() {
- var tmp = $.cookie('osarchs');
+ var tmp = $.cookie('xcat_osarchs');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -376,13 +376,13 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
arch.append(archLabel);
arch.append(archInput);
imgAttr.append(arch);
-
+
// Create profile input
var profile = $('');
var profileLabel = $('');
var profileInput = $('');
profileInput.one('focus', function() {
- var tmp = $.cookie('profiles');
+ var tmp = $.cookie('xcat_profiles');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -393,7 +393,7 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
profile.append(profileLabel);
profile.append(profileInput);
imgAttr.append(profile);
-
+
// Create boot method dropdown
var method = $('');
var methodLabel = $('');
@@ -417,10 +417,10 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
// Remove any warning messages
$(this).parents('.ui-tabs-panel').find('.ui-state-error').remove();
var ready = true;
-
+
// Get tab ID
var tabId = $(this).parents('.ui-tabs-panel').attr('id');
-
+
// Check if fields are properly filled in
var inputs = $('#' + tabId + ' input:visible');
for ( var i = 0; i < inputs.length; i++) {
@@ -431,7 +431,7 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
inputs.eq(i).css('border', 'solid #BDBDBD 1px');
}
}
-
+
var selects = $('#' + tabId + ' select:visible');
for ( var i = 0; i < selects.length; i++) {
if (!selects.eq(i).val()) {
@@ -441,30 +441,30 @@ kvmPlugin.prototype.loadProvisionPage = function(tabId) {
selects.eq(i).css('border', 'solid #BDBDBD 1px');
}
}
-
+
if (ready) {
var inst = tabId.replace('kvmProvisionTab', '');
-
+
// Prepend status bar
var statBar = createStatusBar('kvmProvisionStatBar' + inst);
statBar.append(createLoader(''));
statBar.prependTo($('#' + tabId));
-
+
var host = $('#' + tabId + ' input[name=host]').val();
var group = $('#' + tabId + ' select[name=group]').val();
var node = $('#' + tabId + ' input[name=node]').val();
-
+
var memory = $('#' + tabId + ' input[name=memory]').val();
var cpu = $('#' + tabId + ' select[name=cpu]').val();
var nic = $('#' + tabId + ' input[name=nic]').val();
var disk = $('#' + tabId + ' input[name=disk]').val() + $('#' + tabId + ' select[name=diskUnit]').val();
var storage = $('#' + tabId + ' input[name=storage]').val();
-
+
var os = $('#' + tabId + ' input[name=os]').val();
var arch = $('#' + tabId + ' input[name=arch]').val();
var profile = $('#' + tabId + ' input[name=profile]').val();
var boot = $('#' + tabId + ' select[name=bootMethod]').val();
-
+
/**
* (1) Define node
*/
@@ -512,14 +512,14 @@ kvmPlugin.prototype.loadResources = function() {
var tabId = 'kvmResourceTab';
// Remove loader
$('#' + tabId).find('img').remove();
-
+
// Create info bar
var infoBar = createInfoBar('Not yet supported');
// Create resource form
var resrcForm = $('');
resrcForm.append(infoBar);
-
+
$('#' + tabId).append(resrcForm);
};
@@ -530,13 +530,13 @@ kvmPlugin.prototype.addNode = function() {
var dialog = $('');
var info = createInfoBar('Add a KVM node');
dialog.append(info);
-
+
// Create node inputs
dialog.append($(''));
dialog.append($(''));
dialog.append($(''));
dialog.append($(''));
-
+
dialog.dialog({
title: 'Add node',
modal: true,
@@ -555,13 +555,13 @@ kvmPlugin.prototype.addNode = function() {
function addKvmNode(){
var attr, args;
var errorMessage = '';
-
+
// Remove existing warnings
$('#addKvm .ui-state-error').remove();
-
+
// Return input border colors to normal
$('#addKvm input').css('border', 'solid #BDBDBD 1px');
-
+
// Check node attributes
$('#addKvm input').each(function(){
attr = $(this).val();
@@ -570,28 +570,28 @@ function addKvmNode(){
$(this).css('border', 'solid #FF0000 1px');
}
});
-
+
// Show error message (if any)
if (errorMessage) {
$('#addKvm').prepend(createWarnBar(errorMessage));
return;
}
-
+
// Create loader
$('#addKvm').append(createLoader());
-
+
// Change dialog buttons
$('#addKvm').dialog('option', 'buttons', {
'Close':function(){
$('#addKvm').dialog('destroy').remove();
}
});
-
+
// Generate chdef arguments
args = '-t;node;-o;' + $('#addKvm input[name="node"]').val()
+ ';ip=' + $('#addKvm input[name="ip"]').val()
- + ';groups=' + $('#addKvm input[name="groups"]').val()
- + ';vmhost=' + $('#addKvm input[name="vmhost"]').val()
+ + ';groups=' + $('#addKvm input[name="groups"]').val()
+ + ';vmhost=' + $('#addKvm input[name="vmhost"]').val()
+ ';mgt=kvm;netboot=xnba;nodetype=osi;profile=compute';
$.ajax({
url : 'lib/cmd.php',
@@ -614,16 +614,16 @@ function addKvmNode(){
msg : ''
}
});
-
+
// Remove loader
$('#addKvm img').remove();
-
+
// Get return message
var message = '';
for (var i in data.rsp) {
message += data.rsp[i] + ' ';
}
-
+
// Show return message
if (message)
$('#addKvm').prepend(createInfoBar(message));
@@ -633,7 +633,7 @@ function addKvmNode(){
/**
* Update the provision node status
- *
+ *
* @param data Data returned from HTTP request
*/
function updateKVMProvisionStatus(data) {
@@ -645,24 +645,24 @@ function updateKVMProvisionStatus(data) {
var cmd = args[0].replace('cmd=', '');
// Get provision tab instance
var inst = args[1].replace('out=', '');
-
+
// Get provision tab and status bar ID
var statBarId = 'kvmProvisionStatBar' + inst;
var tabId = 'kvmProvisionTab' + inst;
-
+
var node = $('#' + tabId + ' input[name=node]').val();
-
+
/**
* (2) Create virtual machine
*/
if (cmd == 'chdef') {
// Write ajax response to status bar
- var prg = writeRsp(rsp, '');
+ var prg = writeRsp(rsp, '');
$('#' + statBarId).find('div').append(prg);
// Get parameters
var disk = $('#' + tabId + ' input[name=disk]').val() + $('#' + tabId + ' select[name=diskUnit]').val();
-
+
// Begin installation
$.ajax( {
url : 'lib/cmd.php',
@@ -676,19 +676,19 @@ function updateKVMProvisionStatus(data) {
success : updateKVMProvisionStatus
});
- }
-
+ }
+
/**
* (3) Prepare node for boot
*/
if (cmd == 'mkvm') {
// Write ajax response to status bar
- var prg = writeRsp(rsp, '');
+ var prg = writeRsp(rsp, '');
$('#' + statBarId).find('div').append(prg);
-
+
// Get provision method
var boot = $('#' + tabId + ' select[name=bootMethod]').val();
-
+
// Prepare node for boot
$.ajax( {
url : 'lib/cmd.php',
@@ -703,14 +703,14 @@ function updateKVMProvisionStatus(data) {
success : updateKVMProvisionStatus
});
}
-
+
/**
* (4) Power on node
*/
if (cmd == 'nodeset') {
- var prg = writeRsp(rsp, '');
+ var prg = writeRsp(rsp, '');
$('#' + statBarId).find('div').append(prg);
-
+
// Prepare node for boot
$.ajax( {
url : 'lib/cmd.php',
@@ -725,16 +725,16 @@ function updateKVMProvisionStatus(data) {
success : updateKVMProvisionStatus
});
}
-
+
/**
* (5) Done
*/
else if (cmd == 'rpower') {
// Write ajax response to status bar
- var prg = writeRsp(rsp, '');
+ var prg = writeRsp(rsp, '');
$('#' + statBarId).find('div').append(prg);
$('#' + statBarId).find('img').remove();
-
+
// If installation was successful
if (prg.html().indexOf('Error') == -1) {
$('#' + statBarId).find('div').append('
It will take several minutes before the nodes are up and ready. Use rcons to monitor the status of the install.
');
diff --git a/xCAT-UI/js/custom/zvm.js b/xCAT-UI/js/custom/zvm.js
index 98e1311d6..9d6525481 100644
--- a/xCAT-UI/js/custom/zvm.js
+++ b/xCAT-UI/js/custom/zvm.js
@@ -166,7 +166,7 @@ zvmPlugin.prototype.loadServiceProvisionPage = function(tabId) {
loadGoldenImages(imgCol);
// Get zVM host names
- if (!$.cookie('zvms')){
+ if (!$.cookie('xcat_zvms')){
$.ajax( {
url : 'lib/srv_cmd.php',
dataType : 'json',
@@ -669,7 +669,7 @@ zvmPlugin.prototype.loadClonePage = function(node, nodeOS, nodeArch) {
var groupLabel = $('');
var groupInput = $('');
groupInput.one('focus', function(){
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
// Turn on auto complete
$(this).autocomplete({
@@ -704,7 +704,7 @@ zvmPlugin.prototype.loadClonePage = function(node, nodeOS, nodeArch) {
}
// Get list of disk pools
var temp = hcp.split('.');
- var diskPools = $.cookie(temp[0] + 'diskpools');
+ var diskPools = $.cookie('xcat_' + temp[0] + 'diskpools');
// Create disk pool input
var poolDiv = $('');
@@ -992,7 +992,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Get node
var node = args[1].replace('node=', '');
// Clear any existing cookie
- $.cookie(node + 'processes', null);
+ $.cookie('xcat_' + node + 'processes', null, {path: '/xcat', secure:true });
// Remove loader
$('#' + tabId).find('img').remove();
@@ -1127,7 +1127,7 @@ zvmPlugin.prototype.loadInventory = function(data) {
// Start off an ajax request to save the zhcp node name
// in a cookie for possible later use by addNic dialog
var hcpHostname = attrs['hcp'];
- if (!$.cookie(node+'_hcpnodename')){
+ if (!$.cookie('xcat_' + node+'_hcpnodename')){
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
@@ -2310,7 +2310,7 @@ zvmPlugin.prototype.addNode = function() {
* @param tgtNode Targets to migrate
*/
zvmPlugin.prototype.loadMigratePage = function(tgtNode, fromhcp) {
- var hosts = $.cookie('zvms').split(',');
+ var hosts = $.cookie('xcat_zvms').split(',');
var radio, zvmBlock, args;
var zvms = new Array();
var hcp = new Object();
diff --git a/xCAT-UI/js/custom/zvmUtils.js b/xCAT-UI/js/custom/zvmUtils.js
index 33926ad27..3ff044834 100644
--- a/xCAT-UI/js/custom/zvmUtils.js
+++ b/xCAT-UI/js/custom/zvmUtils.js
@@ -124,7 +124,7 @@ function loadHcpInfo(data) {
if (userEntry[0].indexOf('Failed') < 0) {
if (hcp) {
// If there is no cookie for the disk pool names
- if (!$.cookie(hcp + 'diskpools') || $.cookie(hcp + 'diskpools') === null) {
+ if (!$.cookie('xcat_' + hcp + 'diskpools') || $.cookie('xcat_' + hcp + 'diskpools') === null) {
if (nodeInfoBar !== null) {
nodeInfoBar.append(" Finding pools and networks...");
findingPools = 1;
@@ -152,7 +152,7 @@ function loadHcpInfo(data) {
}
// If there is no cookie for the zFCP pool names
- if (!$.cookie(hcp + 'zfcppools') || $.cookie(hcp + 'zfcppools') === null) {
+ if (!$.cookie('xcat_' + hcp + 'zfcppools') || $.cookie('xcat_' + hcp + 'zfcppools') === null) {
if (nodeInfoBar !== null) {
if (findingPools = 0) {
@@ -183,7 +183,7 @@ function loadHcpInfo(data) {
}
// If there is no cookie for the network names
- if (!$.cookie(hcp + 'networks') || $.cookie(hcp + 'networks') === null) {
+ if (!$.cookie('xcat_' + hcp + 'networks') || $.cookie('xcat_' + hcp + 'networks') === null) {
if (nodeInfoBar !== null) {
if (findingPools = 0) {
@@ -374,13 +374,13 @@ function loadUserEntry(data) {
*/
function incrementNodeProcess(node) {
// Get current processes
- var procs = $.cookie(node + 'processes');
+ var procs = $.cookie('xcat_' + node + 'processes');
if (procs) {
// One more process
procs = parseInt(procs) + 1;
- $.cookie(node + 'processes', procs);
+ $.cookie('xcat_' + node + 'processes', procs);
} else {
- $.cookie(node + 'processes', 1);
+ $.cookie('xcat_' + node + 'processes', 1);
}
}
@@ -517,7 +517,7 @@ function updateZProvisionNewStatus(data) {
// Set cookie for number of disks
var diskRows = $('#' + tabId + ' table:eq(0):visible tbody tr');
- $.cookie('disks2add' + out2Id, diskRows.length);
+ $.cookie('xcat_disks2add' + out2Id, diskRows.length, {path: '/xcat', secure:true });
if (diskRows.length > 0) {
for (var i = 0; i < diskRows.length; i++) {
var diskArgs = diskRows.eq(i).find('td');
@@ -558,7 +558,7 @@ function updateZProvisionNewStatus(data) {
// Set cookie for number of zFCP devices
var zfcpRows = $('#' + tabId + ' table:eq(1):visible tbody tr');
- $.cookie('zfcp2add' + out2Id, zfcpRows.length);
+ $.cookie('xcat_zfcp2add' + out2Id, zfcpRows.length, {path: '/xcat', secure:true });
if (zfcpRows.length > 0) {
for ( var i = 0; i < zfcpRows.length; i++) {
var diskArgs = zfcpRows.eq(i).find('td');
@@ -581,10 +581,16 @@ function updateZProvisionNewStatus(data) {
var args = '--addzfcp;' + pool + ';' + address + ';' + loaddev + ';' + size;
if (tag && tag != "null") {
args += ';' + tag;
+ } else {
+ args += ';';
} if (portName && tag != "null") {
args += ';' + portName;
+ } else {
+ args += ';';
} if (unitNo && tag != "null") {
args += ';' + unitNo;
+ } else {
+ args += ';';
}
// Attach zFCP device to node
@@ -625,19 +631,19 @@ function updateZProvisionNewStatus(data) {
} else {
// Set cookie for number of disks
// One less disk to add
- var disks2add = $.cookie('disks2add' + out2Id);
+ var disks2add = $.cookie('xcat_disks2add' + out2Id);
if (lastCmd == 'chvm-disk') {
if (disks2add > 0) {
disks2add--;
- $.cookie('disks2add' + out2Id, disks2add);
+ $.cookie('xcat_disks2add' + out2Id, disks2add, {path: '/xcat', secure:true });
}
}
- var zfcp2add = $.cookie('zfcp2add' + out2Id);
+ var zfcp2add = $.cookie('xcat_zfcp2add' + out2Id);
if (lastCmd == 'chvm-zfcp') {
if (zfcp2add > 0) {
zfcp2add--;
- $.cookie('zfcp2add' + out2Id, zfcp2add);
+ $.cookie('xcat_zfcp2add' + out2Id, zfcp2add, {path: '/xcat', secure:true });
}
}
@@ -887,10 +893,10 @@ function updateZNodeStatus(data) {
var rsp = data.rsp;
// Get cookie for number processes performed against this node
- var actions = $.cookie(node + 'processes');
+ var actions = $.cookie('xcat_' + node + 'processes');
// One less process
actions = actions - 1;
- $.cookie(node + 'processes', actions);
+ $.cookie('xcat_' + node + 'processes', actions, {path: '/xcat', secure:true });
if (actions < 1) {
// Hide loader when there are no more processes
@@ -1116,7 +1122,7 @@ function getZResources(data) {
}
// Set hardware control point cookie
- $.cookie('hcp', hcps);
+ $.cookie('xcat_hcp', hcps, {path: '/xcat', secure:true });
// Delete loader
$('#' + tabId).find('img[src="images/loader.gif"]').remove();
@@ -1137,10 +1143,10 @@ function getZResources(data) {
// Create a array for hardware control points
var hcps = new Array();
- if ($.cookie('hcp').indexOf(',') > -1) {
- hcps = $.cookie('hcp').split(',');
+ if ($.cookie('xcat_hcp').indexOf(',') > -1) {
+ hcps = $.cookie('xcat_hcp').split(',');
} else {
- hcps.push($.cookie('hcp'));
+ hcps.push($.cookie('xcat_hcp'));
}
// Query the disk pools for each hcp
@@ -1185,10 +1191,10 @@ function getZResources(data) {
// Create a array for hardware control points
var hcps = new Array();
- if ($.cookie('hcp').indexOf(',') > -1) {
- hcps = $.cookie('hcp').split(',');
+ if ($.cookie('xcat_hcp').indexOf(',') > -1) {
+ hcps = $.cookie('xcat_hcp').split(',');
} else {
- hcps.push($.cookie('hcp'));
+ hcps.push($.cookie('xcat_hcp'));
}
@@ -1235,10 +1241,10 @@ function getZResources(data) {
// Create a array for hardware control points
var hcps = new Array();
- if ($.cookie('hcp').indexOf(',') > -1) {
- hcps = $.cookie('hcp').split(',');
+ if ($.cookie('xcat_hcp').indexOf(',') > -1) {
+ hcps = $.cookie('xcat_hcp').split(',');
} else {
- hcps.push($.cookie('hcp'));
+ hcps.push($.cookie('xcat_hcp'));
}
// Query the networks for each
@@ -1442,7 +1448,7 @@ function openAddProcDialog(node) {
*/
function openAddDiskDialog(node, hcp) {
// Get list of disk pools
- var cookie = $.cookie(hcp + 'diskpools');
+ var cookie = $.cookie('xcat_' + hcp + 'diskpools');
var pools = new Array();
if (cookie) {
pools = cookie.split(',');
@@ -1605,7 +1611,7 @@ function openAddDiskDialog(node, hcp) {
*/
function openAddZfcpDialog(node, hcp, zvm) {
// Get list of disk pools
- var cookie = $.cookie(hcp + 'zfcppools');
+ var cookie = $.cookie('xcat_' + hcp + 'zfcppools');
var pools = new Array();
if (cookie) {
pools = cookie.split(',');
@@ -2492,8 +2498,8 @@ function openAddScsi2SystemDialog(hcp) {
var fcpWwpn = $('
');
devPathRow.append(fcpWwpn);
- if ($.cookie('zvms')) {
- zvms = $.cookie('zvms').split(',');
+ if ($.cookie('xcat_zvms')) {
+ zvms = $.cookie('xcat_zvms').split(',');
var zvm;
for (var i in zvms) {
if( !zvms[i] || 0 === zvms[i].length) continue;
@@ -2807,7 +2813,7 @@ function openAddNicDialog(node, hcp) {
// Get the hcp node name for the node
// Should be in a cookie, else just take first part of hostname
- var hcpNode = $.cookie(node+'_hcpnodename');
+ var hcpNode = $.cookie('xcat_' + node+'_hcpnodename');
if (!hcpNode) {
if (typeof console == "object"){
console.log("openAddNicDialog did not find cookie for <"+node+"_hcpnodename> Using first token in hostname");
@@ -2819,7 +2825,7 @@ function openAddNicDialog(node, hcp) {
}
// Get network names
- var cookie = $.cookie(hcpNode + 'networks');
+ var cookie = $.cookie('xcat_' + hcpNode + 'networks');
var networks = new Array();
if (cookie) {
networks = cookie.split(',');
@@ -3772,14 +3778,14 @@ function removeNic(node, nic) {
* @param data Data from HTTP request
*/
function setNetworkCookies(data) {
- if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1) {
+ if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Error") == -1) {
var node = data.msg;
var networks = data.rsp[0].split(node + ': ');
// Set cookie to expire in 60 minutes
var exDate = new Date();
exDate.setTime(exDate.getTime() + (60 * 60 * 1000));
- $.cookie(node + 'networks', networks, { expires: exDate });
+ $.cookie('xcat_' + node + 'networks', networks, { expires: exDate, path: '/xcat', secure:true });
}
}
@@ -3789,7 +3795,7 @@ function setNetworkCookies(data) {
* @param data HTTP request data
*/
function getDiskPool(data) {
- if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Invalid") == -1) {
+ if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Invalid") == -1 && data.rsp[0].indexOf("Error") == -1) {
var hcp = data.msg;
var pools = data.rsp[0].split(hcp + ': ');
@@ -3854,9 +3860,10 @@ function getZfcpPool(data) {
if (typeof console == "object"){
console.log("Entering getZfcpPool.");
}
- if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Invalid") == -1) {
+ if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Invalid") == -1 && data.rsp[0].indexOf("Error") == -1) {
var hcp = data.msg;
var pools = data.rsp[0].split(hcp + ': ');
+ zhcpQueryCountForZfcps = 0;
// Get contents of each disk pool
for (var i in pools) {
pools[i] = jQuery.trim(pools[i]);
@@ -3900,7 +3907,7 @@ function getZfcpPool(data) {
* @param data HTTP request data
*/
function getNetwork(data) {
- if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Invalid") == -1) {
+ if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Invalid") == -1 && data.rsp[0].indexOf("Error") == -1) {
var hcp = data.msg;
var networks = data.rsp[0].split(hcp + ': ');
if (typeof console == "object"){
@@ -3962,7 +3969,7 @@ function loadDiskPoolTable(data) {
var args, hcp, pool, stat, tmp;
if (data && typeof data.rsp != "undefined") {
// Do not continue if the call failed
- if (!data.rsp.length && data.rsp[0].indexOf("Failed") > 0) {
+ if (!data.rsp.length && data.rsp[0].indexOf("Failed") > 0 && data.rsp[0].indexOf("Error") > 0) {
return;
}
@@ -4065,10 +4072,10 @@ function loadDiskPoolTable(data) {
// Create a array for hardware control points
var hcps = new Array();
- if ($.cookie('hcp').indexOf(',') > -1)
- hcps = $.cookie('hcp').split(',');
+ if ($.cookie('xcat_hcp').indexOf(',') > -1)
+ hcps = $.cookie('xcat_hcp').split(',');
else
- hcps.push($.cookie('hcp'));
+ hcps.push($.cookie('xcat_hcp'));
zhcpQueryCountForDisks = hcps.length;
// Query the disk pools for each
@@ -4179,15 +4186,45 @@ function loadZfcpPoolTable(data) {
}
// Delete loader if last one
var panelId = 'zfcpResource';
- if (!zhcpQueryCountForZfcps) {
+ if (zhcpQueryCountForZfcps <= 0) {
$('#' + panelId).find('img[src="images/loader.gif"]').remove();
}
var hcp2zvm = new Object();
var args, hcp, pool, tmp;
+
+ // Resource tab ID
+ var info = $('#' + panelId).find('.ui-state-highlight');
+
+ // Is there any data passed? Process if some
if (typeof data.rsp != "undefined") {
- // Do not continue if the call failed
- if (!data.rsp.length && data.rsp[0].indexOf("Failed") > 0) {
+ // Do not continue if no data to add
+ if (!data.rsp.length) {
+ if (typeof console == "object"){
+ console.log("data.rsp.length is 0.");
+ }
+ // If there is no info bar, create info bar
+ var msgError = ' Unexpected, no data returned on the lsvm --zfcppool call.';
+ if (!info.length) {
+ info = createInfoBar(msgError);
+ $('#' + panelId).append(info);
+ } else {
+ info.append(msgError);
+ }
+ return;
+ }
+ if (data.rsp[0].indexOf("Failed") > 0 || data.rsp[0].indexOf("Error") > 0) {
+ if (typeof console == "object"){
+ console.log("Failed on lsvm call for --zfcppool");
+ }
+ var msgError = ' Error: Error on call to check zfcp pools: '+ data.rsp[0];
+ // If there is no info bar, create info bar
+ if (!info.length) {
+ info = createInfoBar(msgError);
+ $('#' + panelId).append(info);
+ } else {
+ info.append(msgError);
+ }
return;
}
@@ -4200,13 +4237,14 @@ function loadZfcpPoolTable(data) {
tmp = data.rsp[0].split(hcp + ': ');
} else {
// Provide empty values so the table will be generated
+ if (typeof console == "object"){
+ console.log("Creating empty zfcp pool table.");
+ }
hcp = '';
pool = ''
tmp = new Array();
}
- // Resource tab ID
- var info = $('#' + panelId).find('.ui-state-highlight');
// If there is no info bar, create info bar
if (!info.length) {
info = createInfoBar('Below are devices that are defined internally in the zFCP pools.');
@@ -4248,7 +4286,8 @@ function loadZfcpPoolTable(data) {
tmp[i] = jQuery.trim(tmp[i]);
var diskAttrs = tmp[i].split(',');
diskAttrs[0] = diskAttrs[0].toLowerCase();
- var key = hcp2zvm[hcp] + '-' + pool + '-' + diskAttrs[2];
+ // Key contains row data to be returned when the checkbox is selected
+ var key = hcp2zvm[hcp] + '-' + pool + '-' + diskAttrs[2] + '-' + diskAttrs[1];
dTable.fnAddData( [ '', hcp2zvm[hcp], pool, diskAttrs[0], diskAttrs[1], diskAttrs[2], diskAttrs[3], diskAttrs[4], diskAttrs[5], diskAttrs[6], diskAttrs[7] ]);
}
}
@@ -4266,6 +4305,9 @@ function loadZfcpPoolTable(data) {
// Delete disk from pool
var removeLnk = $('Remove');
removeLnk.bind('click', function(event){
+ if (typeof console == "object"){
+ console.log("Remove button clicked for tableId:"+tableId);
+ }
var disks = getNodesChecked(tableId);
openRemoveZfcpFromPoolDialog(disks);
});
@@ -4278,10 +4320,10 @@ function loadZfcpPoolTable(data) {
// Create a array for hardware control points
var hcps = new Array();
- if ($.cookie('hcp').indexOf(',') > -1)
- hcps = $.cookie('hcp').split(',');
+ if ($.cookie('xcat_hcp').indexOf(',') > -1)
+ hcps = $.cookie('xcat_hcp').split(',');
else
- hcps.push($.cookie('hcp'));
+ hcps.push($.cookie('xcat_hcp'));
// Query the disk pools for each
zhcpQueryCountForZfcps = hcps.length;
@@ -4643,7 +4685,11 @@ function openRemoveZfcpFromPoolDialog(devices2remove) {
// Verify disks are in the same zFCP pool
var devices = devices2remove.split(',');
+ if (typeof console == "object"){
+ console.log("Entering openRemoveZfcpFromPoolDialog. Device to remove:<"+devices2remove+">");
+ }
var tmp, tgtPool, tgtHcp;
+ var tgtPort = "";
var tgtUnitNo = "";
for (var i in devices) {
if( !devices[i] || 0 === devices[i].length) continue;
@@ -4658,6 +4704,7 @@ function openRemoveZfcpFromPoolDialog(devices2remove) {
tgtHcp = tmp[0]; // Assume it is just one zHCP. Otherwise, this cannot be done on multiple zHCPs.
tgtUnitNo += tmp[2] + ",";
+ tgtPort = tmp[3];
}
// Strip out last comma
@@ -4673,7 +4720,7 @@ function openRemoveZfcpFromPoolDialog(devices2remove) {
var pool = $('');
var unitNo = $('');
- var portName = $('');
+ var portName = $('');
deleteDiskForm.append(system, pool, unitNo, portName);
// Append options for hardware control points
@@ -4760,7 +4807,9 @@ function openRemoveZfcpFromPoolDialog(devices2remove) {
msg : dialogId
},
- success : updateResourceDialog
+ success : function(data) {
+ updateResourceDialog(data);
+ }
});
},
"Cancel": function() {
@@ -4984,7 +5033,7 @@ function loadNetworkTable(data) {
}
// Get zVM host names
- if (!$.cookie('zvms')) {
+ if (!$.cookie('xcat_zvms')) {
$.ajax({
url : 'lib/cmd.php',
dataType : 'json',
@@ -5002,7 +5051,7 @@ function loadNetworkTable(data) {
});
}
- var zvms = $.cookie('zvms').split(',');
+ var zvms = $.cookie('xcat_zvms').split(',');
var hcp2zvm = new Object();
var args, zvm, iHcp, tmp;
for (var i in zvms) {
@@ -5132,10 +5181,10 @@ function loadNetworkTable(data) {
// Create a array for hardware control points
var hcps = new Array();
- if ($.cookie('hcp').indexOf(',') > -1)
- hcps = $.cookie('hcp').split(',');
+ if ($.cookie('xcat_hcp').indexOf(',') > -1)
+ hcps = $.cookie('xcat_hcp').split(',');
else
- hcps.push($.cookie('hcp'));
+ hcps.push($.cookie('xcat_hcp'));
// Query networks
zhcpQueryCountForNetworks = hcps.length;
@@ -5206,7 +5255,7 @@ function connect2GuestLan(data) {
$('#' + node + 'StatusBar').find('div').append(prg);
// Continue if no errors found
- if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1) {
+ if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Error") == -1) {
// Connect NIC to Guest LAN
$.ajax( {
url : 'lib/cmd.php',
@@ -5261,7 +5310,7 @@ function connect2VSwitch(data) {
$('#' + node + 'StatusBar').find('div').append(prg);
// Continue if no errors found
- if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1) {
+ if (data.rsp.length && data.rsp[0].indexOf("Failed") == -1 && data.rsp[0].indexOf("Error") == -1) {
// Connect NIC to VSwitch
$.ajax( {
url : 'lib/cmd.php',
@@ -5317,7 +5366,7 @@ function createZProvisionExisting(inst) {
group.append(groupLabel);
// Turn on auto complete for group
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
// Split group names into an array
var tmp = groupNames.split(',');
@@ -5363,7 +5412,7 @@ function createZProvisionExisting(inst) {
var osSelect = $('');
osSelect.append($(''));
- var imageNames = $.cookie('imagenames').split(',');
+ var imageNames = $.cookie('xcat_imagenames').split(',');
if (imageNames) {
imageNames.sort();
for (var i in imageNames) {
@@ -5542,7 +5591,7 @@ function createZProvisionNew(inst) {
var groupInput = $('');
// Get groups on-focus
groupInput.one('focus', function(){
- var groupNames = $.cookie('groups');
+ var groupNames = $.cookie('xcat_groups');
if (groupNames) {
// Turn on auto complete
$(this).autocomplete({
@@ -5603,7 +5652,7 @@ function createZProvisionNew(inst) {
},
success: function(data) {
- if (data.rsp.length && (data.rsp[0].indexOf("Failed") > -1 || data.rsp[0].indexOf("Invalid") > -1) ) {
+ if (data.rsp.length && (data.rsp[0].indexOf("Failed") > -1 || data.rsp[0].indexOf("Invalid") > -1 || data.rsp[0].indexOf("Error") > -1) ) {
// Remove the progress gif, since bailing out
removeProvisionLoadingGif(provisionStatusBar);
@@ -5711,7 +5760,7 @@ function createZProvisionNew(inst) {
console.log("Looking for cookies from <" + zhcpToCheck + ">");
}
- if (!$.cookie(zhcpToCheck + 'diskpools')) {
+ if (!$.cookie('xcat_' + zhcpToCheck + 'diskpools')) {
// Get disk pools
$.ajax({
url : 'lib/cmd.php',
@@ -5732,7 +5781,7 @@ function createZProvisionNew(inst) {
checkProvisionCallsDone(provisionStatusBar, ajaxCalls, "diskpoolnames");
}
- if (!$.cookie(zhcpToCheck + 'zfcppools')) {
+ if (!$.cookie('xcat_' + zhcpToCheck + 'zfcppools')) {
// Get zFCP pools
$.ajax({
url : 'lib/cmd.php',
@@ -5753,7 +5802,7 @@ function createZProvisionNew(inst) {
checkProvisionCallsDone(provisionStatusBar, ajaxCalls, "zfcppoolnames");
}
- if (!$.cookie(zhcpToCheck + 'userprofiles')) {
+ if (!$.cookie('xcat_' + zhcpToCheck + 'userprofiles')) {
// Get zFCP pools
$.ajax( {
url : 'lib/cmd.php',
@@ -5780,7 +5829,7 @@ function createZProvisionNew(inst) {
var thisUserProfile = $('#' + thisTabId + ' select[name=userProfile]');
thisUserProfile.children().remove();
- var definedUserProfiles = $.cookie(zhcpToCheck + 'userprofiles').split(',');
+ var definedUserProfiles = $.cookie('xcat_' + zhcpToCheck + 'userprofiles').split(',');
for (var i in definedUserProfiles) {
if( !definedUserProfiles[i] || 0 === definedUserProfiles[i].length) continue;
thisUserProfile.append('');
@@ -5789,7 +5838,7 @@ function createZProvisionNew(inst) {
var thisNetwork = $('#' + thisTabId + ' select[name=network]');
thisNetwork.children().remove();
thisNetwork.append(''); // No profile option
- var definedNetworks = $.cookie(zhcpToCheck + 'networks').split(',');
+ var definedNetworks = $.cookie('xcat_' + zhcpToCheck + 'networks').split(',');
for (var i in definedNetworks) {
if( !definedNetworks[i] || 0 === definedNetworks[i].length) continue;
if (!jQuery.trim(definedNetworks[i]))
@@ -5854,7 +5903,7 @@ function createZProvisionNew(inst) {
var osSelect = $('');
osSelect.append($(''));
- var imageNames = $.cookie('imagenames').split(',');
+ var imageNames = $.cookie('xcat_imagenames').split(',');
if (imageNames) {
imageNames.sort();
for (var i in imageNames) {
@@ -5939,7 +5988,6 @@ function createZProvisionNew(inst) {
'' +
'');
var cpuSelect = $('
';
-
+
// Gganglia grid overview
var showStr = '
Grid Overview
' +
'[Hide]
' +
@@ -181,11 +181,11 @@ function checkGangliaRunning(data) {
// Get summary data and draw on page
$('#gangliaGridSummary').append('Getting grid summary data ');
sendGridSummaryAjax();
-
+
// Get all nodes location data which can support the zoom monitor
$('#gangliaNodes').append('Getting all nodes status ');
sendLocationAjax();
-
+
// Bind the hide/show button event
$('#gangliamon #hidesup').bind('click', function(){
if ('[Hide]' == $(this).text()) {
@@ -193,7 +193,7 @@ function checkGangliaRunning(data) {
} else {
$(this).html('[Hide]');
}
-
+
$('#gangliaGridSummary').toggle();
});
}
@@ -211,16 +211,16 @@ function sendLocationAjax() {
args : 'graph',
msg : ''
},
-
+
success: function(data){
if (!data.rsp[0]) {
return;
}
-
+
extractLocationlData(data.rsp[0]);
// Get nodes current status and draw on the page
sendNodeCurrentAjax();
-
+
// Start the timer to update page per minute
gangliaTimer = window.setTimeout('updateGangliaPage()', 60000);
}
@@ -235,14 +235,14 @@ function extractLocationlData(locationData) {
cechash = new Object();
bladehash = new Object();
rackhash = new Object();
-
+
// Linux nodes which has no parent
linuxArray = new Array();
-
+
// Other unknown nodes only have one parent, use number 1 as there parent
otherhash = new Object();
otherhash[1] = new Array();
-
+
var allnodearray = locationData.split(';');
var temparray;
var parent = '';
@@ -250,7 +250,7 @@ function extractLocationlData(locationData) {
for (var i in allnodearray) {
temparray = allnodearray[i].split(':');
name = temparray[0];
-
+
// If there is not parent (or mpa, or rack) information
parent = temparray[2];
if (!parent) {
@@ -258,26 +258,26 @@ function extractLocationlData(locationData) {
otherhash[1].push(name);
continue;
}
-
+
switch (temparray[1].toLowerCase()) {
case 'blade': {
if (!bladehash[parent]) {
bladehash[parent] = new Array();
}
-
+
bladehash[parent].push(name);
}
break;
-
+
case 'systemx': {
if (!rackhash[parent]) {
rackhash[parent] = new Array();
}
-
+
rackhash[parent].push(name);
}
break;
-
+
case 'frame': {
if (!framehash[name]) {
framehash[name] = new Array();
@@ -289,21 +289,21 @@ function extractLocationlData(locationData) {
if (!framehash[parent]) {
framehash[parent] = new Array();
}
-
+
framehash[parent].push(name);
}
break;
-
+
case 'lpar':
case 'lpar,osi':
case 'osi,lpar': {
if (!cechash[parent]) {
cechash[parent] = new Array();
}
-
+
cechash[parent].push(name);
}
-
+
break;
default: {
otherhash[1].push(name);
@@ -327,7 +327,7 @@ function sendGridSummaryAjax() {
args : 'gangliashow;_grid_;hour;_summary_',
msg : ''
},
-
+
success: function(data) {
createGridSummaryData(data.rsp[0]);
drawGridSummary();
@@ -339,7 +339,7 @@ function sendGridSummaryAjax() {
* Send AJAX request to get nodes current load information
*/
function sendNodeCurrentAjax() {
-
+
// Get all nodes current status
$.ajax({
url : 'lib/cmd.php',
@@ -350,7 +350,7 @@ function sendNodeCurrentAjax() {
args : 'gangliacurrent;node;',
msg : ''
},
-
+
success: function(data){
createNodeStatusData(data.rsp[0]);
drawGangliaNodesArea($('#gangliaorder').val());
@@ -372,7 +372,7 @@ function sendGridCurrentAjax(){
args : 'gangliacurrent;grid',
msg : ''
},
-
+
success: function(data){
updateGridSummaryData(data.rsp[0]);
drawGridSummary();
@@ -381,13 +381,13 @@ function sendGridCurrentAjax(){
}
/**
- * Save the grid summary data to local global variable
+ * Save the grid summary data to local global variable
*/
function createGridSummaryData(summaryString){
// Empty the global data
// The data structure looks like: metric1:time11,val11,time12,val12,...;metric2:time21,val21,time22,val22,...;....
gridData = new Object();
-
+
var metricArray = summaryString.split(';');
var metricname = '';
var valueArray = '';
@@ -395,13 +395,13 @@ function createGridSummaryData(summaryString){
var tempLength = 0;
for (var index = 0; index < metricArray.length; index++) {
position = metricArray[index].indexOf(':');
-
+
// Get the metric name and init its global array to save timestamp and value pair
metricname = metricArray[index].substr(0, position);
gridData[metricname] = new Array();
valueArray = metricArray[index].substr(position + 1).split(',');
tempLength = valueArray.length;
-
+
// Save timestamp and value into global array
for (var i = 0; i < tempLength; i++) {
gridData[metricname].push(Number(valueArray[i]));
@@ -420,7 +420,7 @@ function updateGridSummaryData(currentString){
var tempLength = 0;
var index = 0;
var tempArray;
-
+
tempLength = metricArray.length;
for (index = 0; index < tempLength; index++) {
position = metricArray[index].indexOf(':');
@@ -442,19 +442,19 @@ function drawGridSummary() {
var gridDrawArea = $('#gangliaGridSummary');
var showStr = '';
var tempStr = $('#gangliamon').attr('class');
-
+
// jqflot only draws on the visible area
// If the tab is hide, return directly
if (tempStr.indexOf('hide') != -1) {
return;
}
-
+
if ($('#gangliamon #hidesup').text() == '[Show]') {
return;
}
-
+
gridDrawArea.empty();
- showStr = '
' +
+ showStr = '
' +
'
' +
'
' +
'
' +
@@ -470,7 +470,7 @@ function drawGridSummary() {
/**
* Draw the load flot by data (summary data or one node data)
- *
+ *
* @param areaid Which DIV draw this flot
* @param loadpair The load timestamp and value pair
* @param cpupair The CPU number and value pair
@@ -481,7 +481,7 @@ function drawLoadFlot(areaid, titleprefix, loadpair, cpupair) {
var index = 0;
var yaxismax = 0;
var interval = 1;
-
+
$('#' + areaid).empty();
// Parse load pair, the timestamp must mutiply 1000, javascript time stamp is millisecond
for (index = 0; index < loadpair.length; index += 2) {
@@ -490,7 +490,7 @@ function drawLoadFlot(areaid, titleprefix, loadpair, cpupair) {
yaxismax = loadpair[index + 1];
}
}
-
+
// Parse cpu pair
for (index = 0; index < cpupair.length; index += 2) {
cpunum.push([cpupair[index] * 1000, cpupair[index + 1]]);
@@ -498,12 +498,12 @@ function drawLoadFlot(areaid, titleprefix, loadpair, cpupair) {
yaxismax = cpupair[index + 1];
}
}
-
+
interval = parseInt(yaxismax / 3);
if (interval < 1) {
interval = 1;
}
-
+
$.jqplot(areaid, [load, cpunum], {
title: titleprefix + ' Loads/Procs Last Hour',
axes:{
@@ -531,7 +531,7 @@ function drawLoadFlot(areaid, titleprefix, loadpair, cpupair) {
/**
* Draw the CPU usage flot by data (maybe summary data or one node data)
- *
+ *
* @param areaid Which DIV draw this flot
* @param titleprefix Title used name
* @param cpupair The CPU timestamp and value pair
@@ -539,15 +539,15 @@ function drawLoadFlot(areaid, titleprefix, loadpair, cpupair) {
function drawCpuFlot(areaid, titleprefix, cpupair) {
var cpu = new Array();
var index = 0;
-
+
$('#' + areaid).empty();
-
+
// Time stamp should be mutiplied by 1000
// We get the CPU idle from server
for (index = 0; index < cpupair.length; index +=2) {
cpu.push([(cpupair[index] * 1000), (100 - cpupair[index + 1])]);
}
-
+
$.jqplot(areaid, [cpu],{
title: titleprefix + ' Cpu Use Last Hour',
axes:{
@@ -571,7 +571,7 @@ function drawCpuFlot(areaid, titleprefix, cpupair) {
/**
* Draw the memory usage flot by data (summary data or one node data)
- *
+ *
* @param areaid Which DIV draw this flot
* @param titleprefix Title used name
* @param cpupair The CPU timestamp and value pair
@@ -581,14 +581,14 @@ function drawMemFlot(areaid, titleprefix, freepair, totalpair){
var total = new Array();
var tempsize = 0;
var index = 0;
-
+
$('#' + areaid).empty();
if (freepair.length < totalpair.length) {
tempsize = freepair.length;
} else {
tempsize = freepair.length;
}
-
+
for (index = 0; index < tempsize; index += 2) {
var temptotal = totalpair[index + 1];
var tempuse = temptotal - freepair[index + 1];
@@ -597,7 +597,7 @@ function drawMemFlot(areaid, titleprefix, freepair, totalpair){
total.push([totalpair[index] * 1000, temptotal]);
use.push([freepair[index] * 1000, tempuse]);
}
-
+
$.jqplot(areaid, [use, total], {
title: titleprefix + ' Memory Use Last Hour',
axes:{
@@ -625,7 +625,7 @@ function drawMemFlot(areaid, titleprefix, freepair, totalpair){
/**
* Draw the disk usage flot by data (summary data or one node's data)
- *
+ *
* @param areaid Which div draw this flot
* @param titleprefix Title used name
* @param freepair The free disk number, Ganglia only logs the free data
@@ -636,21 +636,21 @@ function drawDiskFlot(areaid, titleprefix, freepair, totalpair) {
var total = new Array();
var tempsize = 0;
var index = 0;
-
+
$('#' + areaid).empty();
if (freepair.length < totalpair.length) {
tempsize = freepair.length;
} else{
tempsize = freepair.length;
}
-
+
for (index = 0; index < tempsize; index += 2) {
var temptotal = totalpair[index + 1];
var tempuse = temptotal - freepair[index + 1];
total.push([totalpair[index] * 1000, temptotal]);
use.push([freepair[index] * 1000, tempuse]);
}
-
+
$.jqplot(areaid, [use, total], {
title: titleprefix + ' Disk Use Last Hour',
axes:{
@@ -678,7 +678,7 @@ function drawDiskFlot(areaid, titleprefix, freepair, totalpair) {
/**
* Draw the network load flot by data (summary data or one node data)
- *
+ *
* @param areaid Which div draw this flot
* @param titleprefix Title used name
* @param inpair The timestamp and value pair for download
@@ -691,19 +691,19 @@ function drawNetworkFlot(areaid, titleprefix, inpair, outpair) {
var maxvalue = 0;
var unitname = 'B';
var divisor = 1;
-
+
for (index = 0; index < inpair.length; index += 2) {
if (inpair[index + 1] > maxvalue) {
maxvalue = inpair[index + 1];
}
}
-
+
for (index = 0; index < outpair.length; index += 2) {
if (outpair[index + 1] > maxvalue) {
maxvalue = outpair[index + 1];
}
}
-
+
if (maxvalue > 3000000) {
divisor = 1000000;
unitname = 'GB';
@@ -713,15 +713,15 @@ function drawNetworkFlot(areaid, titleprefix, inpair, outpair) {
} else {
// Do nothing
}
-
+
for (index = 0; index < inpair.length; index += 2) {
inArray.push([(inpair[index] * 1000), (inpair[index + 1] / divisor)]);
}
-
+
for (index = 0; index < outpair.length; index += 2) {
outArray.push([(outpair[index] * 1000), (outpair[index + 1] / divisor)]);
}
-
+
$.jqplot(areaid, [inArray, outArray], {
title: titleprefix + ' Network Last Hour',
axes:{
@@ -749,7 +749,7 @@ function drawNetworkFlot(areaid, titleprefix, inpair, outpair) {
/**
* Create node status data
- *
+ *
* @param nodesStatus Node status
*/
function createNodeStatusData(nodesStatus) {
@@ -759,15 +759,15 @@ function createNodeStatusData(nodesStatus) {
var index = 0;
var tempArray;
var tempStr = '';
-
+
for (index in nodePath) {
delete(nodePath[index]);
}
-
+
for (index in nodeStatus) {
delete(nodeStatus[index]);
}
-
+
for (index = 0; index < nodesArray.length; index++) {
tempStr = nodesArray[index];
position = tempStr.indexOf(':');
@@ -785,18 +785,18 @@ function createNodeStatusData(nodesStatus) {
*/
function drawGangliaNodesArea() {
var position = 0;
-
+
// Find out the last child's type and name
var currentobj = $('#zoomDiv span:last');
var type = currentobj.attr('name').toLowerCase();
var name = currentobj.text();
position = name.indexOf('(');
-
+
if (position > -1) {
name = name.substr(3, position - 3);
}
$('#gangliaNodes').empty();
-
+
switch (type) {
// Draw the node current status
case 'blade':
@@ -806,7 +806,7 @@ function drawGangliaNodesArea() {
drawGangliaNodesAreaPic(type, name);
}
break;
-
+
// Draw a summary table
case 'all':
case 'frame': {
@@ -825,7 +825,7 @@ function drawGangliaNodesAreaPic(type, name) {
var showStr = '';
var nodename = '';
var temparray;
-
+
switch(type) {
case 'blade': {
arraypoint = bladehash[name];
@@ -846,10 +846,10 @@ function drawGangliaNodesAreaPic(type, name) {
break;
}
$('#gangliaNodes').html('
');
-
+
temparray = arraypoint.sort();
templength = arraypoint.length;
-
+
for (index = 0; index < templength; index++) {
nodename = temparray[index];
switch (nodeStatus[nodename]) {
@@ -868,7 +868,7 @@ function drawGangliaNodesAreaPic(type, name) {
}
$('#gangliaNodes ul').append(showStr);
}
-
+
// Bind all normal and warning nodes click event
$('.monitor-normal,.monitorwarning').bind('click', function() {
var nodename = $(this).attr('title');
@@ -881,45 +881,45 @@ function drawGangliaNodesAreaTable(type, name) {
var table = $('
');
var row = '';
var usedCec = new Object();
-
+
var header = $('
Name
Type
Normal
Heavy Load
Error
Unknown
');
table.append(header);
-
+
if (type == 'all') {
for (var i in framehash) {
var framename = i;
- row = '
';
@@ -933,7 +933,7 @@ function drawGangliaNodesAreaTable(type, name) {
table.append(row);
}
}
-
+
$('#gangliaNodes').append(table);
}
@@ -947,7 +947,7 @@ function monitorStatAgg(type, inputarray) {
var nuknownnum = 0;
var tempArray;
var tempname;
-
+
switch (type) {
case 'blade':
case 'cec':
@@ -970,7 +970,7 @@ function monitorStatAgg(type, inputarray) {
return;
break;
}
-
+
for (var i in tempArray) {
tempname = tempArray[i];
switch(nodeStatus[tempname]) {
@@ -988,12 +988,12 @@ function monitorStatAgg(type, inputarray) {
break;
}
}
-
+
normalnum = normalnum?normalnum:'-';
warningnum = warningnum?warningnum:'-';
errornum = errornum?errornum:'-';
nuknownnum = nuknownnum?nuknownnum:'-';
-
+
return ('
' + normalnum + '
' + warningnum + '
' + errornum + '
' + nuknownnum + '
');
}
@@ -1004,10 +1004,10 @@ function updateGangliaPage() {
if ($('#gangliaNodes').size() < 1) {
return;
}
-
+
sendGridCurrentAjax();
sendNodeCurrentAjax();
-
+
gangliaTimer = window.setTimeout('updateGangliaPage()', 60000);
}
@@ -1021,7 +1021,7 @@ function updateZoom(obj) {
}
$(obj).removeClass('monitor-zoom-link');
$(obj).unbind('click');
-
+
drawGangliaNodesArea();
}
@@ -1031,16 +1031,16 @@ function updateZoom(obj) {
function addZoomDiv(obj) {
var name = $(obj).text();
var type = $(obj).attr('name');
-
+
var lastzoomobj = $('#zoomDiv span:last');
lastzoomobj.addClass('monitor-zoom-link');
lastzoomobj.bind('click', function() {
updateZoom(this);
});
-
+
var newcontent = ' > ' + name + '(' + type.toUpperCase() + ')';
var newli = '' + newcontent + '';
$('#zoomDiv').append(newli);
-
+
drawGangliaNodesArea();
}
\ No newline at end of file
diff --git a/xCAT-UI/js/nodes/nodes.js b/xCAT-UI/js/nodes/nodes.js
index 0ded38d52..769aa5e87 100644
--- a/xCAT-UI/js/nodes/nodes.js
+++ b/xCAT-UI/js/nodes/nodes.js
@@ -97,7 +97,7 @@ function loadNodesPage() {
success : function(data){
loadGroups(data);
- var cookieGroup = $.cookie('selectgrouponnodes');
+ var cookieGroup = $.cookie('xcat_selectgrouponnodes');
if (cookieGroup) {
$('#groups .groupdiv div').each(function(){
if ($(this).text() == cookieGroup){
@@ -231,7 +231,7 @@ function loadGroups(data) {
$(this).addClass('selectgroup');
// Save selected group into cookie
- $.cookie('selectgrouponnodes', thisGroup, { expires: 7 });
+ $.cookie('xcat_selectgrouponnodes', thisGroup, { expires: 7, path: '/xcat', secure:true });
drawNodesArea(thisGroup,'',thisGroup);
});
@@ -347,8 +347,8 @@ function drawNodesArea(targetgroup, cmdargs, message){
// Get last view (if any)
// This can be summary, nodes, or graphic
- if ($.cookie('tabindex_history')) {
- var order = $.cookie('tabindex_history').split(',');
+ if ($.cookie('xcat_tabindex_history')) {
+ var order = $.cookie('xcat_tabindex_history').split(',');
order[0] = parseInt(order[0]);
order[1] = parseInt(order[1]);
if (order[0] == 0 || order[1] == 0) {
@@ -1095,7 +1095,7 @@ function loadNodes(data) {
// Remove any warning messages
$(this).parents('.ui-tabs-panel').find('.ui-state-error').remove();
- var zhcpsCheck = $.cookie('zhcps').split(',');
+ var zhcpsCheck = $.cookie('xcat_zhcps').split(',');
var zhcpHash = new Object();
for (var h in zhcpsCheck) {
if (!zhcpHash[zhcpsCheck[h]]) {
@@ -1917,7 +1917,7 @@ function loadNode(e) {
newTabId = 'nodeTab' + inst;
}
// Reset node process
- $.cookie(node + 'Processes', 0);
+ $.cookie('xcat_' + node + 'Processes', 0, { path: '/xcat', secure:true });
// Add new tab, only if one does not exist
var loader = createLoader(newTabId + 'TabLoader');
@@ -2909,28 +2909,28 @@ function setOSImageCookies(data) {
}
// Save image names in a cookie
- $.cookie('imagenames', imageNames);
+ $.cookie('xcat_imagenames', imageNames, { path: '/xcat', secure:true });
// Save profiles in a cookie
var tmp = new Array;
for (var key in profilesHash) {
tmp.push(key);
}
- $.cookie('profiles', tmp);
+ $.cookie('xcat_profiles', tmp, { path: '/xcat', secure:true });
// Save OS versions in a cookie
tmp = new Array;
for (var key in osVersHash) {
tmp.push(key);
}
- $.cookie('osvers', tmp);
+ $.cookie('xcat_osvers', tmp, { path: '/xcat', secure:true });
// Save OS architectures in a cookie
tmp = new Array;
for (var key in osArchsHash) {
tmp.push(key);
}
- $.cookie('osarchs', tmp);
+ $.cookie('xcat_osarchs', tmp, { path: '/xcat', secure:true });
}
/**
@@ -2940,7 +2940,7 @@ function setOSImageCookies(data) {
*/
function setGroupsCookies(data) {
var rsp = data.rsp;
- $.cookie('groups', rsp);
+ $.cookie('xcat_groups', rsp, { path: '/xcat', secure:true });
}
/**
@@ -4202,7 +4202,7 @@ function advancedLoad(group){
zhcpHash[args[0]] = 1;
// If there are no disk pools or network names cookie for this hcp
- if (!$.cookie(args[0] + 'diskpools') || !$.cookie(args[0] + 'networks')) {
+ if (!$.cookie('xcat_' + args[0] + 'diskpools') || !$.cookie('xcat_' + args[0] + 'networks')) {
// Check if SMAPI is online
$.ajax({
url : 'lib/cmd.php',
@@ -4226,7 +4226,7 @@ function advancedLoad(group){
setzHcpCookies(shortzHcps);
// Retrieve z/VM hypervisors and their zHCPs
- if (!$.cookie('zvms')) {
+ if (!$.cookie('xcat_zvms')) {
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
diff --git a/xCAT-UI/js/nodes/nodeset.js b/xCAT-UI/js/nodes/nodeset.js
index aea3ea310..c1b2acfe8 100644
--- a/xCAT-UI/js/nodes/nodeset.js
+++ b/xCAT-UI/js/nodes/nodeset.js
@@ -87,7 +87,7 @@ function loadNodesetPage(tgtNodes) {
var osSelect = $('');
osSelect.append($(''));
- var imageNames = $.cookie('imagenames').split(',');
+ var imageNames = $.cookie('xcat_imagenames').split(',');
if (imageNames) {
imageNames.sort();
for (var i in imageNames) {
diff --git a/xCAT-UI/js/nodes/physical.js b/xCAT-UI/js/nodes/physical.js
index 227a002cf..e8df2d4c8 100644
--- a/xCAT-UI/js/nodes/physical.js
+++ b/xCAT-UI/js/nodes/physical.js
@@ -9,7 +9,7 @@ var selectNode;
/**
* Get all nodes useful attributes from remote server
- *
+ *
* @param dataTypeIndex The index in the array which contains attributes we need.
* @param attrNullNode The target node list for this attribute
*/
@@ -36,7 +36,7 @@ function initGraphicalData() {
/**
* Extract all nodes userful data into a hash, which will be used for creating graphical
- *
+ *
* @param data The response from xCAT command 'nodels all nodetype.nodetype ppc.parent ...'
* @return nodes list for next time query
*/
@@ -115,7 +115,7 @@ function createPhysicalLayout(nodeList) {
}
function getNodesAndDraw() {
- var groupName = $.cookie('selectgrouponnodes');
+ var groupName = $.cookie('xcat_selectgrouponnodes');
$.ajax({
url : 'lib/cmd.php',
dataType : 'json',
@@ -183,64 +183,64 @@ function fillList(nodeName, defaultnodetype) {
}
switch (nodeType) {
- case 'frame':
+ case 'frame':
if (undefined == bpaList[nodeName]) {
bpaList[nodeName] = new Array();
}
-
+
break;
case 'lpar,osi':
case 'lpar':
- case 'osi':
+ case 'osi':
if ('' == parentName) {
break;
}
-
+
if (undefined == fspList[parentName]) {
fillList(parentName, 'cec');
}
-
+
fspList[parentName]['children'].push(nodeName);
lparList[nodeName] = status;
-
+
break;
- case 'cec':
+ case 'cec':
if (undefined != fspList[nodeName]) {
break;
}
-
+
fspList[nodeName] = new Object();
fspList[nodeName]['children'] = new Array();
fspList[nodeName]['mtm'] = mtm;
-
+
if ('' == parentName) {
break;
}
-
+
if (undefined == bpaList[parentName]) {
fillList(parentName, 'frame');
}
-
+
bpaList[parentName].push(nodeName);
break;
- case 'blade':
+ case 'blade':
if (undefined == bladeList[mpa]) {
bladeList[mpa] = new Array();
}
bladeList[mpa].push(nodeName + ',' + unit);
-
+
break;
- case 'systemx':
+ case 'systemx':
if (!rack) {
rack = '_notsupply_';
}
-
+
if (undefined == rackList[rack]) {
rackList[rack] = new Array();
}
-
+
rackList[rack].push(nodeName + ',' + unit);
-
+
break;
default:
unknownList.push(nodeName);
@@ -276,8 +276,8 @@ function createGraphical() {
/**
* Create the physical/graphical layout for System p machines
- *
- * @param bpa All BPA and their related FSPs
+ *
+ * @param bpa All BPA and their related FSPs
* @param fsp All FSP and their related LPARs
* @param area The element to append graphical layout
*/
@@ -310,7 +310,7 @@ function createSystempGraphical(bpa, fsp, area) {
+ '">');
- // For P7-IH, all the CECs are insert into the frame from bottom to up,
+ // For P7-IH, all the CECs are insert into the frame from bottom to up,
// so we have to show the CECs same as the physical layout
var tempBlankDiv = $('');
var tempHeight = 0;
@@ -322,7 +322,7 @@ function createSystempGraphical(bpa, fsp, area) {
if ((0 == fspIndex) && ('9125-F2C' == fsp[fspName]['mtm'])) {
frameDiv.append(tempBlankDiv);
}
-
+
frameDiv.append(createFspDiv(fspName, fsp[fspName]['mtm'], fsp));
frameDiv.append(createFspTip(fspName, fsp[fspName]['mtm'], fsp));
@@ -430,7 +430,7 @@ function createSystempGraphical(bpa, fsp, area) {
changeNode(lparName, 'unselect');
}
}
-
+
// No selected LPARs on the cec, so add all LPARs into selectNode hash
else {
for (var lparIndex in fspList[fspName]['children']) {
@@ -458,8 +458,8 @@ function createSystempGraphical(bpa, fsp, area) {
/**
* Create the physical/graphical layout for blades
- *
- * @param blades The blade list in global
+ *
+ * @param blades The blade list in global
* @param area The element to append the graphical layout
*/
function createBladeGraphical(blades, area) {
@@ -529,8 +529,8 @@ function createBladeGraphical(blades, area) {
/**
* Create the physical/graphical layout for System x machines
- *
- * @param xnodes The system x node list in global
+ *
+ * @param xnodes The system x node list in global
* @param area The element to append graphical layout
*/
function createSystemxGraphical(xnodes, area) {
@@ -765,7 +765,7 @@ function createFspDiv(fspName, mtm, fsp) {
if (lparIndex >= 8) {
break;
}
-
+
var lparName = fsp[fspName]['children'][lparIndex];
var color = statusMap(lparList[lparName]);
lparStatusRow += '
';
@@ -778,11 +778,11 @@ function createFspDiv(fspName, mtm, fsp) {
} else {
temp = mtm;
}
-
+
if (!hardwareInfo[temp]){
hardwareInfo[temp] = ['unkown', 2];
}
-
+
if (hardwareInfo[temp][1]) {
divClass += 'fspDiv' + hardwareInfo[temp][1];
} else {
@@ -830,7 +830,7 @@ function createFspTip(fspName, mtm, fsp) {
}
/**
* Map the LPAR status into a color
- *
+ *
* @param status LPAR status in nodelist table
* @return Corresponding color name
*/
@@ -844,7 +844,7 @@ function statusMap(status) {
case 'sshd':
case 'booting':
case 'booted':
- case 'ping':
+ case 'ping':
color = 'green';
break;
case 'noping':
@@ -869,7 +869,7 @@ function selectAllLpars(checkbox) {
/**
* Export all LPAR names from selectNode
- *
+ *
* @return lpars' string
*/
function getSelectNodes() {
@@ -904,7 +904,7 @@ function changeNode(lparName, status) {
/**
* The P7-IH's CECs are insert from bottom to up, so we had to calculate the blank height
- *
+ *
* @return Height for the CEC
*/
function calculateBlank(mtm) {
@@ -917,13 +917,13 @@ function calculateBlank(mtm) {
}
switch (hardwareInfo[mtm][1]) {
- case 1:
+ case 1:
return 13;
break;
- case 2:
+ case 2:
return 24;
break;
- case 4:
+ case 4:
return 47;
break;
default:
diff --git a/xCAT-UI/js/nodes/updatenode.js b/xCAT-UI/js/nodes/updatenode.js
index a38b7db28..943972e8e 100644
--- a/xCAT-UI/js/nodes/updatenode.js
+++ b/xCAT-UI/js/nodes/updatenode.js
@@ -1,6 +1,6 @@
/**
* Load updatenode page
- *
+ *
* @param tgtNodes Targets to run updatenode against
*/
function loadUpdatenodePage(tgtNodes) {
@@ -17,7 +17,7 @@ function loadUpdatenodePage(tgtNodes) {
success : setOSImageCookies
});
-
+
// Get node OS
var osHash = new Object();
var nodes = tgtNodes.split(',');
@@ -28,7 +28,7 @@ function loadUpdatenodePage(tgtNodes) {
nodes[osBase] = 1;
}
}
-
+
// Get nodes tab
var tab = getNodesTab();
@@ -40,10 +40,10 @@ function loadUpdatenodePage(tgtNodes) {
inst = inst + 1;
newTabId = 'updatenodeTab' + inst;
}
-
+
// Create rscan form
var updatenodeForm = $('');
-
+
// Create status bar
var statBarId = 'updatenodeStatusBar' + inst;
var statusBar = createStatusBar(statBarId).hide();
@@ -55,35 +55,35 @@ function loadUpdatenodePage(tgtNodes) {
// Create info bar
var infoBar = createInfoBar('Update nodes in an xCAT environment');
updatenodeForm.append(statusBar, infoBar);
-
+
// Create VM fieldset
var vmFS = $('');
var vmLegend = $('');
vmFS.append(vmLegend);
updatenodeForm.append(vmFS);
-
+
var vmAttr = $('');
vmFS.append($('
'));
vmFS.append(vmAttr);
-
+
// Create options fieldset
var optionsFS = $('');
var optionsLegend = $('');
optionsFS.append(optionsLegend);
updatenodeForm.append(optionsFS);
-
+
var optionsAttr = $('');
optionsFS.append($('
'));
optionsFS.append(optionsAttr);
-
+
// Create target node or group input
var tgt = $('');
vmAttr.append(tgt);
- // Create options
+ // Create options
var optionsList = $('
');
optionsAttr.append(optionsList);
-
+
// Create update all software checkbox (only AIX)
if (osHash['AIX']) {
var updateAllOption = $('');
@@ -91,7 +91,7 @@ function loadUpdatenodePage(tgtNodes) {
updateAllOption.append(updateAllChkBox);
optionsList.append(updateAllOption);
updateAllOption.append('Install or update all software contained in the source directory');
-
+
// Create source directory input
var allSwScrDirectory = $('');
// Browse server directory and files
@@ -131,14 +131,14 @@ function loadUpdatenodePage(tgtNodes) {
}
});
}
-
+
// Create update software checkbox
var updateOption = $('');
var updateChkBox = $('');
optionsList.append(updateOption);
updateOption.append(updateChkBox);
updateOption.append('Update existing software');
-
+
// Create source directory input
var scrDirectory = $('');
// Browse server directory and files
@@ -168,27 +168,27 @@ function loadUpdatenodePage(tgtNodes) {
scrDirectory.append(srcDirBrowse);
scrDirectory.hide();
optionsList.append(scrDirectory);
-
+
// Create other packages input
var otherPkgs = $('');
otherPkgs.hide();
optionsList.append(otherPkgs);
-
+
// Create RPM flags input (only AIX)
var aixRpmFlags = $('');
aixRpmFlags.hide();
optionsList.append(aixRpmFlags);
-
+
// Create installp flags input (only AIX)
var aixInstallPFlags = $('');
aixInstallPFlags.hide();
optionsList.append(aixInstallPFlags);
-
+
// Create emgr flags input (only AIX)
var aixEmgrFlags = $('');
aixEmgrFlags.hide();
optionsList.append(aixEmgrFlags);
-
+
// Show flags when checked
updateChkBox.bind('click', function(event) {
if ($(this).is(':checked')) {
@@ -209,7 +209,7 @@ function loadUpdatenodePage(tgtNodes) {
}
}
});
-
+
// Create postscripts input
var postOption = $('');
var postChkBox = $('');
@@ -219,7 +219,7 @@ function loadUpdatenodePage(tgtNodes) {
var postscripts = $('');
postscripts.hide();
optionsList.append(postscripts);
-
+
// Show alternate source directory when checked
postChkBox.bind('click', function(event) {
if ($(this).is(':checked')) {
@@ -230,7 +230,7 @@ function loadUpdatenodePage(tgtNodes) {
});
optionsList.append('
Distribute and synchronize files
');
optionsList.append('
Update the ssh keys and host keys for the service nodes and compute nodes
');
-
+
// Create update OS checkbox
if (!osHash['AIX']) {
var osOption = $('');
@@ -238,12 +238,12 @@ function loadUpdatenodePage(tgtNodes) {
optionsList.append(osOption);
osOption.append(osChkBox);
osOption.append('Update the operating system');
-
+
var os = $('').hide();
var osLabel = $('');
var osInput = $('');
osInput.one('focus', function(){
- var tmp = $.cookie('osvers');
+ var tmp = $.cookie('xcat_osvers');
if (tmp) {
// Turn on auto complete
$(this).autocomplete({
@@ -254,7 +254,7 @@ function loadUpdatenodePage(tgtNodes) {
os.append(osLabel);
os.append(osInput);
optionsList.append(os);
-
+
// Show alternate source directory when checked
osChkBox.bind('click', function(event) {
if ($(this).is(':checked')) {
@@ -264,7 +264,7 @@ function loadUpdatenodePage(tgtNodes) {
}
});
}
-
+
// Generate tooltips
updatenodeForm.find('div input[title]').tooltip({
position: "center right",
@@ -279,7 +279,7 @@ function loadUpdatenodePage(tgtNodes) {
tooltip : "mouseover,mouseout"
}
});
-
+
/**
* Ok
*/
@@ -292,7 +292,7 @@ function loadUpdatenodePage(tgtNodes) {
// Remove any warning messages
$(this).parents('.ui-tabs-panel').find('.ui-state-error').remove();
var ready = true;
-
+
// Generate arguments
var chkBoxes = $("#" + newTabId + " input[type='checkbox']:checked");
var optionsStr = '';
@@ -300,7 +300,7 @@ function loadUpdatenodePage(tgtNodes) {
for ( var i = 0; i < chkBoxes.length; i++) {
option = chkBoxes.eq(i).attr('name');
optionsStr += '-' + option;
-
+
// If update all software is checked
if (option == 'S') {
var srcDir = $('#' + newTabId + ' input[name=allSwSrcDirectory]').val();
@@ -316,50 +316,50 @@ function loadUpdatenodePage(tgtNodes) {
if (srcDirectory) {
optionsStr += ';-d;' + srcDirectory;
}
-
+
// Get otherpkgs
var otherpkgs = $('#' + newTabId + ' input[name=otherpkgs]').val();
if (otherpkgs) {
optionsStr += ';otherpkgs=' + otherpkgs;
}
-
+
// Get rpm_flags
var rpm_flags = $('#' + newTabId + ' input[name=rpm_flags]').val();
if (rpm_flags) {
optionsStr += ';rpm_flags=' + rpm_flags;
}
-
+
// Get installp_flags
var installp_flags = $('#' + newTabId + ' input[name=installp_flags]').val();
if (installp_flags) {
optionsStr += ';installp_flags=' + installp_flags;
}
-
+
// Get emgr_flags
var emgr_flags = $('#' + newTabId + ' input[name=emgr_flags]').val();
if (emgr_flags) {
optionsStr += ';emgr_flags=' + emgr_flags;
}
}
-
+
// If postscripts is checked
if (option == 'P') {
// Get postscripts
optionsStr += ';' + $('#' + newTabId + ' input[name=postscripts]').val();
}
-
+
// If operating system is checked
if (option == 'o') {
// Get the OS
optionsStr += ';' + $('#' + newTabId + ' input[name=os]').val();
}
-
+
// Append ; to end of string
if (i < (chkBoxes.length - 1)) {
optionsStr += ';';
}
}
-
+
// If no inputs are empty
if (ready) {
// Get nodes
@@ -368,7 +368,7 @@ function loadUpdatenodePage(tgtNodes) {
// Disable all inputs and Ok button
$('#' + newTabId + ' input').attr('disabled', 'disabled');
$(this).attr('disabled', 'true');
-
+
/**
* (1) Boot to network
*/
diff --git a/xCAT-UI/js/provision/images.js b/xCAT-UI/js/provision/images.js
index 59ad4c467..d1a6f174d 100644
--- a/xCAT-UI/js/provision/images.js
+++ b/xCAT-UI/js/provision/images.js
@@ -48,7 +48,7 @@ function loadImages(data) {
// Data returned
var rsp = data.rsp;
if (rsp[0].indexOf('Could not find any object definitions') > -1) {
- rsp = new Array();
+ rsp = new Array();
}
// Image attributes hash
@@ -198,7 +198,7 @@ function loadImages(data) {
// Turn table into a datatable
var myDataTable = $('#' + imgTableId).dataTable({
- 'iDisplayLength': 50,
+ 'iDisplayLength': 50,
'bLengthChange': false,
"bScrollCollapse": true,
"sScrollY": "400px",
@@ -502,7 +502,7 @@ function openAddImageDialog() {
imageAttr.append(imageName, imageType, architecture, osName, osVersion, profile, provisionMethod);
optionAttr.append(otherpkgDirectory, packageDirectory, packageList, template);
- // Generate tooltips
+ // Generate tooltips
addImageForm.find('div input[title],select[title]').tooltip({
position: "center right",
offset: [-2, 10],
@@ -720,9 +720,9 @@ function loadCreateImage() {
return;
}
- var imageOsVers = $.cookie("osvers").split(",");
- var imageArch = $.cookie("osarchs").split(",");
- var profiles = $.cookie("profiles").split(",");
+ var imageOsVers = $.cookie("xcat_osvers").split(",");
+ var imageArch = $.cookie("xcat_osarchs").split(",");
+ var profiles = $.cookie("xcat_profiles").split(",");
var createImgForm = $('');
var createImgFS = $('').append('');
@@ -1329,7 +1329,7 @@ function openCopyCdDialog() {
basePath : '/install' // Limit user to only install directory
});
- // Generate tooltips
+ // Generate tooltips
copyLinuxForm.find('div input[title],select[title]').tooltip({
position: "center right",
offset: [-2, 10],
diff --git a/xCAT-UI/js/provision/provision.js b/xCAT-UI/js/provision/provision.js
index a732f5653..00a059080 100644
--- a/xCAT-UI/js/provision/provision.js
+++ b/xCAT-UI/js/provision/provision.js
@@ -33,7 +33,7 @@ function loadProvisionPage() {
}
// Get OS image names
- if (!$.cookie('imagenames')){
+ if (!$.cookie('xcat_imagenames')){
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
@@ -49,7 +49,7 @@ function loadProvisionPage() {
}
// Get groups
- if (!$.cookie('groups')){
+ if (!$.cookie('xcat_groups')){
$.ajax( {
url : 'lib/cmd.php',
dataType : 'json',
diff --git a/xCAT-UI/js/service/service.js b/xCAT-UI/js/service/service.js
index 96be4c75a..3d49b98d9 100644
--- a/xCAT-UI/js/service/service.js
+++ b/xCAT-UI/js/service/service.js
@@ -73,7 +73,7 @@ function initServicePage() {
loadServicePage();
// Initialize tab index history
- $.cookie('tabindex_history', '0,0');
+ $.cookie('xcat_tabindex_history', '0,0', { path: '/xcat', secure:true });
}
/**
@@ -185,14 +185,14 @@ function loadServiceProvisionPage(tabId) {
var okBtn = createButton('Ok');
okBtn.bind('click', function(event) {
var userName = $.cookie('xcat_username');
- var tmp = $.cookie(userName + '_usrnodes');
+ var tmp = $.cookie('xcat_' + userName + '_usrnodes');
// Get maximun number for nodes from cookie
var nodes = '';
var maxVM = 0;
if (tmp.length) {
nodes = tmp.split(',');
- maxVM = parseInt($.cookie(userName + '_maxvm'));
+ maxVM = parseInt($.cookie('xcat_' + userName + '_maxvm'));
// Do not allow user to clone if the maximum number of VMs is reached
if (nodes.length >= maxVM) {
@@ -302,7 +302,7 @@ function loadManagePage(tabId) {
*/
function getUserNodesDef() {
var userName = $.cookie('xcat_username');
- var userNodes = $.cookie(userName + '_usrnodes');
+ var userNodes = $.cookie('xcat_' + userName + '_usrnodes');
if (userNodes) {
// Get nodes definitions
$.ajax( {
@@ -597,7 +597,7 @@ function loadNodesTable(data) {
// Refresh nodes table
var userName = $.cookie('xcat_username');
- var userNodes = $.cookie(userName + '_usrnodes');
+ var userNodes = $.cookie('xcat_' + userName + '_usrnodes');
if (userNodes) {
// Get nodes definitions
$.ajax( {
@@ -932,7 +932,7 @@ function setGroupCookies(data) {
// Set cookie to expire in 60 minutes
var exDate = new Date();
exDate.setTime(exDate.getTime() + (240 * 60 * 1000));
- $.cookie('srv_groups', groups, { expires: exDate });
+ $.cookie('xcat_srv_groups', groups, { expires: exDate, path: '/xcat', secure:true });
}
}
@@ -1041,28 +1041,28 @@ function setOSImageCookies(data) {
}
// Save image names in a cookie
- $.cookie('srv_imagenames', imageNames);
+ $.cookie('xcat_srv_imagenames', imageNames);
// Save profiles in a cookie
var tmp = new Array;
for (var key in profilesHash) {
tmp.push(key);
}
- $.cookie('srv_profiles', tmp);
+ $.cookie('xcat_srv_profiles', tmp);
// Save OS versions in a cookie
tmp = new Array;
for (var key in osVersHash) {
tmp.push(key);
}
- $.cookie('srv_osvers', tmp);
+ $.cookie('xcat_srv_osvers', tmp);
// Save OS architectures in a cookie
tmp = new Array;
for (var key in osArchsHash) {
tmp.push(key);
}
- $.cookie('srv_osarchs', tmp);
+ $.cookie('xcat_srv_osarchs', tmp);
}
@@ -1111,7 +1111,7 @@ function setUserNodes(data) {
// Set cookie to expire in 240 minutes
var exDate = new Date();
exDate.setTime(exDate.getTime() + (240 * 60 * 1000));
- $.cookie(userName + '_usrnodes', usrNodes, { expires: exDate });
+ $.cookie('xcat_' + userName + '_usrnodes', usrNodes, { expires: exDate, path: '/xcat', secure:true });
} // End of if
}
@@ -1316,10 +1316,10 @@ function monitorNode(node, monitor) {
function cloneNode(tgtNodes) {
var userName = $.cookie('xcat_username');
var nodes = tgtNodes.split(',');
- var tmp = $.cookie(userName + '_usrnodes');
+ var tmp = $.cookie('xcat_' + userName + '_usrnodes');
var usrNodes = tmp.split(',');
- var maxVM = parseInt($.cookie(userName + '_maxvm'));
+ var maxVM = parseInt($.cookie('xcat_' + userName + '_maxvm'));
// Do not allow user to clone if the maximum number of VMs is reached
if (usrNodes.length >= maxVM) {
@@ -1596,7 +1596,7 @@ function unlockNode(tgtNodes) {
*/
function getNodesCurrentLoad(){
var userName = $.cookie('xcat_username');
- var nodes = $.cookie(userName + '_usrnodes');
+ var nodes = $.cookie('xcat_' + userName + '_usrnodes');
// Get nodes current status
$.ajax({
@@ -2147,7 +2147,7 @@ function setMaxVM() {
// Set cookie to expire in 60 minutes
var exDate = new Date();
exDate.setTime(exDate.getTime() + (240 * 60 * 1000));
- $.cookie(userName + '_maxvm', rsp, { expires: exDate });
+ $.cookie('xcat_' + userName + '_maxvm', rsp, { expires: exDate });
}
});
}
\ No newline at end of file
diff --git a/xCAT-UI/js/srv_xcatauth.js b/xCAT-UI/js/srv_xcatauth.js
index c86d56af4..be3314432 100644
--- a/xCAT-UI/js/srv_xcatauth.js
+++ b/xCAT-UI/js/srv_xcatauth.js
@@ -4,30 +4,30 @@
$(document).ready(function() {
$('#header').remove();
$('#content').remove();
-
+
var winHeight = document.body.clientHeight;
var diagHeight = $('#login').css('height');
diagHeight = diagHeight.substr(0, diagHeight.length - 2);
diagHeight = Number(diagHeight);
-
+
// The window's height is to small to show the dialog
var tmpHeight = 0;
if ((winHeight - 50) < diagHeight){
tmpHeight = 0;
} else {
- tmpHeight = parseInt((winHeight - diagHeight - 50) / 2);
+ tmpHeight = parseInt((winHeight - diagHeight - 50) / 2);
}
-
+
$('#login').css('margin', tmpHeight + 'px auto');
$('button').bind('click', function(){
authenticate();
}).button();
-
+
if (document.location.protocol == 'http:') {
$('#login-status').html('You are using an unencrypted session!');
$('#login-status').css('color', 'red');
}
-
+
if (!$("#login input[name='username']").val()) {
$("#login input[name='username']").focus();
} else {
@@ -51,7 +51,7 @@ $(document).ready(function() {
/**
* Update login dialog
- *
+ *
* @param data Data returned from AJAX call
* @param txtStatus Status of login
*/
@@ -62,11 +62,11 @@ function onlogin(data, txtStatus) {
if (data.authenticated == 'yes') {
$('#login-status').text('Login successful');
window.location = 'service.php';
-
+
// Set user name cookie
var exDate = new Date();
exDate.setTime(exDate.getTime() + (240 * 60 * 1000));
- $.cookie('xcat_username', usrName, { expires: exDate });
+ $.cookie('xcat_username', usrName, { expires: exDate, path: '/xcat', secure:true });
} else {
$('#login-status').text('Authentication failure');
$('#login-status').css('color', '#FF0000');
@@ -79,7 +79,7 @@ function onlogin(data, txtStatus) {
function authenticate() {
$('#login-status').css('color', '#000000');
$('#login-status').html('Authenticating...');
-
+
var passwd = $("#login input[name='password']").val();
$.post('lib/srv_log.php', {
username : $("#login input[name='username']").val(),
diff --git a/xCAT-UI/js/ui.js b/xCAT-UI/js/ui.js
index c0600d7a5..771fa5d65 100644
--- a/xCAT-UI/js/ui.js
+++ b/xCAT-UI/js/ui.js
@@ -1,8 +1,11 @@
/**
* Tab constructor
*
- * @param tabId Tab ID
- * @param tabName Tab name
+ * @param tabId
+ * Tab ID
+ * @param tabName
+ * Tab name
+ * @return Nothing
*/
var Tab = function(tabId) {
this.tabId = tabId;
@@ -29,8 +32,8 @@ Tab.prototype.init = function() {
tabs.bind('tabsselect', function(event, ui){
// Save the order tabs were selected
var order;
- if ($.cookie('tabindex_history')) {
- order = $.cookie('tabindex_history').split(',');
+ if ($.cookie('xcat_tabindex_history')) {
+ order = $.cookie('xcat_tabindex_history').split(',');
order[1] = order[0]; // Set index 1 to last selected tab
order[0] = ui.index; // Set index 0 to currently selected tab
} else {
@@ -40,7 +43,7 @@ Tab.prototype.init = function() {
order[1] = ui.index;
}
- $.cookie('tabindex_history', order);
+ $.cookie('xcat_tabindex_history', order, { path: '/xcat', secure:true });
});
// Remove dummy tab
@@ -97,7 +100,7 @@ Tab.prototype.add = function(tabId, tabName, tabCont, closeable) {
// Go back to last tab if user is trying to close currently selected tab
if (tabs.tabs('option', 'selected') == tabIndex) {
// Get last selected tab from history
- var order = $.cookie('tabindex_history').split(',');
+ var order = $.cookie('xcat_tabindex_history').split(',');
if (order[1]) {
tabs.tabs('select', parseInt(order[1]));
} else {
diff --git a/xCAT-UI/js/xcatauth.js b/xCAT-UI/js/xcatauth.js
index ef363759d..3aad393d1 100644
--- a/xCAT-UI/js/xcatauth.js
+++ b/xCAT-UI/js/xcatauth.js
@@ -4,32 +4,32 @@
$(document).ready(function() {
$('#header').remove();
$('#content').remove();
-
+
var winheight = document.body.clientHeight;
var diaheight = $('#login').css('height');
diaheight = diaheight.substr(0, diaheight.length - 2);
diaheight = Number(diaheight);
-
+
// The window's height is to small to show the dialog
var tempheight = 0;
if ((winheight - 50) < diaheight){
tempheight = 0;
} else {
- tempheight = parseInt((winheight - diaheight - 50) / 2);
+ tempheight = parseInt((winheight - diaheight - 50) / 2);
}
-
+
$('#login').css('margin', tempheight + 'px auto');
$('button').bind('click', function(){
authenticate();
});
-
+
$('#login button').button();
-
+
if (document.location.protocol == "http:") {
$("#login-status").html("You are using an unencrypted session!");
$("#login-status").css("color", "#ff0000");
}
-
+
if ($("#login input[name='username']").val() == "") {
$("#login input[name='username']").focus();
} else {
@@ -53,7 +53,7 @@ $(document).ready(function() {
/**
* Update login dialog
- *
+ *
* @param data Data returned from AJAX call
* @param txtStatus Status of login
*/
@@ -64,25 +64,26 @@ function onlogin(data, txtStatus) {
$("#login-status").text("Login successful");
// Not the first time to log
- if ($.cookie('logonflag')){
+ if ($.cookie('xcat_logonflag')){
// Remembered what page they were trying to go to
window.location = window.location.pathname;
} else {
window.location = 'help.php';
}
-
+
// Set user name cookie
var usrName = $("#login input[name='username']").val();
var exDate = new Date();
exDate.setTime(exDate.getTime() + (240 * 60 * 1000));
- $.cookie('xcat_username', usrName, { expires: exDate });
-
+ $.cookie('xcat_username', usrName, { expires: exDate, path: '/xcat', secure:true });
+
// Set the logonflag
- $.cookie('logonflag', 'yes', {
+ $.cookie('xcat_logonflag', 'yes', {
path : '/xcat',
- expires : 100
+ expires : 100,
+ secure:true
});
-
+
} else {
$("#login-status").text("Authentication failure").css("color", "#FF0000");
}
diff --git a/xCAT-UI/lib/functions.php b/xCAT-UI/lib/functions.php
index 51827fc4e..20c27efa6 100644
--- a/xCAT-UI/lib/functions.php
+++ b/xCAT-UI/lib/functions.php
@@ -101,7 +101,7 @@ function submit_request($req, $skipVerify, $opts_array){
if ($flush){
echo str_pad('',1024)."\n";
}
-
+
while (!feof($fp)) {
// Read until there is no more
// Remove newlines and add it to the response
@@ -118,7 +118,7 @@ function submit_request($req, $skipVerify, $opts_array){
} else {
$flushtail = '';
}
-
+
$str = preg_replace('/.*<\/errorcode>/', '', $str);
// Strip HTML tags from output
if ($tmp = trim(strip_tags($str))) {
@@ -127,7 +127,7 @@ function submit_request($req, $skipVerify, $opts_array){
format_TBD($tmp);
} else {
$tmp = preg_replace('/\n\s*/', "\n", $tmp);
-
+
// Print out output by default
echo '
' . $tmp . '
';
ob_flush();
@@ -180,7 +180,7 @@ function submit_request($req, $skipVerify, $opts_array){
$rsp = FALSE;
}
}
-
+
return $rsp;
}
@@ -201,10 +201,10 @@ function xorcrypt($data, $key) {
* Get password
*/
function getpassword() {
- if (isset($GLOBALS['xcatauthsecret'])) {
- $cryptext = $GLOBALS['xcatauthsecret'];
- } else if (isset($_COOKIE["xcatauthsecret"])) {
- $cryptext = $_COOKIE["xcatauthsecret"];
+ if (isset($GLOBALS['xcat_authsecret'])) {
+ $cryptext = $GLOBALS['xcat_authsecret'];
+ } else if (isset($_COOKIE["xcat_authsecret"])) {
+ $cryptext = $_COOKIE["xcat_authsecret"];
} else {
return false;
}
@@ -214,7 +214,7 @@ function getpassword() {
/**
* Get the password splitting knowledge between server and client side persistant storage.
- * Caller should regenerate session ID when contemplating a new user/password,
+ * Caller should regenerate session ID when contemplating a new user/password,
* to preclude session fixation, though fixation is limited without the secret.
*
* @param $password Password
@@ -226,8 +226,8 @@ function setpassword($password) {
// Non-ascii characters, encode it in base64
$cryptext = base64_encode($cryptext);
- setcookie("xcatauthsecret",$cryptext,0,'/');
- $GLOBALS["xcatauthsecret"] = $cryptext;
+ setcookie("xcat_authsecret",$cryptext,0,'/xcat','',true);
+ $GLOBALS["xcat_authsecret"] = $cryptext;
$_SESSION["secretkey"] = $key;
}
@@ -342,18 +342,31 @@ function isRootAcess() {
* Log out of current user session
*/
function logout() {
+ session_start();
// Clear the secret cookie from browser
- if (isset($_COOKIE["xcatauthsecret"])) {
- setcookie("xcatauthsecret",'',time()-86400*7,'/');
+ if (isset($_COOKIE["xcat_authsecret"])) {
+ setcookie("xcat_authsecret",'',time()-86400*7,'/xcat','',true);
+ }
+
+ // Clear any cookies where the key starts with "xcat_"
+ foreach ($_COOKIE as $key => $value) {
+ if (substr($key,0,5) === "xcat_") {
+ unset($_COOKIE[$key]);
+ setcookie($key, null, time() - 3600, '/xcat','',true);
+ }
}
// Expire session cookie
if (isset($_COOKIE[session_name()])) {
- setcookie(session_name(),"",time()-86400*7,"/");
+ setcookie(session_name(),"",time()-86400*7,"/xcat",'',true);
}
+ // Clear session id
+ setcookie(session_id(),"",time()-86400*7,"/");
+
// Clear server store of data
$_SESSION=array();
+ session_destroy();
}
/**
diff --git a/xCAT-UI/lib/srv_functions.php b/xCAT-UI/lib/srv_functions.php
index 6dafe540e..4481eba3c 100644
--- a/xCAT-UI/lib/srv_functions.php
+++ b/xCAT-UI/lib/srv_functions.php
@@ -208,10 +208,10 @@ function format_TBD($str) {
* Get password
*/
function getpassword() {
- if (isset($GLOBALS['xcatauthsecret'])) {
- $cryptext = $GLOBALS['xcatauthsecret'];
- } else if (isset($_COOKIE["xcatauthsecret"])) {
- $cryptext = $_COOKIE["xcatauthsecret"];
+ if (isset($GLOBALS['xcat_authsecret'])) {
+ $cryptext = $GLOBALS['xcat_authsecret'];
+ } else if (isset($_COOKIE["xcat_authsecret"])) {
+ $cryptext = $_COOKIE["xcat_authsecret"];
} else {
return false;
}
@@ -233,8 +233,8 @@ function setpassword($password) {
// Non-ascii characters, encode it in base64
$cryptext = base64_encode($cryptext);
- setcookie("xcatauthsecret",$cryptext,0,'/');
- $GLOBALS["xcatauthsecret"] = $cryptext;
+ setcookie("xcat_authsecret",$cryptext,0,'/xcat','',true);
+ $GLOBALS["xcat_authsecret"] = $cryptext;
$_SESSION["secretkey"] = $key;
}
@@ -285,13 +285,13 @@ function isAuthenticated() {
*/
function logout() {
// Clear the secret cookie from browser
- if (isset($_COOKIE["xcatauthsecret"])) {
- setcookie("xcatauthsecret",'',time()-86400*7,'/');
+ if (isset($_COOKIE["xcat_authsecret"])) {
+ setcookie("xcat_authsecret",'',time()-86400*7,'/xcat','',true);
}
// Expire session cookie
if (isset($_COOKIE[session_name()])) {
- setcookie(session_name(),"",time()-86400*7,"/");
+ setcookie(session_name(),"",time()-86400*7,"/xcat",'',true);
}
// Clear server store of data
diff --git a/xCAT-UI/xCAT-UI.spec b/xCAT-UI/xCAT-UI.spec
index 0881b8f8a..15b714315 100644
--- a/xCAT-UI/xCAT-UI.spec
+++ b/xCAT-UI/xCAT-UI.spec
@@ -1,12 +1,12 @@
Summary: Web Client for xCAT 2
Name: xCAT-UI
Version: %{?version:%{version}}%{!?version:%(cat Version)}
-Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
+Release: %{?release:%{release}}%{!?release:%(cat Release)}
License: EPL
Group: Applications/System
-URL: http://xcat.org
+URL: https://xcat.org/
Packager: IBM
-Vendor: IBM
+Vendor: IBM Corp.
Source: xCAT-UI-%{version}.tar.gz
BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
diff --git a/xCAT-buildkit/debian/compat b/xCAT-buildkit/debian/compat
index 7ed6ff82d..ec635144f 100644
--- a/xCAT-buildkit/debian/compat
+++ b/xCAT-buildkit/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/xCAT-buildkit/debian/control b/xCAT-buildkit/debian/control
index dfe2c644d..ee045d41e 100644
--- a/xCAT-buildkit/debian/control
+++ b/xCAT-buildkit/debian/control
@@ -1,11 +1,11 @@
Source: xcat-buildkit
Section: admin
Priority: extra
-Maintainer: xu qing
-Build-Depends: debhelper (>= 5)
-Standards-Version: 3.7.2
+Maintainer: Xu Qing
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
Package: xcat-buildkit
Architecture: all
Depends: dpkg-dev, devscripts, debhelper
-Description: xCAT-buildkit provides the buildkit tool and sample kit files to build an xCAT kit.
+Description: Provides build tools and sample files to build an xCAT kit
diff --git a/xCAT-buildkit/debian/rules b/xCAT-buildkit/debian/rules
index b5e90c11b..c792c4f31 100755
--- a/xCAT-buildkit/debian/rules
+++ b/xCAT-buildkit/debian/rules
@@ -9,9 +9,6 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-export DH_COMPAT=5
-
-
build:
pwd
mkdir -p share/man/man1
@@ -40,7 +37,6 @@ install:
find debian/xcat-buildkit/opt/xcat/share/doc/packages/xCAT-buildkit -type f -exec chmod 644 {} \;
dh_link
-
# Build architecture-independent files here.
binary-indep: build install
dh_installchangelogs
diff --git a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec
index d513149d9..a6d191cd9 100644
--- a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec
+++ b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg2/pkg2.spec
@@ -14,7 +14,6 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
%ifos linux
BuildArch: noarch
-#Requires:
%endif
Provides: pkg2 = %{epoch}:%{version}
diff --git a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec
index 17270eeaf..a4d361cf6 100644
--- a/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec
+++ b/xCAT-buildkit/share/xcat/kits/kit_template/source_packages/sample/pkg3/pkg3.spec
@@ -14,7 +14,6 @@ BuildRoot: /var/tmp/%{name}-%{version}-%{release}-root
%ifos linux
BuildArch: noarch
-#Requires:
%endif
Provides: pkg3 = %{epoch}:%{version}
diff --git a/xCAT-buildkit/xCAT-buildkit.spec b/xCAT-buildkit/xCAT-buildkit.spec
index 6809507c7..8531dac38 100644
--- a/xCAT-buildkit/xCAT-buildkit.spec
+++ b/xCAT-buildkit/xCAT-buildkit.spec
@@ -1,7 +1,7 @@
Summary: xCAT buildkit tools and sample kit
Name: xCAT-buildkit
Version: %{?version:%{version}}%{!?version:%(cat Version)}
-Release: %{?release:%{release}}%{!?release:snap%(date +"%Y%m%d%H%M")}
+Release: %{?release:%{release}}%{!?release:%(cat Release)}
Epoch: 4
License: EPL
Group: Applications/System
@@ -20,15 +20,12 @@ AutoReqProv: no
# also need to fix Requires for AIX
%ifos linux
BuildArch: noarch
-#Requires:
%endif
# No dependencies on any other xCAT rpms
# so that this rpm can be installed in a separate build server
Requires: /usr/bin/rpmbuild
-Provides: xCAT-buildkit = %{epoch}:%{version}
-
%description
xCAT-buildkit provides the buildkit tool and sample kit files to build an xCAT kit.
@@ -41,8 +38,6 @@ mkdir -p share/doc/man1
pod2man pods/man1/buildkit.1.pod > share/man/man1/buildkit.1
pod2html pods/man1/buildkit.1.pod > share/doc/man1/buildkit.1.html
-
-
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits
@@ -57,7 +52,6 @@ chmod 444 $RPM_BUILD_ROOT/%{prefix}/share/man/man1/*
cp share/doc/man1/* $RPM_BUILD_ROOT/%{prefix}/share/doc/man1
chmod 644 $RPM_BUILD_ROOT/%{prefix}/share/doc/man1/*
-
%ifos linux
cp -aR share/xcat/kits/* $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/
#chmod -R 644 $RPM_BUILD_ROOT/%{prefix}/share/xcat/kits/*
@@ -110,7 +104,3 @@ fi
%post
%preun
-
-
-
-
diff --git a/xCAT-client/bin/mysqlsetup b/xCAT-client/bin/mysqlsetup
index e242ed930..b8936aa30 100755
--- a/xCAT-client/bin/mysqlsetup
+++ b/xCAT-client/bin/mysqlsetup
@@ -165,12 +165,8 @@ if ($::linuxos == "sles12") {
close($relfile);
chomp(@lines);
- # if == 12.1
- if (grep /VERSION_ID="12.1"/, @lines) {
-
- #$::linuxos == "sles12.1";
- $sp1flag = 1;
- }
+ # for sles12.x
+ $sp1flag = 1;
}
# set flag
diff --git a/xCAT-client/bin/pping b/xCAT-client/bin/pping
index 09bf8cdba..af13369d4 100755
--- a/xCAT-client/bin/pping
+++ b/xCAT-client/bin/pping
@@ -162,6 +162,11 @@ sub fping_pping {
}
else
{
+ if (!-x '/usr/bin/fping')
+ {
+ print "fping is not available, please install missing package fping.\n";
+ exit 1;
+ }
open(FPING, "fping " . join(' ', @$nodes) . " 2>&1 |") or die("Cannot open fping pipe: $!");
}
while () {
diff --git a/xCAT-client/bin/rcons b/xCAT-client/bin/rcons
index 1f6eadd74..98cbc69fe 100755
--- a/xCAT-client/bin/rcons
+++ b/xCAT-client/bin/rcons
@@ -73,7 +73,7 @@ fi
if [ $USE_CONFLUENT == "1" ] && ([ -x "/opt/confluent/bin/confetty" ] || [ -x "/usr/bin/confetty" ] || [ -x "/usr/local/bin/confetty" ]); then
# use confluent, make sure conserver is not also running
- CONSERVER_RC=`service conserver status >> /dev/null; echo $?`
+ CONSERVER_RC=`service conserver status >& /dev/null; echo $?`
if [[ ${CONSERVER_RC} == 0 ]]; then
echo "Error: consoleservice is set to 'confluent' but conserver is running. Stop conserver, run makeconfluentcfg, and retry..."
exit 1
@@ -107,7 +107,7 @@ elif [ -f "/usr/bin/console" ] || [ -f "/bin/console" ]; then
# use conserver
# make sure confluent is not also running, only if confluent is installed
if [[ -f "/etc/init.d/confluent" ]]; then
- CONFLUENT_RC=`service confluent status >> /dev/null; echo $?`
+ CONFLUENT_RC=`service confluent status >& /dev/null; echo $?`
if [[ ${CONFLUENT_RC} == 0 ]]; then
echo "Error: consoleservice is set to 'conserver' but confluent is running. Stop confluent, run makeconservercf, and retry..."
exit 1
diff --git a/xCAT-client/bin/xdshbak b/xCAT-client/bin/xdshbak
index 66bc59ff3..fd343f30f 100644
--- a/xCAT-client/bin/xdshbak
+++ b/xCAT-client/bin/xdshbak
@@ -10,6 +10,9 @@ use xCAT::MsgUtils;
use xCAT::DSHCLI;
use locale;
use Getopt::Std;
+
+eval "use Sort::Versions qw/versioncmp/; 1;" or *versioncmp = sub ($$) { ($a,$b)= @_ ; return $a cmp $b };
+
#####################################################################
# #
# Module: xdshbak #
@@ -21,6 +24,7 @@ use Getopt::Std;
# output from multiple nodes preceded by the hostname #
# #
# Inputs: #
+# -b : bare output, don't prepend hostname per line. only with -x #
# -c : list distinct output only once #
# -h : usage #
# -x : omit extra header output for each node. #
@@ -50,7 +54,7 @@ $::dsh_command = 'xdshbak';
#
# Process the command line...
#
-if (!getopts('cxhq'))
+if (!getopts('bcxhq'))
{ # Gather options; if errors
&d_syntax;
exit(-1);
@@ -68,6 +72,11 @@ if ($::opt_c && $::opt_x)
exit(-1);
} # these 2 options are mutually exclusive
+if ($::opt_b && !($::opt_x)) {
+ &d_syntax;
+ exit(-1);
+} # -b only makes sense with -x
+
if ($::opt_c)
{
$compress++;
@@ -110,8 +119,7 @@ while ()
#
$num_lines++;
if (!($quiet)) {
- if ($::opt_x) { $num_lines % 100 == 0 && print STDOUT "."; }
- else { $num_lines % 1000 == 0 && print STDOUT "."; }
+ $num_lines % 1000 == 0 && print STDOUT ".";
}
if (/: /)
{
@@ -170,7 +178,7 @@ while ()
# The hostnames are sorted alphabetically
#
-$num_lines > 999 && print STDOUT "\n";
+!($quiet) && $num_lines > 999 && print STDOUT "\n";
if ($compress)
{
if ($long_ln eq $prev_ln)
@@ -199,14 +207,15 @@ else
sub d_syntax
{
- my $usage1 = "Usage: xdshbak [-c | -x | -h | -q] \n";
- my $usage2 =
- "-c : compresses the output by listing unique output only once.\n";
- my $usage3 = "-h : help \n";
- my $usage4 =
-"-x : omit extra header output for each node. Can not be used with -c. \n";
- my $usage5 = "-q : quiet mode.\n";
- my $usage = $usage1 .= $usage2 .= $usage3 .= $usage4 .= $usage5;
+ # Duplicates POD - pod2usage ?
+ my @usage;
+ push @usage, "Usage: xdshbak [-c | -x [-b] | -h | -q]";
+ push @usage, " -b : bare output, don't prepend hostname per line. only with -x";
+ push @usage, " -c : compresses the output by listing unique output only once.";
+ push @usage, " -h : help";
+ push @usage, " -x : omit extra header output for each node. Can not be used with -c.";
+ push @usage, " -q : quiet mode.";
+ my $usage = join "\n", @usage;
xCAT::MsgUtils->message("I", $usage);
}
@@ -232,17 +241,25 @@ sub print_list
local (@lines, $numhosts, $hn_string, $l_string);
- foreach $hostname (sort @hs)
+ foreach $hostname (sort { versioncmp($a, $b) } @hs)
{
if (!$::opt_x) { ($num_hosts >= 1) && print "\n"; }
$num_hosts++;
- if ($::opt_x) { print "$hostname: $ls{$hostname}"; }
+ if ($::opt_x) {
+ if ($::opt_b) {
+ # Bare output
+ print $ls{$hostname};
+ } else {
+ # No header. hostname prepended on every line
+ map { print "$hostname: $_\n" } split(/\n/, $ls{$hostname});
+ }
+ }
else
{
#$hn_string = `$SPMSG DSH $MSGCAT INFO510 'HOST: %1\$s\n' $hostname`;
- xCAT::MsgUtils->message("I", "HOST:$hostname\n");
+ xCAT::MsgUtils->message("I", "HOST:$hostname");
printf '%.' . (6 + length($hostname)) . "s\n",
'---------------------------------------------------------------';
@@ -296,16 +313,15 @@ sub print_tree
($num_hosts >= 1) && print "\n";
$num_hosts++;
@wc = split(/:/, $hdr{$index});
- @wc = sort(@wc);
+ @wc = sort { versioncmp($a, $b) } @wc;
#system "$SPMSG DSH $MSGCAT INFO511 'HOSTS '";
- xCAT::MsgUtils->message("I", "HOSTS:");
-
- print
-"-------------------------------------------------------------------------\n";
+ xCAT::MsgUtils->message("I",
+ "HOSTS -------------------------------------------------------------------------"
+ );
&display_wc;
print
-"-------------------------------------------------------------------------------\n";
+ "-------------------------------------------------------------------------------\n";
print $str{$index};
}
}
diff --git a/xCAT-client/debian/compat b/xCAT-client/debian/compat
index 7ed6ff82d..ec635144f 100644
--- a/xCAT-client/debian/compat
+++ b/xCAT-client/debian/compat
@@ -1 +1 @@
-5
+9
diff --git a/xCAT-client/debian/control b/xCAT-client/debian/control
index 321fc1b19..db9b62fe4 100644
--- a/xCAT-client/debian/control
+++ b/xCAT-client/debian/control
@@ -2,11 +2,14 @@ Source: xcat-client
Section: admin
Priority: extra
Maintainer: xCAT
-Build-Depends: debhelper (>= 5)
-Standards-Version: 3.7.2
+Build-Depends: debhelper (>= 9)
+Standards-Version: 3.9.4
Package: xcat-client
Architecture: all
-Depends: ${perl:Depends}, nmap, perl-xcat
+Depends: ${perl:Depends}, perl-xcat (>= 2.13-snap000000000000)
+Recommends: libsort-versions-perl, nmap
Description: Core executables and data of the xCAT management project
- xCAT-client provides the fundamental xCAT commands (chtab, chnode, rpower, etc) helpful in administrating systems at scale, with particular attention paid to large HPC clusters.
+ xCAT-client provides the fundamental xCAT commands (chtab, chnode, rpower,
+ etc) helpful in administrating systems at scale, with particular attention
+ paid to large HPC clusters.
diff --git a/xCAT-client/debian/rules b/xCAT-client/debian/rules
index 5beff8b73..17e87fad6 100755
--- a/xCAT-client/debian/rules
+++ b/xCAT-client/debian/rules
@@ -9,9 +9,6 @@
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
-export DH_COMPAT=5
-
-
build:
pwd
./xpod2man
@@ -29,7 +26,6 @@ install:
dh_install -X".svn"
dh_link
-
# Build architecture-independent files here.
binary-indep: build install
# We have nothing to do by default.
@@ -39,7 +35,7 @@ binary-arch:
pwd
dh_testdir
dh_testroot
- dh_installchangelogs
+ dh_installchangelogs
dh_installdocs
# dh_installexamples
dh_install -X".svn"
diff --git a/xCAT-client/pods/man1/pping.1.pod b/xCAT-client/pods/man1/pping.1.pod
index 8e563ed41..93eac03f4 100644
--- a/xCAT-client/pods/man1/pping.1.pod
+++ b/xCAT-client/pods/man1/pping.1.pod
@@ -16,7 +16,7 @@ B {B<-v>|B<--version>}
B is a utility used to ping a list of nodes in parallel.
B will return an unsorted list of nodes with a ping or noping status.
-B front-ends nmap or fping if available.
+B front-ends B or B if available.
This command does not support the xcatd client/server communication. It must be run on the management node.
@@ -34,7 +34,7 @@ If more than one interface is specified, each interface will be combined with th
=item B<-f>|B<--use_fping>
-Use fping instead of nmap
+Use B instead of B
=item B<-h>|B<--help>
diff --git a/xCAT-client/pods/man1/prsync.1.pod b/xCAT-client/pods/man1/prsync.1.pod
index acb3276ca..5278774e2 100644
--- a/xCAT-client/pods/man1/prsync.1.pod
+++ b/xCAT-client/pods/man1/prsync.1.pod
@@ -6,18 +6,16 @@ prsync - parallel rsync
B I [I I<...>] I
-B [B<-o> I] [B<-f> I] [I I I<...>] [I I I<...>]
+B [B<-o> I] [B<-f> I] [I I I<...>] [I I I<...>]
I
B {B<-h>|B<--help>|B<-v>|B<--version>}
=head1 B
-B is a front-end to rsync for a single or range of nodes and/or
-groups in parallel.
+B is a front-end to rsync for a single or range of nodes and/or groups in parallel.
-Note: this command does not support the xcatd client/server communication and therefore must be run on the management node. It does not support hierarchy, use xdcp -F to run rsync from the
-management node to the compute node via a service node
+Note: this command does not support the xcatd client/server communication and therefore must be run on the management node. It does not support hierarchy, use B to run rsync from the management node to the compute node via a service node
B is NOT multicast, but is parallel unicasts.
@@ -25,14 +23,13 @@ B is NOT multicast, but is parallel unicasts.
=over 7
-=item I
+=item B<-o> I
rsync options. See B.
=item B<-f> I
-Specifies a fanout value for the maximum number of concur-
-rently executing remote shell processes.
+Specifies a fanout value for the maximum number of concurrently executing remote shell processes.
=item I
diff --git a/xCAT-client/pods/man1/rinv.1.pod b/xCAT-client/pods/man1/rinv.1.pod
index 2a0540235..e65e78bde 100644
--- a/xCAT-client/pods/man1/rinv.1.pod
+++ b/xCAT-client/pods/man1/rinv.1.pod
@@ -8,7 +8,7 @@ B [B<-h>|B<--help>|B<-v>|B<--version>]
=head2 BMC/MPA specific:
-B I {B|B|B|B|B|B|B|B|B|B|B|B|B|B}
+B I {B|B|B|B|B|B|B|B|B|B|B|B|B|B|B}
=head2 OpenPOWER server specific:
@@ -32,6 +32,11 @@ B I {B|B|B|B|B|B|B
B I [B<-t>]
+=head2 pdu specific:
+
+B I
+
+
=head2 zVM specific:
B I [B|B]
diff --git a/xCAT-client/pods/man1/rpower.1.pod b/xCAT-client/pods/man1/rpower.1.pod
index a15206d67..d9ca23bf4 100644
--- a/xCAT-client/pods/man1/rpower.1.pod
+++ b/xCAT-client/pods/man1/rpower.1.pod
@@ -12,6 +12,8 @@ B [B<-h>|B<--help>|B<-v>|B<--version>]
B I [B|B|B|B|B|B|B|B|B|B [B<-w> I] [B<-o>] [B<-r>]]
+B I [B|B|B]
+
=head2 PPC (with IVM or HMC) specific:
B I [B<--nodeps>] {B}
@@ -54,6 +56,10 @@ B I