mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-08-08 04:20:14 +00:00
Merge branch 'master' into ZVM_XCAT_DEV
This commit is contained in:
44
.mailmap
44
.mailmap
@@ -1,49 +1,65 @@
|
||||
Andy Wray <awray@lenovo.com>
|
||||
Andy Wray <awray@lenovo.com> <andywray@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Arif Ali <mail@arif-ali.co.uk>
|
||||
Arif Ali <mail@arif-ali.co.uk> <arifali@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Arif Ali <mail@arif-ali.co.uk> <arif-ali@users.noreply.github.com>
|
||||
BAI Yuan <bybai@cn.ibm.com>
|
||||
Bill Wajda <billwajda@hotmail.com> <billwajda@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Bill Wajda <billwajda@hotmail.com>
|
||||
Brian Elliott Finley <brian@thefinleys.com> <brianfinley@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Brian Elliott Finley <brian@thefinleys.com>
|
||||
Bruce Potter <bp@us.ibm.com>
|
||||
CAO Li <caoli@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Bruce Potter <bp@us.ibm.com> <bp-sawyers@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
CAO Li <caoli@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
CAO Meng Meng <bjcaomm@cn.ibm.com>
|
||||
CAO Meng Meng <caomengmeng@users.noreply.github.com>
|
||||
CAO Meng Meng <caomengmeng_1011@sina.com>
|
||||
CAO Meng Meng <bjcaomm@cn.ibm.com> <caomengmeng@users.noreply.github.com>
|
||||
CAO Meng Meng <bjcaomm@cn.ibm.com> <caomengmeng_1011@sina.com>
|
||||
Casandra Qiu <cxhong@us.ibm.com> <abcdqiu@gmail.com>
|
||||
Casandra Qiu <cxhong@us.ibm.com>
|
||||
CHENG Long <chenglch@cn.ibm.com>
|
||||
CHU De Gao <degaochu@cn.ibm.com> <chudegao@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
CHU De Gao <degaochu@cn.ibm.com>
|
||||
CHU De Gao <degaochu@cn.ibm.com> <degaochu@ibm.com.cn>
|
||||
Chuck Brazie <brazie@us.ibm.com>
|
||||
Chuck Brazie <brazie@us.ibm.com> <chuckbrazie@users.noreply.github.com>
|
||||
Chuck Brazie <brazie@us.ibm.com> <cbrazie@stny.rr.com>
|
||||
GAO Feng <gfgaogf@cn.ibm.com>
|
||||
GAO Ling <linggao@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
GAO Ling <linggao@us.ibm.com> <linggao@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
GAO Ling <linggao@us.ibm.com>
|
||||
GONG Jie <gongjie@cn.ibm.com>
|
||||
GONG Jie <gongjie@cn.ibm.com> <gongjie.jie@gmail.com>
|
||||
GONG Jie <gongjie@cn.ibm.com> <gongjie@linux.vnet.ibm.com>
|
||||
HU Wei Hua <huweihua@cn.ibm.com>
|
||||
Jarrod Johnson <jarrod.b.johnson@gmail.com>
|
||||
Jarrod Johnson <jbjohnso@us.ibm.com>
|
||||
Jarrod Johnson <jjohnson2@buildabear.labs.lenovo.com>
|
||||
Jarrod Johnson <jjohnson2@lenovo.com>
|
||||
Jarrod Johnson <jarrod.b.johnson@gmail.com> <jbjohnso@us.ibm.com>
|
||||
Jarrod Johnson <jarrod.b.johnson@gmail.com> <jjohnson2@buildabear.labs.lenovo.com>
|
||||
Jarrod Johnson <jarrod.b.johnson@gmail.com> <jjohnson2@lenovo.com>
|
||||
Jarrod Johnson <jarrod.b.johnson@gmail.com> <jbjohnso@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
JIN Jie Hua <jinjhua@cn.ibm.com>
|
||||
JIN Jie Hua <jjhua@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
JIN Jie Hua <jinjhua@cn.ibm.com> <jjhua@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
John Dunham <jdunham@us.ibm.com>
|
||||
LI Guang Cheng <liguangc@cn.ibm.com>
|
||||
LI Guang Cheng <liguangc@cn.ibm.com> <ligc@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
LI Guang Cheng <liguangc@cn.ibm.com> <ligc@cn.ibm.com>
|
||||
LI Ting Ting <litingt@cn.ibm.com>
|
||||
Linda O. Mellor <mellor@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
LI Ting Ting <litingt@cn.ibm.com> <root@c910f02c07p02.(none)>
|
||||
Linda O. Mellor <mellor@us.ibm.com> <mellor@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Linda O. Mellor <mellor@us.ibm.com>
|
||||
Lissa Valletta <lissav@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Lissa Valletta <lissav@us.ibm.com> <lissav@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Lissa Valletta <lissav@us.ibm.com>
|
||||
Mark Gurevich <gurevich@us.ibm.com>
|
||||
Mark Gurevich <gurevich@us.ibm.com> <gurevich@c910loginx01.(none)>
|
||||
Norm Nott <nott@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Norm Nott <nott@us.ibm.com>
|
||||
Norm Nott <nott@us.ibm.com> <nott@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Patrick Lundgren <plundgr@us.ibm.com>
|
||||
Patrick Lundgren <plundgr@us.ibm.com> <pdlun92@gmail.com>
|
||||
Patrick Lundgren <plundgr@us.ibm.com> <plundgr@c910loginx01.(none)>
|
||||
SUN Jing <sjing@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
SUN Jing <sjing@cn.ibm.com>
|
||||
SUN Jing <sjing@cn.ibm.com> <sjing@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
Victor Hu <vhu@us.ibm.com>
|
||||
Victor Hu <vhu@us.ibm.com> <vhu@victorvm7.pok.ibm.com>
|
||||
Victor Hu <vhu@us.ibm.com> <whowutwut@gmail.com>
|
||||
WANG Hua Zhong <wanghuaz@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
WANG Hua Zhong <wanghuaz@cn.ibm.com> <wanghuaz@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
WANG Hua Zhong <wanghuaz@cn.ibm.com>
|
||||
WANG Jun Xia <junxiaw@cn.ibm.com>
|
||||
WANG Xiao Peng <wxp@cn.ibm.com>
|
||||
@@ -62,7 +78,7 @@ YANG Song <yangsbj@cn.ibm.com>
|
||||
YANG Song <yangsbj@cn.ibm.com> <immarvin@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
YANG Song <yangsbj@cn.ibm.com> <immarvin@users.noreply.github.com>
|
||||
YANG Song <yangsbj@cn.ibm.com> <yangsbj@cn.ibm.comq>
|
||||
YIN Le <yinle@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
YIN Le <yinle@cn.ibm.com> <yinle@8638fb3e-16cb-4fca-ae20-7b5d299a9bcd>
|
||||
YIN Le <yinle@cn.ibm.com>
|
||||
ZHAO Er Tao <ertaozh@cn.ibm.com>
|
||||
ZHAO Er Tao <ertaozh@cn.ibm.com> <ertaozh@cn.ibm.comls>
|
||||
|
30
.travis.yml
Normal file
30
.travis.yml
Normal file
@@ -0,0 +1,30 @@
|
||||
os: linux
|
||||
dist: trusty
|
||||
sudo: required
|
||||
before_install:
|
||||
- sudo apt-get install -y git reprepro devscripts debhelper libsoap-lite-perl libdbi-perl quilt openssh-server dpkg looptools genometools software-properties-common
|
||||
- perl -v
|
||||
- echo "yes" | sudo cpan -f -i Capture::Tiny
|
||||
|
||||
script:
|
||||
- echo $TRAVIS_BUILD_ID
|
||||
- echo $TRAVIS_EVENT_TYPE
|
||||
- echo $TRAVIS_BUILD_NUMBER
|
||||
- echo $TRAVIS_BUILD_DIR
|
||||
- echo $TRAVIS_COMMIT
|
||||
- echo $TRAVIS_COMMIT_MESSAGE
|
||||
- echo $TRAVIS_COMMIT_RANGE
|
||||
- echo $TRAVIS_JOB_ID
|
||||
- echo $TRAVIS_JOB_NUMBER
|
||||
- echo $TRAVIS_BRANCH
|
||||
- echo $TRAVIS_COMMIT_MESSAGE
|
||||
- echo $USERNAME
|
||||
- echo $PASSWORD
|
||||
- echo $GITHUB_TOKEN
|
||||
- git log --pretty=format:"%s %b" -2
|
||||
|
||||
#- perl travis.pl
|
||||
- if [ $TRAVIS_EVENT_TYPE == "pull_request" ]; then perl ./travis.pl; fi
|
||||
|
||||
|
||||
|
@@ -8,7 +8,7 @@ Documentation
|
||||
|
||||
xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/
|
||||
|
||||
|docs_latest| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212|
|
||||
|docs_latest| |docs_2135| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212|
|
||||
|
||||
Open Source License
|
||||
-------------------
|
||||
@@ -22,6 +22,11 @@ Developers
|
||||
Developers and prospective contributors are encouraged to read the `Developers Guide <http://xcat-docs.readthedocs.io/en/latest/developers/>`_
|
||||
In particular the `GitHub <http://xcat-docs.readthedocs.io/en/latest/developers/github/>`_ related subsection.
|
||||
|
||||
.. |docs_2135| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.5
|
||||
:alt: 2.13.5 documentation status
|
||||
:scale: 100%
|
||||
:target: http://xcat-docs.readthedocs.io/en/2.13.5/
|
||||
|
||||
.. |docs_2134| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.4
|
||||
:alt: 2.13.4 documentation status
|
||||
:scale: 100%
|
||||
|
@@ -22,6 +22,8 @@
|
||||
# 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.
|
||||
# GPGSIGN=0 - Do not sign the repo in the end of the build. The repo will be signed by default
|
||||
#
|
||||
# LOG=<filename> - 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
|
||||
@@ -125,16 +127,20 @@ if [ ! -z ${LOG} ]; then
|
||||
WGET_CMD="wget -o ${LOG}"
|
||||
fi
|
||||
|
||||
#sync the gpg key to the build machine local
|
||||
gsa_url=http://pokgsa.ibm.com/projects/x/xcat/build/linux
|
||||
mkdir -p $HOME/.gnupg
|
||||
for key_name in pubring.gpg secring.gpg trustdb.gpg; do
|
||||
if [ ! -f $HOME/.gnupg/$key_name ] || [ `wc -c $HOME/.gnupg/$key_name|cut -f 1 -d' '` == 0 ]; then
|
||||
rm -f $HOME/.gnupg/$key_name
|
||||
${WGET_CMD} -P $HOME/.gnupg $gsa_url/keys/$key_name
|
||||
chmod 600 $HOME/.gnupg/$key_name
|
||||
fi
|
||||
done
|
||||
if [ "$GPGSIGN" = "0" ];then
|
||||
echo "GPGSIGN=$GPGSIGN specified, skip gnupg key downloading"
|
||||
else
|
||||
#sync the gpg key to the build machine local
|
||||
gsa_url=http://pokgsa.ibm.com/projects/x/xcat/build/linux
|
||||
mkdir -p $HOME/.gnupg
|
||||
for key_name in pubring.gpg secring.gpg trustdb.gpg; do
|
||||
if [ ! -f $HOME/.gnupg/$key_name ] || [ `wc -c $HOME/.gnupg/$key_name|cut -f 1 -d' '` == 0 ]; then
|
||||
rm -f $HOME/.gnupg/$key_name
|
||||
${WGET_CMD} -P $HOME/.gnupg $gsa_url/keys/$key_name
|
||||
chmod 600 $HOME/.gnupg/$key_name
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
if [ "$c_flag" ]
|
||||
then
|
||||
@@ -323,10 +329,16 @@ Codename: $dist
|
||||
Architectures: $tmp_out_arch
|
||||
Components: main
|
||||
Description: Repository automatically genereted conf
|
||||
SignWith: yes
|
||||
|
||||
__EOF__
|
||||
done
|
||||
|
||||
if [ "$GPGSIGN" = "0" ];then
|
||||
echo "GPGSIGN=$GPGSIGN specified, the repo will not be signed"
|
||||
echo "" >> conf/distributions
|
||||
else
|
||||
echo "SignWith: yes" >> conf/distributions
|
||||
echo "" >> conf/distributions
|
||||
fi
|
||||
done
|
||||
|
||||
cat << __EOF__ > conf/options
|
||||
verbose
|
||||
@@ -444,11 +456,20 @@ Codename: $dist
|
||||
Architectures: $tmp_out_arch
|
||||
Components: main
|
||||
Description: Repository automatically genereted conf
|
||||
SignWith: yes
|
||||
|
||||
__EOF__
|
||||
|
||||
if [ "$GPGSIGN" = "0" ];then
|
||||
echo "GPGSIGN=$GPGSIGN specified, the repo will not be signed"
|
||||
echo "" >> conf/distributions
|
||||
else
|
||||
echo "SignWith: yes" >> conf/distributions
|
||||
echo "" >> conf/distributions
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
|
||||
|
||||
cat << __EOF__ > conf/options
|
||||
verbose
|
||||
ask-passphrase
|
||||
|
@@ -26,20 +26,14 @@ Red Hat Enterprise Linux
|
||||
perl-DBD-MySQL*
|
||||
mysql-server-5.*
|
||||
mysql-5.*
|
||||
mysql-devel-5.*
|
||||
mysql-bench-5.*
|
||||
mysql-connector-odbc-*
|
||||
|
||||
* MariaDB - Using ``yum``, ensure that the following packages are installed on the management node: ::
|
||||
|
||||
mariadb-devel-5.*
|
||||
mariadb-libs-5.*
|
||||
mariadb-server-5.*
|
||||
mariadb-bench-5.*
|
||||
mariadb-5.*
|
||||
perl-DBD-MySQL*
|
||||
mysql-connector-odbc-*
|
||||
unixODBC*
|
||||
|
||||
Suse Linux Enterprise Server
|
||||
----------------------------
|
||||
|
@@ -1,51 +1,42 @@
|
||||
Predict network adapter name before deployment
|
||||
Predict network adapter name during discovery
|
||||
==============================================
|
||||
|
||||
Traditionally, network interfaces in Linux are enumerated as eth[0123…], but
|
||||
these names do not correspond to actual labels on the chassis. Now, most of
|
||||
the linux distribution support naming the adapter with slot information which
|
||||
makes adapter name predictable. xCAT add ``getadapter`` script which can be
|
||||
run during discovery stage to detect the adapter names and pci slot
|
||||
information to help customer configure the network.
|
||||
|
||||
|
||||
Traditionally, network interfaces in Linux are enumerated as eth[0123…], but these names do not necessarily correspond to actual labels on the chassis. customer need a methods to get consistent and predictable network device name before provision or network configuration. xCAT provide a tool ``getadapter`` to help customer to resolve this problem.
|
||||
|
||||
|
||||
**[Note]** : This feature needs to restart your target sever which you want to obtain network adapter from.
|
||||
|
||||
How to use get adapters
|
||||
How to use getadapter
|
||||
-----------------------
|
||||
|
||||
Set the chian table to run ``getadapter`` script ::
|
||||
|
||||
Using below command to obtain the network adapters information ::
|
||||
|
||||
getadapter <noderange>
|
||||
chdef <noderange> chain="runcmd=getadapter"
|
||||
|
||||
Then will get output like below ::
|
||||
After the discovery completed, the column ``nicsadapter`` of ```nics`` table is
|
||||
updated.
|
||||
|
||||
View result with ``lsdef`` command ::
|
||||
|
||||
The whole scan result:
|
||||
--------------------------------------
|
||||
[node2] scan successfully, below are the latest data
|
||||
node2:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80
|
||||
node2:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433
|
||||
--------------------------------------
|
||||
[node1] scan successfully, below are the latest data
|
||||
node1:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80
|
||||
node1:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433
|
||||
# lsdef <node>
|
||||
.......
|
||||
nicsadapter.enP3p3s0f0=mac=98:be:94:59:fa:cc linkstate=DOWN pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.0 candidatename=enP3p3s0f0/enx98be9459facc
|
||||
nicsadapter.enP3p3s0f1=mac=98:be:94:59:fa:cd linkstate=DOWN pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.1 candidatename=enP3p3s0f1/enx98be9459facd
|
||||
nicsadapter.enP3p3s0f2=mac=98:be:94:59:fa:ce linkstate=DOWN pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.2 candidatename=enP3p3s0f2/enx98be9459face
|
||||
nicsadapter.enP3p3s0f3=mac=98:be:94:59:fa:cf linkstate=UP pci=/pci0003:00/0003:00:00.0/0003:01:00.0/0003:02:01.0/0003:03:00.3 candidatename=enP3p3s0f3/enx98be9459facf
|
||||
.......
|
||||
|
||||
Below are the information ``getadapter`` trying to inspect:
|
||||
|
||||
Every node gets a separate section to display its all network adapters information, every network adapter owns single line which start as node name and followed by index and other information.
|
||||
* **name**: the real adapter name used by genesis operation system
|
||||
|
||||
xCAT try its best to collect more information for each network adapter, but can’t guarantee collect same much information for every one. If a network adapter can be derived by xcat genesis, this adapter will have a predictable name, if it can’t be, it only has the information xcat can obtain.
|
||||
|
||||
below are the possible information:
|
||||
|
||||
* **name**: the consistent name which can be used by confignic directly in operating system which follow the same naming scheme with rhels7
|
||||
|
||||
* **pci**: the pci location
|
||||
* **pci**: the pci slot location
|
||||
|
||||
* **mac**: the MAC address
|
||||
|
||||
* **candidatename**: All the names which satisfy predictable network device naming scheme, if customer needs to customize their network adapter name, they can choose one of them. (``confignic`` needs to do more work to support this. if customer want to use their own name, xcat should offer a interface to get customer’s input and change this column)
|
||||
* **candidatename**: All the names which satisfy predictable network device naming scheme, if customer needs to customize their network adapter name, they can choose one of them. (``confignetwork`` needs to do more work to support this. if customer want to use their own name, xcat should offer a interface to get customer’s input and change this column)
|
||||
|
||||
* **vendor**: the vender of network device
|
||||
|
||||
* **modle**: the modle of network device
|
||||
|
||||
* **linkstate**: The link state of network device
|
||||
* **linkstate**: The link state of network device
|
@@ -7,6 +7,7 @@ The Open Network Install Environment, or "ONIE" [1]_. is an open source project
|
||||
:maxdepth: 2
|
||||
|
||||
os_cumulus/index.rst
|
||||
os_cumulus/ztp.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.
|
||||
|
@@ -0,0 +1,91 @@
|
||||
Setup ONIE switches with ZTP in large cluster
|
||||
=============================================
|
||||
|
||||
Zero Touch Provisioning (ZTP) is a feature shipped in many network devices to enable them to be quickly deployed in large-scale environments. In Cumulus OS on ONIE switches with ZTP enabled, the URL of an user provided script can be specified in the DHCP response for the DHCP request trigged by one of the following events:
|
||||
|
||||
* Booting the switch
|
||||
* Plugging a cable into or unplugging it from the eth0 port
|
||||
* Disconnecting then reconnecting the switch's power cord.
|
||||
|
||||
the script will be then downloaded and executed on the network device.
|
||||
|
||||
Leveraging the ZTP mechanism, xCAT provides the capability to setup ONIE switches from white-box without touching anything, including Cumulus OS installation, discovery and configuration. Please follow the steps below to setup ONIE switches in the cluster:
|
||||
|
||||
1. Ensure that xCAT is configured with an DHCP open range to detect when new switches request DHCP IPs
|
||||
|
||||
(1). Make sure the network in which the management interface of the ONIE switches are connected has been defined in ``networks`` table ::
|
||||
|
||||
# tabdump networks
|
||||
#netname,net,mask,mgtifname,gateway,dhcpserver,tftpserver,nameservers,ntpservers,logservers,dynamicrange,staticrange,staticrangeincrement,nodehostname,ddnsdomain,vlanid,domain,mtu,comments,disable
|
||||
"172_21_0_0-255_255_0_0","172.21.0.0","255.255.0.0","enP3p3s0d1","<xcatmaster>","172.21.253.27","172.21.253.27",,,,"172.21.253.100-172.21.253.200",,,,,,,,,
|
||||
|
||||
(2). Prepare the DHCP configuration for ONIE switches setup
|
||||
|
||||
Add the management node's NIC facing the ONIE switches' management interface to the ``site.dhcpinterfaces`` ::
|
||||
|
||||
chdef -t site -p dhcpinterfaces=enP3p3s0d1
|
||||
|
||||
Add dynamic range for the temporary IP addresses used in the OS provision and discovery of ONIE switches ::
|
||||
|
||||
chdef -t network 172_21_0_0-255_255_0_0 dynamicrange="172.21.253.100-172.21.253.200"
|
||||
|
||||
Update DHCP configuration file ::
|
||||
|
||||
makedhcp -n
|
||||
|
||||
2. Predefine ONIE switches according to the network plan ::
|
||||
|
||||
mkdef mid05tor10 --template onieswitch ip=172.21.205.10 switch=mgmtsw01 switchport=10
|
||||
|
||||
``ip`` is the IP address of the management interface of the ONIE switch
|
||||
|
||||
``switch`` is the core switch to which the management interface of ONIE switch is connected.
|
||||
|
||||
``switchport`` is the port on the core switch to which the management interface of ONIE switch is connected.
|
||||
|
||||
3. Add the predefined switches into ``/etc/hosts`` ::
|
||||
|
||||
makehosts mid05tor10
|
||||
|
||||
4. [If the Cumulus OS have been installed on the ONIE switches, please skip this step] Prepare the Cumulus installation image, ``/install/onie/onie-installer`` is the hard-coded path of the Cumulus installation image, or the link to the Cumulus installation image on the management node ::
|
||||
|
||||
mkdir -p /install/onie/
|
||||
cp /install/custom/sw_os/cumulus/cumulus-linux-3.1.0-bcm-armel.bin /install/onie/
|
||||
ln -s /install/onie/cumulus-linux-3.1.0-bcm-armel.bin /install/onie/onie-installer
|
||||
|
||||
5. Plug the ONIE switches into the cluster according to the network plan and power on them.
|
||||
|
||||
For the white-box ONIE switches, the Cumulus OS will be installed, then the switches will be discovered and configured automaticaly, the whole process will take about 1 hour.
|
||||
|
||||
For the ONIE switches already with Cumulus OS installed, please make sure the ZTP have been enabled and none of the following manual configuration have been made:
|
||||
|
||||
* Password changes
|
||||
* Users and groups changes
|
||||
* Packages changes
|
||||
* Interfaces changes
|
||||
* The presence of an installed license
|
||||
|
||||
Otherwise, please run ``ztp -R`` on the switches to reset the ZTP state before switch boot up for setup. The whole setup process will take about 1-2 minutes.
|
||||
|
||||
6. The switch definition in xCAT will be updated when the switch is configured ::
|
||||
|
||||
# lsdef mid05tor10
|
||||
Object name: mid05tor10
|
||||
arch=armv7l
|
||||
groups=switch
|
||||
ip=172.21.205.10
|
||||
mac=xx:xx:xx:xx:xx:xx
|
||||
mgt=switch
|
||||
netboot=onie
|
||||
nodetype=switch
|
||||
postbootscripts=otherpkgs
|
||||
postscripts=syslog,remoteshell,syncfiles
|
||||
serial=11S01FT690YA50YD73EACH
|
||||
status=configured
|
||||
statustime=06-22-2017 23:14:14
|
||||
supportedarchs=armv7l
|
||||
switch=mgmtsw01
|
||||
switchport=10
|
||||
switchtype=Edgecore Networks Switch
|
||||
|
||||
``status=configured`` indicates that the switch has been discovered and configured.
|
@@ -95,7 +95,6 @@ exclude_patterns = ['guides/install-guides/common_sections.rst',
|
||||
'**ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst',
|
||||
'**ppc64le/discovery/pbmc_discovery_with_lsslp.rst',
|
||||
'**ppc64le/discovery/schedule_environment.rst',
|
||||
'**ppc64le/discovery/standard_cn_definition.rst',
|
||||
'**ppc64le/diskless/customize_image/cfg_partition.rst',
|
||||
'**ppc64le/diskless/customize_image/raid_cfg.rst',
|
||||
#'**chain/create_image_for_runimage.rst'
|
||||
|
@@ -1,10 +0,0 @@
|
||||
Advanced Networking Configuration - confignetwork
|
||||
=================================================
|
||||
|
||||
**Note:** ``confignetwork`` postscript is only supported on RHEL releases.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
.. include:: ../../../common/deployment/cfg_network_vlan.rst
|
||||
.. include:: ../../../common/deployment/cfg_network_bond.rst
|
@@ -1,58 +0,0 @@
|
||||
Configure Two Bonded Adapters
|
||||
-----------------------------
|
||||
|
||||
The following example set the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` has two physical NICs: eth2 and eth3
|
||||
* Bond eth2 and eth3 as ``bond0``
|
||||
* Assign ip ``40.0.0.1`` to the bonded interface ``bond0``
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#. Using the ``mkdef`` or ``chdef`` commands
|
||||
|
||||
a. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` ::
|
||||
|
||||
chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet
|
||||
|
||||
b. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3"
|
||||
chdef cn1 nicips.bond0=40.0.0.1
|
||||
|
||||
Add network object into the networks table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use the ``chdef`` command to add/modify the networks in the ``networks`` table ::
|
||||
|
||||
chdef -t network net40 net=40.0.0.0 mask=255.0.0.0
|
||||
chdef cn1 nicnetworks.bond0=net40
|
||||
|
||||
Add ``confignetwork`` into the node's postscripts list
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use command below to add ``confignetwork`` into the node's postscripts list ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
|
||||
During OS deployment on compute node, ``confignetwork`` postscript will be executed.
|
||||
If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
|
||||
Verify bonding mode
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Login to compute node cn1 and check bonding options in ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file ::
|
||||
|
||||
BONDING_OPTS="mode=802.3ad xmit_hash_policy=layer2+3"
|
||||
|
||||
|
||||
* ``mode=802.3ad`` requires additional configuration on the switch.
|
||||
* ``mode=2`` can be used for bonding without additional switch configuration.
|
||||
|
||||
If changes are made to ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file, restart network service.
|
@@ -1,109 +0,0 @@
|
||||
Configure BOND, VLAN and BRIDGES
|
||||
--------------------------------
|
||||
|
||||
The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support VLAN, BONDs, and BRIDGES. In order for the ``confignetwork`` postscript to run successfully, the following attributes must be configured for the node in the ``nics`` table:
|
||||
|
||||
* ``nicips``
|
||||
* ``nictypes``
|
||||
* ``nicnetworks``
|
||||
* ``nicdevices`` - resolves the relationship among the physical network interface devices
|
||||
|
||||
The following example set the xCAT properties for compute node ``cn1`` to achieve the following network configuration using the ``confignetwork`` postscript:
|
||||
|
||||
* Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3``
|
||||
* Bond ``eth2`` and ``eth3`` as ``bond0``
|
||||
* From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2``
|
||||
* Make bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1)
|
||||
* Make bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1)
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Chose one of two methods described below:
|
||||
|
||||
#. Using the ``mkdef`` or ``chdef`` commands
|
||||
|
||||
a. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` ::
|
||||
|
||||
chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet
|
||||
|
||||
b. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0=bond \
|
||||
nicdevices.bond0="eth2|eth3"
|
||||
|
||||
c. From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0.1=vlan \
|
||||
nictypes.bond0.2=vlan \
|
||||
nicdevices.bond0.1=bond0 \
|
||||
nicdevices.bond0.2=bond0
|
||||
|
||||
d. Create bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1) ::
|
||||
|
||||
chdef cn1 nictypes.br1=bridge \
|
||||
nicdevices.br1=bond0.1 \
|
||||
nicips.br1=10.0.0.1 \
|
||||
nicnetworks.br1="net10"
|
||||
|
||||
e. Create bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1) ::
|
||||
|
||||
chdef cn1 nictypes.br2=bridge \
|
||||
nicdevices.br2=bond0.2 \
|
||||
nicips.br2=20.0.0.1 \
|
||||
nicnetworks.br2="net20"
|
||||
|
||||
#. Using an xCAT stanza file
|
||||
|
||||
- Prepare a stanza file ``<filename>.stanza`` with content similiar to the following: ::
|
||||
|
||||
# <xCAT data object stanza file>
|
||||
cn1:
|
||||
objtype=node
|
||||
arch=x86_64
|
||||
groups=kvm,vm,all
|
||||
nicdevices.br1=bond0.1
|
||||
nicdevices.br2=bond0.2
|
||||
nicdevices.bond0.1=bond0
|
||||
nicdevices.bond0.2=bond0
|
||||
nicdevices.bond0=eth2|eth3
|
||||
nictypes.eth2=ethernet
|
||||
nictypes.eth3=ethernet
|
||||
nictypes.bond0=bond
|
||||
nictypes.bond0.1=vlan
|
||||
nictypes.bond0.2=vlan
|
||||
nictypes.br1=bridge
|
||||
nictypes.br2=bridge
|
||||
nicips.br1=10.0.0.1
|
||||
nicips.br2=20.0.0.1
|
||||
nicnetworks.br1=net10
|
||||
nicnetworks.br2=net20
|
||||
|
||||
- Using the ``mkdef -z`` option, define the stanza file to xCAT: ::
|
||||
|
||||
cat <filename>.stanza | mkdef -z
|
||||
|
||||
Define the additional networks to xCAT
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If this is a new network being created on the compute nodes, an entry needs to be created into the xCAT database.
|
||||
|
||||
The ``nicnetworks`` attribute only defines the nic that uses the IP address.
|
||||
Other information about the network should be defined in the ``networks`` table.
|
||||
|
||||
Use the ``chdef`` command to add/modify the networks in the ``networks`` table ::
|
||||
|
||||
chdef -t network net10 net=10.0.0.0 mask=255.0.0.0
|
||||
chdef -t network net20 net=20.0.0.0 mask=255.0.0.0
|
||||
|
||||
Add ``confignetwork`` into the node's postscripts list
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use the following command to add ``confignetwork`` into postscript list to execute on reboot: ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
@@ -0,0 +1,63 @@
|
||||
Configure Aliases
|
||||
-----------------
|
||||
|
||||
The following example sets the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` with one physical NIC: ``eth2``
|
||||
* User wants to configure aliases ``aliases1-1`` and ``aliases1-2``
|
||||
* Assign ip ``11.1.0.100`` to ``aliases1-1`` and ``12.1.0.100`` to ``aliases1-2``
|
||||
|
||||
Add network object into the networks table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add/modify the networks in the ``networks`` table ::
|
||||
|
||||
chdef -t network -o 11_1_0_0-255_255_0_0 net=11.1.0.0 mask=255.255.0.0
|
||||
chdef -t network -o 12_1_0_0-255_255_0_0 net=12.1.0.0 mask=255.255.0.0
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
#. Compute node ``cn1`` has one physical NICs: ``eth2`` ::
|
||||
|
||||
chdef cn1 nictypes.eth2=ethernet
|
||||
|
||||
#. Define ``nicips``, ``nicaliases``, ``nichostnamesuffixes`` ::
|
||||
|
||||
chdef cn1 nicips.eth2="11.1.0.100|12.1.0.100" nicaliases.eth2="aliases1-1|aliases1-2" nichostnamesuffixes.eth2="-eth2|-eth2-1"
|
||||
|
||||
#. Define ``nicnetworks`` ::
|
||||
|
||||
chdef cn1 nicnetworks.eth2="11_1_0_0-255_255_0_0|12_1_0_0-255_255_0_0"
|
||||
|
||||
Update /etc/hosts
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Update the ``/etc/hosts`` file ::
|
||||
|
||||
makehosts cn1
|
||||
|
||||
#. Check the ``/etc/hosts`` file ::
|
||||
|
||||
11.1.0.100 cn1-eth2 cn1-eth2.cluster.com aliases1-1
|
||||
12.1.0.100 cn1-eth2-1 cn1-eth2-1.cluster.com aliases1-2
|
||||
|
||||
Enable ``confignetwork`` to configure aliases
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Add ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript ::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Check the result
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
Check if eth2 is configured correctly ::
|
||||
|
||||
xdsh cn1 "ip addr show eth2"
|
||||
|
@@ -0,0 +1,53 @@
|
||||
Configure Bond using two Ethernet Adapters
|
||||
------------------------------------------
|
||||
|
||||
The following example sets the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` with two physical NICs: ``eth2`` and ``eth3``
|
||||
* Bond eth2 and eth3 as ``bond0``
|
||||
* Assign ip ``40.0.0.1`` to the bonded interface ``bond0``
|
||||
|
||||
Add network object into the networks table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add the network ``net40`` in the ``networks`` table ::
|
||||
|
||||
chdef -t network net40 net=40.0.0.0 mask=255.0.0.0
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` ::
|
||||
|
||||
chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet
|
||||
|
||||
#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3"
|
||||
chdef cn1 nicips.bond0=40.0.0.1
|
||||
|
||||
#. Define ``nicnetworks`` for ``bond0`` ::
|
||||
|
||||
chdef cn1 nicnetworks.bond0=net40
|
||||
|
||||
Enable ``confignetwork`` to configure bond
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. If adding ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript ::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Verify bonding mode
|
||||
~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Login to compute node cn1 and check bonding options in ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file ::
|
||||
|
||||
BONDING_OPTS="mode=802.3ad xmit_hash_policy=layer2+3"
|
||||
|
||||
|
||||
* ``mode=802.3ad`` requires additional configuration on the switch.
|
||||
* ``mode=2`` can be used for bonding without additional switch configuration.
|
@@ -0,0 +1,75 @@
|
||||
Configure Bridge Based on Bond Adapters
|
||||
---------------------------------------
|
||||
|
||||
The following example sets the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` with two physical NICs: ``eth2`` and ``eth3``
|
||||
* Bond eth2 and eth3 as ``bond0``
|
||||
* Create bridge ``br0`` based on ``bond0``
|
||||
* Assign ip ``40.0.0.1`` to the bridge interface ``br0``
|
||||
|
||||
Add network object into the networks table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add/modify network data in the ``networks`` table ::
|
||||
|
||||
chdef -t network net40 net=40.0.0.0 mask=255.0.0.0
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` ::
|
||||
|
||||
chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet
|
||||
|
||||
#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3"
|
||||
|
||||
#. Define ``br0`` based on ``bond0`` ::
|
||||
|
||||
chdef cn1 nicips.br0=40.0.0.1 nictypes.br0=bridge
|
||||
|
||||
#. Define ``nicnetworks`` for ``br0`` ::
|
||||
|
||||
chdef cn1 nicnetworks.br0=net40
|
||||
|
||||
Enable ``confignetwork`` to configure bridge
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. If adding ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript ::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Verify bridge
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Login to compute node cn1 and check bonding options in ``/etc/sysconfig/network-scripts/ifcfg-bond0`` file ::
|
||||
|
||||
DEVICE="bond0"
|
||||
BOOTPROTO="none"
|
||||
NAME="bond0"
|
||||
BONDING_MASTER="yes"
|
||||
ONBOOT="yes"
|
||||
USERCTL="no"
|
||||
TYPE="Bond"
|
||||
BONDING_OPTS="mode=802.3ad miimon=100"
|
||||
DHCLIENTARGS="-timeout 200"
|
||||
BRIDGE=br0
|
||||
|
||||
Check ``ifcfg-br0`` under ``/etc/sysconfig/network-scripts/`` ::
|
||||
|
||||
DEVICE="br0"
|
||||
BOOTPROTO="static"
|
||||
IPADDR="40.0.0.1"
|
||||
NETMASK="255.0.0.0"
|
||||
NAME="br0"
|
||||
ONBOOT="yes"
|
||||
STP="on"
|
||||
TYPE="Bridge"
|
||||
|
||||
Use ``ip addr`` command to check if ``br0`` and ``bond0`` are correct.
|
@@ -0,0 +1,61 @@
|
||||
Configure VLAN Based on Bond Adapters
|
||||
-------------------------------------
|
||||
|
||||
The following example sets the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` with two physical NICs: ``eth2`` and ``eth3``
|
||||
* Bond eth2 and eth3 as ``bond0``
|
||||
* Create bridge ``bond0.1`` based on ``bond0``
|
||||
* Assign ip ``40.0.0.1`` to the bridge interface ``bond0.1``
|
||||
|
||||
Add network object into the networks table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add/modify the network ``net40`` in the ``networks`` table ::
|
||||
|
||||
chdef -t network net40 net=40.0.0.0 mask=255.0.0.0
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` ::
|
||||
|
||||
chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet
|
||||
|
||||
#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0=bond nicdevices.bond0="eth2|eth3"
|
||||
|
||||
#. Define VLAN ``bond0.1`` based on ``bond0`` ::
|
||||
|
||||
chdef cn1 nicips.bond0.1=40.0.0.1 nictypes.bond0.1=vlan
|
||||
|
||||
#. Define ``nicnetworks`` for ``bond0.1`` ::
|
||||
chdef cn1 nicnetworks.bond0.1=net40
|
||||
|
||||
Enable ``confignetwork`` to configure bridge
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. If adding ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript ::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Verify VLAN
|
||||
~~~~~~~~~~~
|
||||
|
||||
Login to compute node cn1 and check ``ifcfg-bond0.1`` under ``/etc/sysconfig/network-scripts/`` ::
|
||||
|
||||
DEVICE="bond0.1"
|
||||
BOOTPROTO="static"
|
||||
IPADDR="40.0.0.1"
|
||||
NETMASK="255.0.0.0"
|
||||
NAME="bond0.1"
|
||||
ONBOOT="yes"
|
||||
USERCTL=no
|
||||
VLAN=yes
|
||||
|
||||
Use ``ip addr`` command to check if ``br0`` and ``bond0`` are correct.
|
@@ -0,0 +1,77 @@
|
||||
Configure BOND, VLAN and BRIDGES
|
||||
--------------------------------
|
||||
|
||||
The following example set the xCAT properties for compute node ``cn1`` to achieve the following network configuration using the ``confignetwork`` postscript:
|
||||
|
||||
* Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3``
|
||||
* Bond ``eth2`` and ``eth3`` as ``bond0``
|
||||
* From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2``
|
||||
* Make bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1)
|
||||
* Make bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1)
|
||||
|
||||
Define the additional networks to xCAT
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
If this is a new network being created on the compute nodes, an entry needs to be created into the xCAT database.
|
||||
|
||||
The ``nicnetworks`` attribute only defines the nic that uses the IP address.
|
||||
Other information about the network should be defined in the ``networks`` table.
|
||||
|
||||
Add/modify the networks in the ``networks`` table ::
|
||||
|
||||
chdef -t network net10 net=10.0.0.0 mask=255.0.0.0
|
||||
chdef -t network net20 net=20.0.0.0 mask=255.0.0.0
|
||||
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Compute node ``cn1`` has two physical NICs: ``eth2`` and ``eth3`` ::
|
||||
|
||||
chdef cn1 nictypes.eth2=ethernet nictypes.eth3=ethernet
|
||||
|
||||
#. Define ``bond0`` and bond ``eth2`` and ``eth3`` as ``bond0`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0=bond \
|
||||
nicdevices.bond0="eth2|eth3"
|
||||
|
||||
#. From ``bond0``, create 2 VLANs: ``bond0.1`` and ``bond0.2`` ::
|
||||
|
||||
chdef cn1 nictypes.bond0.1=vlan \
|
||||
nictypes.bond0.2=vlan \
|
||||
nicdevices.bond0.1=bond0 \
|
||||
nicdevices.bond0.2=bond0
|
||||
|
||||
#. Create bridge ``br1`` using ``bond0.1`` with IP (10.0.0.1) ::
|
||||
|
||||
chdef cn1 nictypes.br1=bridge \
|
||||
nicdevices.br1=bond0.1 \
|
||||
nicips.br1=10.0.0.1 \
|
||||
nicnetworks.br1="net10"
|
||||
|
||||
#. Create bridge ``br2`` using ``bond0.2`` with IP (20.0.0.1) ::
|
||||
|
||||
chdef cn1 nictypes.br2=bridge \
|
||||
nicdevices.br2=bond0.2 \
|
||||
nicips.br2=20.0.0.1 \
|
||||
nicnetworks.br2="net20"
|
||||
|
||||
Add ``confignetwork`` into the node's postscripts list
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Use the following command to add ``confignetwork`` into postscript list to execute on reboot: ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Check result
|
||||
~~~~~~~~~~~~
|
||||
|
||||
Use ``ip`` command on ``cn1`` to check all NICs ::
|
||||
|
||||
xdsh cn1 "ip addr"
|
||||
|
||||
Check all network configuration files under ``/etc/sysconfig/network-scripts/``.
|
@@ -0,0 +1,56 @@
|
||||
Configure Bridge Based On Ethernet NIC
|
||||
--------------------------------------
|
||||
|
||||
The following example set the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` has one physical NIC: eth1
|
||||
* User wants to confgure 1 bridge br1 based on eth1
|
||||
* Assign ip ``30.5.106.9`` to br0
|
||||
|
||||
Add network object into the networks table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add/modify the network ``net30`` in the ``networks`` table ::
|
||||
|
||||
chdef -t network net30 net=30.0.0.0 mask=255.0.0.0
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Compute node ``cn1`` has one physical NIC: ``eth1`` ::
|
||||
|
||||
chdef cn1 nictypes.eth1=ethernet
|
||||
|
||||
#. Define bridge ``br1`` based on ``eth1`` ::
|
||||
|
||||
chdef cn1 nictypes.br1=bridge nicdevices.br1="eth1"
|
||||
chdef cn1 nicips.br1=30.5.106.9
|
||||
|
||||
#. Define ``nicnetworks`` for ``br1`` ::
|
||||
|
||||
chdef cn1 nicnetworks.br1=net30
|
||||
|
||||
Enable ``confignetwork`` to configure bridge
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. If add ``confignetwork`` into the node's postscripts list, ``confignetwork`` will be executed during OS deployment on compute node ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript ::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Verify Bridge
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Login to compute node cn1 and check configure files in ``ifcfg-br1`` under ``/etc/sysconfig/network-scripts/`` ::
|
||||
|
||||
TYPE=Bridge
|
||||
STP=on
|
||||
|
||||
Check ``ifcfg-eth1`` under ``/etc/sysconfig/network-scripts/`` ::
|
||||
|
||||
BRIDGE=br1
|
||||
|
||||
Use ``ip addr`` command to check if ``br1``, ``eth0.6`` and ``eth0.7`` are correct.
|
@@ -0,0 +1,30 @@
|
||||
Use Customized Scripts To Configure NIC
|
||||
---------------------------------------
|
||||
|
||||
If using customized script to configure NIC, ``niccustomscripts`` for the specified nic in ``nics`` table should be configured. In the customized scripts, it can use data from xCAT DB, These data are parsed as global value from ``/xcatpost/mypostscript`` in compute node. Here is a simple example :
|
||||
|
||||
#. Compute node ``cn1`` with one physical NIC: ``eth1``
|
||||
#. Put customized script ``cfgeth1`` under xCAT MN ``/install/postscripts``
|
||||
#. Configure ``niccustomscripts`` in ``nics`` table ::
|
||||
chdef cn1 niccustomscripts.eth1=cfgeth1
|
||||
|
||||
#. The script ``cfgeth1`` uses data from xCAT DB, for example, it uses network ``net50`` from ``networks`` table ::
|
||||
|
||||
chdef -t network net50 net=50.0.0.0 mask=255.0.0.0
|
||||
|
||||
**Notes:** The network ``net50`` is parsed as ``NETWORKS_LINE1`` in ``/xcatpost/mypostscript`` as following, so script ``cfgeth1`` can use global value ``NETWORKS_LINE1`` directly ::
|
||||
|
||||
NETWORKS_LINE1='netname=net50||net=50.0.0.0||mask=255.0.0.0||mgtifname=||gateway=||dhcpserver=||tftpserver=||nameservers=||ntpservers=||logservers=||dynamicrange=||staticrange=||staticrangeincrement=||nodehostname=||ddnsdomain=||vlanid=||domain=||disable=||comments='
|
||||
|
||||
#. When ``confignetwork`` is running in ``cn1``, ``confignetwork`` will execute ``cfgeth1`` to configure eth1, so adding ``confignetwork`` into the node's postscripts list. During OS deployment on compute node, ``confignetwork`` postscript will be executed. ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. Or if the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
#. Use ``xdsh cn1 "ip addr show eth1"`` to check the NIC
|
||||
|
||||
#. Check ``ifcfg-eth1`` under ``/etc/sysconfig/network-scripts/``
|
||||
|
@@ -0,0 +1,76 @@
|
||||
Configure Ethernet Network Interface
|
||||
------------------------------------
|
||||
|
||||
The following example sets the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` with two physical NICs: ``eth0`` and ``eth1``
|
||||
* Management network is ``11.1.89.0``, application network is ``13.1.89.0``
|
||||
* The install NIC is eth0, and application NIC is eth1
|
||||
* Assign static ip ``11.1.89.7/24`` to eth0
|
||||
* Assign static ip ``13.1.89.7/24`` to eth1
|
||||
|
||||
Add/update networks into the xCAT DB
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add/update additional networks ``net11`` and ``net13`` into ``networks`` table::
|
||||
|
||||
chdef -t network net11 net=11.1.89.0 mask=255.255.255.0
|
||||
chdef -t network net13 net=13.1.89.0 mask=255.255.255.0
|
||||
|
||||
**Note:** MTU can be customized as ``mtu`` in ``networks`` table for specified network.
|
||||
|
||||
Define Adapters in the nics table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Provision ip is coming from DHCP, there is no need to configure install nic into ``nics`` table. Provision ip can be configured in node definition, but it is not required. ::
|
||||
|
||||
chdef cn1 ip=11.1.89.7
|
||||
|
||||
#. Data NIC ``eth1`` is not install NIC, configure ``eth1`` into ``nics`` table ::
|
||||
|
||||
chdef cn1 nicips.eth1="13.1.89.7" nicnetworks.eth1="net13" nictypes.eth1="Ethernet" nichostnamesuffixes.eth1=-eth2
|
||||
|
||||
Update /etc/hosts
|
||||
~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Run the ``makehosts`` command to add the new configuration to the ``/etc/hosts`` file. ::
|
||||
|
||||
makehosts cn1
|
||||
|
||||
#. Check ``/etc/hosts`` ::
|
||||
|
||||
cat /etc/hosts
|
||||
11.1.89.7 cn1 cn1.cluster.com
|
||||
13.1.89.7 cn1-eth1 cn1-eth1.cluster.com
|
||||
|
||||
Configure adapters with static IPs
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Execute ``confignetwork -s`` to configure both provision ip ``11.1.89.7`` and application data ip ``13.1.89.7`` as static
|
||||
|
||||
a. Add ``confignetwork -s`` into postscript list to execute on reboot ::
|
||||
|
||||
chdef cn1 -p postscripts="confignetwork -s"
|
||||
|
||||
b. If the compute node is already running, use ``updatenode`` command to run ``confignetwork -s`` postscript without rebooting the node ::
|
||||
|
||||
updatenode cn1 -P "confignetwork -s"
|
||||
|
||||
#. If install NIC is not configured in ``nics`` table, and only configure all other NIC's data defined in ``nics`` table, execute ``confignetwork`` without ``-s``
|
||||
|
||||
a. Add ``confignetwork`` into postscript list to execute on reboot ::
|
||||
|
||||
chdef cn1 -p postscripts="confignetwork"
|
||||
|
||||
b. If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node ::
|
||||
|
||||
updatenode cn1 -P "confignetwork"
|
||||
|
||||
**Notes:** Option "-s" writes the install NIC's information into configuration file for persistence. All other NIC's data defined in ``nics`` table will be written also. Without option "-s", ``confignetwork`` only configures all NIC's data defined in ``nics`` table.
|
||||
|
||||
Check result
|
||||
~~~~~~~~~~~~
|
||||
|
||||
#. Use ``xdsh cn1 "ip addr"`` to check ``eth0`` and ``eth1``
|
||||
|
||||
#. Check ``ifcfg-eth0`` and ``ifcfg-eth1`` under ``/etc/sysconfig/network-scripts/``
|
@@ -0,0 +1,21 @@
|
||||
Use Extra Parameters In NIC Configuration File
|
||||
----------------------------------------------
|
||||
|
||||
Use ``nicextraparams`` to customize attributes in NIC configuration file. For example :
|
||||
|
||||
#. Compute node ``cn1`` with one physical NIC: ``eth1``
|
||||
#. Configure network into ``networks`` table, configure ``nicips``, ``nictypes`` and ``nicnetworks`` in ``nics`` table, like :doc:`Configure Ethernet Network Interface<cfg_network_ethernet_nic>`
|
||||
#. In order to customize "MTU=1456 ONBOOT=no" for eth1. configure ``nicips``, ``nictypes`` and ``nicnetworks`` in ``nics`` table , also need to configure ``nicextraparams`` as following::
|
||||
|
||||
chdef cn1 nicextraparams.eth1="MTU=1456 ONBOOT=no"
|
||||
|
||||
#. After ``confignetwork`` is executed in ``cn1``, ``nicexraparams`` will overwrite the original value in ``/etc/sysconfig/network-scripts/ifcfg-eth1`` as ::
|
||||
|
||||
DEVICE=eth1
|
||||
IPADDR=13.1.89.7
|
||||
NETMASK=255.255.255.0
|
||||
BOOTPROTO=static
|
||||
ONBOOT=no
|
||||
HWADDR=42:f5:0a:05:6a:09
|
||||
MTU=1456
|
||||
|
@@ -0,0 +1,52 @@
|
||||
Configure VLAN Based on Ethernet Adapter
|
||||
----------------------------------------
|
||||
|
||||
The following example set the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` has one physical NIC: eth0
|
||||
* Confgure 2 vlans: eth0.6 and eth0.7 based on eth0
|
||||
* Assign ip ``60.5.106.9`` to eth0.6 and ``70.5.106.9`` to eth0.7
|
||||
|
||||
Define the additional networks to xCAT
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Add/modify the networks ``net60`` and ``net70`` in the ``networks`` table ::
|
||||
|
||||
chdef -t network net60 net=60.0.0.0 mask=255.0.0.0
|
||||
chdef -t network net70 net=70.0.0.0 mask=255.0.0.0
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Compute node ``cn1`` has one physical NIC: ``eth0`` ::
|
||||
|
||||
chdef cn1 nictypes.eth0=ethernet
|
||||
|
||||
#. Define vlan ``eth0.6`` and ``eth0.7`` based on ``eth0`` ::
|
||||
|
||||
chdef cn1 nictypes.eth0.6=vlan nicdevices.eth0.6="eth0" nictypes.eth0.7=vlan nicdevices.eth0.7="eth0"
|
||||
chdef cn1 nicips.eth0.6=60.5.106.9 nicips.eth0.7=70.5.106.9
|
||||
|
||||
#. Define ``nicnetworks`` for ``eth0.6`` and ``eth0.7`` ::
|
||||
|
||||
chdef cn1 nicnetworks.eth0.6=net60 nicnetworks.eth0.7=net70
|
||||
|
||||
Enable ``confignetwork`` to configure VLAN
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Add ``confignetwork`` into postscript list to execute on reboot ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
#. If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node ::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Verify VLAN
|
||||
~~~~~~~~~~~
|
||||
|
||||
Login to compute node cn1 and check VLAN options in ``ifcfg-eth0.6`` and ``ifcfg-eth0.7`` under ``/etc/sysconfig/network-scripts/`` ::
|
||||
|
||||
VLAN=yes
|
||||
|
||||
Use ``ip addr`` command to check if ``eth0.6`` and ``eth0.7`` are there.
|
@@ -0,0 +1,63 @@
|
||||
Configure Bridge Based on VLAN
|
||||
------------------------------
|
||||
|
||||
The following example set the xCAT properties for compute node ``cn1`` to create:
|
||||
|
||||
* Compute node ``cn1`` has one physical NIC: eth0
|
||||
* Define 2 vlans: eth0.6 and eth0.7 based on eth0
|
||||
* Define 2 bridge br1 and br2
|
||||
* Assign ip ``60.5.106.9`` to br1 and ``70.5.106.9`` to br2
|
||||
|
||||
Define attributes in the ``nics`` table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
#. Using the ``mkdef`` or ``chdef`` commands
|
||||
|
||||
a. Compute node ``cn1`` has one physical NIC: ``eth0`` ::
|
||||
|
||||
chdef cn1 nictypes.eth0=ethernet
|
||||
|
||||
b. Define vlan ``eth0.6`` and ``eth0.7`` based on ``eth0`` ::
|
||||
|
||||
chdef cn1 nictypes.eth0.6=vlan nicdevices.eth0.6="eth0" nictypes.eth0.7=vlan nicdevices.eth0.7="eth0"
|
||||
|
||||
c. Define bridge ``br1`` and ``br2`` ::
|
||||
|
||||
chdef cn1 nicips.br1=60.5.106.9 nicips.br2=70.5.106.9 nictypes.br1=bridge nictypes.br2=bridge
|
||||
|
||||
Add network object into the networks table
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use the ``chdef`` command to add/modify the networks in the ``networks`` table ::
|
||||
|
||||
chdef -t network net60 net=60.0.0.0 mask=255.0.0.0
|
||||
chdef -t network net70 net=70.0.0.0 mask=255.0.0.0
|
||||
chdef cn1 nicnetworks.br1=net60 nicnetworks.br2=net70
|
||||
|
||||
Add ``confignetwork`` into the node's postscripts list
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Use command below to add ``confignetwork`` into the node's postscripts list ::
|
||||
|
||||
chdef cn1 -p postscripts=confignetwork
|
||||
|
||||
|
||||
During OS deployment on compute node, ``confignetwork`` postscript will be executed.
|
||||
If the compute node is already running, use ``updatenode`` command to run ``confignetwork`` postscript without rebooting the node::
|
||||
|
||||
updatenode cn1 -P confignetwork
|
||||
|
||||
Verify Bridge
|
||||
~~~~~~~~~~~~~
|
||||
|
||||
Login to compute node cn1 and check ``ifcfg-br1`` and ``ifcfg-br2`` under ``/etc/sysconfig/network-scripts/`` like ::
|
||||
|
||||
BOOTPROTO="static"
|
||||
IPADDR="60.5.106.9"
|
||||
NETMASK="255.0.0.0"
|
||||
NAME="br1"
|
||||
ONBOOT="yes"
|
||||
STP="on"
|
||||
TYPE="Bridge"
|
||||
|
||||
Use ``ip addr`` command to check if ``br1``, ``br2``, ``eth0.6`` and ``eth0.7``.
|
@@ -1,5 +1,5 @@
|
||||
Configure Additional Network Interfaces - confignics
|
||||
====================================================
|
||||
Configure Additional Network Interfaces old version - confignics - (deprecated)
|
||||
===============================================================================
|
||||
|
||||
The **nics** table and the **confignics** postscript can be used to automatically configure additional network interfaces (multiple ethernets adapters, InfiniBand, etc) on the nodes as they are being deployed.
|
||||
|
@@ -0,0 +1,24 @@
|
||||
Use new kernel patch
|
||||
====================
|
||||
|
||||
This procedure assumes there are kernel RPM in /tmp, we take the osimage **rhels7.3-ppc64le-install-compute** as an example.
|
||||
The RPM names below are only examples, substitute your specific level and architecture.
|
||||
|
||||
* **[RHEL]**
|
||||
|
||||
#. The RPM kernel package is usually named: kernel-<kernelver>.rpm. Append new kernel packages directory to osimage pkgdir ::
|
||||
|
||||
mkdir -p /install/kernels/<kernelver>
|
||||
cp /tmp/kernel-*.rpm /install/kernels/<kernelver>
|
||||
createrepo /install/kernels/<kernelver>/
|
||||
chdef -t osimage rhels7.3-ppc64le-install-compute -p pkgdir=/install/kernels/<kernelver>
|
||||
|
||||
#. Inject the drivers from the new kernel RPMs into the initrd ::
|
||||
|
||||
mkdef -t osdistroupdate kernelupdate dirpath=/install/kernels/<kernelver>/
|
||||
chdef -t osimage rhels7.3-ppc64le-install-compute osupdatename=kernelupdate
|
||||
chdef -t osimage rhels7.3-ppc64le-install-compute netdrivers=updateonly
|
||||
genitrd rhels7.3-ppc64le-install-compute --ignorekernelchk
|
||||
nodeset <CN> osimage=rhels7.3-ppc64le-install-compute --noupdateinitrd
|
||||
|
||||
#. Boot CN from net normallly.
|
@@ -45,6 +45,10 @@ Configure DHCP to listen on different network interfaces [**Optional**]
|
||||
|
||||
To set "eth1" and "eth3" on the management node and "bond0" on all nodes in the nodegroup="service", set ``dhcpinterfaces`` using: ::
|
||||
|
||||
chdef -t site dhcpinterfaces="eth1,eth3;service|bond0"
|
||||
|
||||
or, to explicitly identify the management node with hostname ``xcatmn``: ::
|
||||
|
||||
chdef -t site dhcpinterfaces="xcatmn|eth1,eth3;service|bond0"
|
||||
|
||||
**noboot**
|
||||
|
@@ -31,35 +31,41 @@ For more information about chain, refer to :doc:`Chain <../../../../../advanced/
|
||||
Initialize the discovery process
|
||||
````````````````````````````````
|
||||
|
||||
Specify the predefined nodes to the nodediscoverstart command to initialize the discovery process::
|
||||
Specify the predefined nodes to the `nodediscoverstart` command to initialize the discovery process::
|
||||
|
||||
nodediscoverstart noderange=cn1
|
||||
|
||||
See "nodediscoverstart man page<TBD>" for more details.
|
||||
See :doc:`nodediscoverstart </guides/admin-guides/references/man1/nodediscoverstart.1>` for more information.
|
||||
|
||||
Display information about the discovery process
|
||||
```````````````````````````````````````````````
|
||||
|
||||
There are additional nodediscover commands you can run during the discovery process. See their man pages for more details.
|
||||
There are additional `nodediscover*` commands you can run during the discovery process. See the man pages for more details.
|
||||
|
||||
|
||||
Verify the status of discovery::
|
||||
Verify the status of discovery using :doc:`nodediscoverstatus </guides/admin-guides/references/man1/nodediscoverstatus.1>`::
|
||||
|
||||
nodediscoverstatus
|
||||
|
||||
Show the nodes that have been discovered so far::
|
||||
Show the nodes that have been discovered using :doc:`nodediscoverls </guides/admin-guides/references/man1/nodediscoverls.1>`::
|
||||
|
||||
nodediscoverls -t seq -l
|
||||
|
||||
Stop the current sequential discovery process::
|
||||
Stop the current sequential discovery process using: :doc:`nodediscoverstop </guides/admin-guides/references/man1/nodediscoverstop.1>`::
|
||||
|
||||
nodediscoverstop
|
||||
|
||||
Note: The sequential discovery process will be stopped automatically when all of the node names in the node pool are used up.
|
||||
|
||||
**Note:** The sequential discovery process will stop automatically when all of the node names in the pool are consumed.
|
||||
|
||||
Start discovery process
|
||||
-----------------------
|
||||
|
||||
To start the discovery process, the system administrator needs to power on the servers one by one manually. Then the hardware discovery process will start automatically.
|
||||
|
||||
.. include:: standard_cn_definition.rst
|
||||
Verify Node Definition
|
||||
----------------------
|
||||
|
||||
After discovery of the node, properties of the server will be added to the xCAT node definition.
|
||||
|
||||
Display the node definition and verify that the MAC address has been populated.
|
||||
|
@@ -1,25 +0,0 @@
|
||||
Verify node definition
|
||||
----------------------
|
||||
|
||||
The following is an example of the server node definition after hardware discovery::
|
||||
|
||||
# lsdef cn1
|
||||
Object name: cn1
|
||||
arch=ppc64
|
||||
bmc=50.0.100.1
|
||||
cons=ipmi
|
||||
cpucount=192
|
||||
cputype=POWER8E (raw), altivec supported
|
||||
groups=powerLE,all
|
||||
installnic=mac
|
||||
ip=10.0.101.1
|
||||
mac=6c:ae:8b:02:12:50
|
||||
memory=65118MB
|
||||
mgt=ipmi
|
||||
mtm=8247-22L
|
||||
netboot=petitboot
|
||||
postbootscripts=otherpkgs
|
||||
postscripts=syslog,remoteshell,syncfiles
|
||||
primarynic=mac
|
||||
serial=10112CA
|
||||
supportedarchs=ppc64
|
@@ -1 +0,0 @@
|
||||
.. include:: ../../../common/deployment/cfg_network.rst
|
@@ -1,8 +0,0 @@
|
||||
Customize network adapter
|
||||
=========================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
cfg_second_adapter.rst
|
||||
cfg_network.rst
|
@@ -1,2 +0,0 @@
|
||||
.. include:: ../../../common/deployment/cfg_second_adapter.rst
|
||||
|
@@ -11,6 +11,7 @@ Optional means all the subitems in this page are not necessary to finish an OS d
|
||||
pre_post_script.rst
|
||||
syncfile.rst
|
||||
additional_pkg.rst
|
||||
cfg_network_adapter.rst
|
||||
use_kernel_patch.rst
|
||||
network/index.rst
|
||||
|
||||
|
||||
|
@@ -0,0 +1,42 @@
|
||||
Configure Additional Network Interfaces - confignetwork
|
||||
-------------------------------------------------------
|
||||
|
||||
The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES. ``confignetwork`` can be used in postscripts during OS privision, it can also be executed in ``updatenode``. The way the ``confignetwork`` postscript decides what IP address to give the secondary adapter is by checking the ``nics`` table, in which the nic configuration information is stored. In order for the ``confignetwork`` postscript to run successfully, the following attributes must be configured for the node in the ``nics`` table:
|
||||
|
||||
* ``nicips``
|
||||
* ``nictypes``
|
||||
* ``nicnetworks``
|
||||
|
||||
If configuring VLAN, BOND, or BRIDGES, ``nicdevices`` in ``nics`` table must be configured. VLAN, BOND or BRIDGES is only supported on RHEL.
|
||||
|
||||
* ``nicdevices`` - resolves the relationship among the physical network interface devices
|
||||
|
||||
The following scenarios are examples to configure Ethernet adapters/BOND/VLAN/Bridge.
|
||||
|
||||
#. Configure Ethernet adapters:
|
||||
|
||||
* Scenario 1: :doc:`Configure Ethernet Network Interface <../../../../common/deployment/network/cfg_network_ethernet_nic>`
|
||||
To configure Ethernet install NIC or other Ethernet network adapters as static
|
||||
|
||||
#. Configure BOND **[RHEL]**:
|
||||
|
||||
* Scenario 2: :doc:`Configure Bond using two Ethernet Adapters <../../../../common/deployment/network/cfg_network_bond>`
|
||||
|
||||
#. Configure VLAN **[RHEL]**:
|
||||
|
||||
* Scenario 3: :doc:`Configure VLAN Based on Ethernet Adapter <../../../../common/deployment/network/cfg_network_vlan>`
|
||||
* Scenario 4: :doc:`Configure VLAN Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_vlan>`
|
||||
|
||||
#. Configure Bridge **[RHEL]**:
|
||||
|
||||
* Scenario 5: :doc:`Configure Bridge Based On Ethernet NIC <../../../../common/deployment/network/cfg_network_bridge>`
|
||||
* Scenario 6: :doc:`Configure Bridge Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_bridge>`
|
||||
* Scenario 7: :doc:`Configure Bridge Based on VLAN <../../../../common/deployment/network/cfg_network_vlan_bridge>`
|
||||
|
||||
* Scenario 8: :doc:`Configure Bridge Based on VLAN,VLAN use BOND adapter <../../../../common/deployment/network/cfg_network_bond_vlan_bridge>`
|
||||
|
||||
#. Advanced topics:
|
||||
|
||||
* :doc:`Use Customized Scripts To Configure NIC <../../../../common/deployment/network/cfg_network_custom_scripts>`
|
||||
* :doc:`Use Extra Parameters In NIC Configuration File <../../../../common/deployment/network/cfg_network_extra_param>`
|
||||
* :doc:`Configure Aliases <../../../../common/deployment/network/cfg_network_aliases>`
|
@@ -0,0 +1,2 @@
|
||||
.. include:: ../../../../common/deployment/network/cfg_second_adapter.rst
|
||||
|
@@ -0,0 +1,10 @@
|
||||
Customize network adapter
|
||||
=========================
|
||||
|
||||
This section describes how to configure network adapters with persistent configuration using xCAT. The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
cfg_network_adapter.rst
|
||||
cfg_second_adapter.rst
|
@@ -0,0 +1,2 @@
|
||||
.. include:: ../../../common/deployment/use_kernel_patch.rst
|
||||
|
@@ -1 +0,0 @@
|
||||
.. include:: ../../../common/deployment/cfg_network.rst
|
@@ -1,8 +0,0 @@
|
||||
Customize network adapter
|
||||
=========================
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
cfg_second_adapter.rst
|
||||
cfg_network.rst
|
@@ -1,2 +0,0 @@
|
||||
.. include:: ../../../common/deployment/cfg_second_adapter.rst
|
||||
|
@@ -10,7 +10,7 @@ Optional means all the subitems in this page are not necessary to finish an OS d
|
||||
pre_post_script.rst
|
||||
syncfile.rst
|
||||
additional_pkg.rst
|
||||
cfg_network_adapter.rst
|
||||
network/index.rst
|
||||
enable_kdump.rst
|
||||
install_new_kernel.rst
|
||||
acc_initrd_rootimg_gen_ppc64le.rst
|
||||
|
@@ -0,0 +1,42 @@
|
||||
Configure Additional Network Interfaces - confignetwork
|
||||
-------------------------------------------------------
|
||||
|
||||
The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES. ``confignetwork`` can be used in postscripts during OS privision, it can also be executed in ``updatenode``. The way the ``confignetwork`` postscript decides what IP address to give the secondary adapter is by checking the ``nics`` table, in which the nic configuration information is stored. In order for the ``confignetwork`` postscript to run successfully, the following attributes must be configured for the node in the ``nics`` table:
|
||||
|
||||
* ``nicips``
|
||||
* ``nictypes``
|
||||
* ``nicnetworks``
|
||||
|
||||
If configuring VLAN, BOND, or BRIDGES, ``nicdevices`` in ``nics`` table must be configured. VLAN, BOND or BRIDGES is only supported on RHEL.
|
||||
|
||||
* ``nicdevices`` - resolves the relationship among the physical network interface devices
|
||||
|
||||
The following scenarios are examples to configure Ethernet adapters/BOND/VLAN/Bridge.
|
||||
|
||||
#. Configure Ethernet adapters:
|
||||
|
||||
* Scenario 1: :doc:`Configure Ethernet Network Interface <../../../../common/deployment/network/cfg_network_ethernet_nic>`
|
||||
To configure Ethernet install NIC or other Ethernet network adapters as static
|
||||
|
||||
#. Configure BOND **[RHEL]**:
|
||||
|
||||
* Scenario 2: :doc:`Configure Bond using two Ethernet Adapters <../../../../common/deployment/network/cfg_network_bond>`
|
||||
|
||||
#. Configure VLAN **[RHEL]**:
|
||||
|
||||
* Scenario 3: :doc:`Configure VLAN Based on Ethernet Adapter <../../../../common/deployment/network/cfg_network_vlan>`
|
||||
* Scenario 4: :doc:`Configure VLAN Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_vlan>`
|
||||
|
||||
#. Configure Bridge **[RHEL]**:
|
||||
|
||||
* Scenario 5: :doc:`Configure Bridge Based On Ethernet NIC <../../../../common/deployment/network/cfg_network_bridge>`
|
||||
* Scenario 6: :doc:`Configure Bridge Based on Bond Adapters <../../../../common/deployment/network/cfg_network_bond_bridge>`
|
||||
* Scenario 7: :doc:`Configure Bridge Based on VLAN <../../../../common/deployment/network/cfg_network_vlan_bridge>`
|
||||
|
||||
* Scenario 8: :doc:`Configure Bridge Based on VLAN,VLAN use BOND adapter <../../../../common/deployment/network/cfg_network_bond_vlan_bridge>`
|
||||
|
||||
#. Advanced topics:
|
||||
|
||||
* :doc:`Use Customized Scripts To Configure NIC <../../../../common/deployment/network/cfg_network_custom_scripts>`
|
||||
* :doc:`Use Extra Parameters In NIC Configuration File <../../../../common/deployment/network/cfg_network_extra_param>`
|
||||
* :doc:`Configure Aliases <../../../../common/deployment/network/cfg_network_aliases>`
|
@@ -0,0 +1,2 @@
|
||||
.. include:: ../../../../common/deployment/network/cfg_second_adapter.rst
|
||||
|
@@ -0,0 +1,10 @@
|
||||
Customize network adapter
|
||||
=========================
|
||||
|
||||
This section describes how to configure network adapters with persistent configuration using xCAT. The ``confignetwork`` postscript can be used to configure the network interfaces on the compute nodes to support Ethernet adapters, VLAN, BONDs, and BRIDGES.
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 1
|
||||
|
||||
cfg_network_adapter.rst
|
||||
cfg_second_adapter.rst
|
@@ -1,121 +0,0 @@
|
||||
|
||||
############
|
||||
getadapter.1
|
||||
############
|
||||
|
||||
.. highlight:: perl
|
||||
|
||||
|
||||
****
|
||||
NAME
|
||||
****
|
||||
|
||||
|
||||
\ **getadapter**\ - Obtain all network adapters's predictable name and some other information before provision or network configuration.
|
||||
|
||||
|
||||
********
|
||||
SYNOPSIS
|
||||
********
|
||||
|
||||
|
||||
\ **getadapter**\ \ *noderange*\ [\ **-f**\ ]
|
||||
|
||||
\ **getadapter**\ [\ **-h | -**\ **-help | -v | -**\ **-version | -V**\ ]
|
||||
|
||||
|
||||
***********
|
||||
DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
Traditionally, network interfaces in Linux are enumerated as eth[0123...], but these names do not necessarily correspond to actual labels on the chassis. \ **getadapter**\ help customer to get predictable network device name and some other network adapter information before provision or network configuration.
|
||||
|
||||
\ **getadapter**\ use genesis to collect network adapters information, so that mean it need to restart the target node.
|
||||
|
||||
\ **getadapter**\ For each node within the <noderange>, follows below scheme:
|
||||
|
||||
If the target node is scanned for the first time, \ **getadapter**\ will trigger genesis to collect information then save the information at the \ **nicsadapter**\ column of nics table.
|
||||
If the target node has ever been scanned, \ **getadapter**\ will use the information from nics table first.
|
||||
If user hopes to scan the adapter information for the node but these information already exist, \ **-f**\ option can be used to start rescan process.
|
||||
|
||||
\ **getadapter**\ tries to collect more information for the target network device, but doesn't guarantee collect same much information for every network device.
|
||||
|
||||
Below are the possible information can be collect up to now:
|
||||
\ **name**\ : the consistent name which can be used by confignic directly in operating system which follow the same naming scheme with rhels7
|
||||
\ **pci**\ : the pci location
|
||||
\ **mac**\ : the MAC address
|
||||
\ **candidatename**\ : All the names which satisfy predictable network device naming scheme. \ *(if xcat enhance confignic command later, user can use these names to configure their network adapter, even customize their name)*\
|
||||
\ **vender**\ : the vender of network device
|
||||
\ **model**\ : the model of network device
|
||||
\ **linkstate**\ : the link state of network device
|
||||
|
||||
|
||||
*******
|
||||
OPTIONS
|
||||
*******
|
||||
|
||||
|
||||
\ **-h**\
|
||||
|
||||
Display usage message.
|
||||
|
||||
\ **-v**\
|
||||
|
||||
Command Version.
|
||||
|
||||
\ **-V**\
|
||||
|
||||
Display verbose message.
|
||||
|
||||
\ **-f**\
|
||||
|
||||
Force to trigger new round scan. ignore the data collected before.
|
||||
|
||||
|
||||
********
|
||||
EXAMPLES
|
||||
********
|
||||
|
||||
|
||||
1. To collect node[1-3]'s network device information, enter:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
getadapter node[1-2]
|
||||
|
||||
|
||||
Output is similar to:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
-->Starting scan for: node1,node2
|
||||
The whole scan result:
|
||||
--------------------------------------
|
||||
[node1]: Adapter information exists, no need to scan.
|
||||
--------------------------------------
|
||||
[node2] scan successfully, below are the latest data
|
||||
node2:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80
|
||||
node2:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433
|
||||
|
||||
|
||||
Every node gets a separate section to display its all network adapters information, every network adapter owns single line which start as node name and followed by index and other information.
|
||||
|
||||
2. Force to trigger new round scan
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
getadatper node -f
|
||||
|
||||
|
||||
|
||||
********
|
||||
SEE ALSO
|
||||
********
|
||||
|
||||
|
||||
noderange(3)|noderange.3
|
||||
|
@@ -23,7 +23,7 @@ SYNOPSIS
|
||||
|
||||
\ **pgsqlsetup**\ {\ **-v**\ | \ **-**\ **-version**\ }
|
||||
|
||||
\ **pgsqlsetup**\ {\ **-i**\ | \ **-**\ **-init**\ } [\ **-N**\ | \ **-**\ **-nostart**\ ] [\ **-P**\ | \ **-**\ **-PCM**\ ] [\ **-o**\ | \ **-**\ **-odbc**\ ] [\ **-V**\ | \ **-**\ **-verbose**\ ]
|
||||
\ **pgsqlsetup**\ {\ **-i**\ | \ **-**\ **-init**\ } [\ **-N**\ | \ **-**\ **-nostart**\ ] [\ **-**\ **-listen**\ | \ **-l**\ \ *address*\ ] [\ **-**\ **-access**\ | \ **-a**\ \ *address*\ ] [\ **-P**\ | \ **-**\ **-PCM**\ ] [\ **-o**\ | \ **-**\ **-odbc**\ ] [\ **-V**\ | \ **-**\ **-verbose**\ ]
|
||||
|
||||
\ **pgsqlsetup**\ {\ **-o**\ | \ **-**\ **-setupODBC**\ } [\ **-V**\ | \ **-**\ **-verbose**\ ]
|
||||
|
||||
@@ -65,7 +65,7 @@ OPTIONS
|
||||
|
||||
The init option is used to setup an installed PostgreSQL database so that xCAT can use the database. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the PostgreSQL database and restarts the xcatd daemon using the database.
|
||||
On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the -o option, to run after the init.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, edit the pg_hba.conf file.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the -a option.
|
||||
|
||||
For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB
|
||||
|
||||
@@ -77,6 +77,18 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
\ **-l|-**\ **-listen**\ \ *address*\
|
||||
|
||||
This option is used to specify additional IP addresses on which the PostgreSQL database will listen. Without it, only localhost (on Linux) and the management node's main IP (on Linux and AIX) will be configured. This option can be specified multiple times.
|
||||
|
||||
|
||||
|
||||
\ **-a|-**\ **-access**\ \ *address*\
|
||||
|
||||
This option is used to specify additional IP addresses from which the service nodes will connect to the PostgreSQL database. Without it, only the management node will be configured for database access. This option can be specified multiple times.
|
||||
|
||||
|
||||
|
||||
\ **-P|-**\ **-PCM**\
|
||||
|
||||
This option sets up PostgreSQL database to be used with xCAT running with PCM.
|
||||
|
@@ -11,7 +11,7 @@ Name
|
||||
****
|
||||
|
||||
|
||||
\ **rflash**\ - Performs Licensed Internal Code (LIC) update support for HMC-attached POWER5 and POWER6 Systems, and POWER7 systems using Direct FSP management. \ **rflash**\ is also able to update firmware for NextScale Fan Power Controllers (FPC).
|
||||
\ **rflash**\ - Performs Licensed Internal Code (LIC) update or firmware update on supported xCAT managed nodes.
|
||||
|
||||
|
||||
****************
|
||||
@@ -46,11 +46,18 @@ NeXtScale FPC specific:
|
||||
\ **rflash**\ \ *noderange*\ \ *http_directory*\
|
||||
|
||||
|
||||
OpenPOWER BMC specific:
|
||||
=======================
|
||||
OpenPOWER BMC specific (using IPMI):
|
||||
====================================
|
||||
|
||||
|
||||
\ **rflash**\ \ *noderange*\ \ *hpm_file_path*\ [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ]
|
||||
\ **rflash**\ \ *noderange*\ [\ *hpm_file_path*\ | \ **-d=**\ \ *data_directory*\ ] [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ]
|
||||
|
||||
|
||||
OpenPOWER OpenBMC specific :
|
||||
============================
|
||||
|
||||
|
||||
\ **rflash**\ \ *noderange*\ [\ *tar_file_path*\ | \ *image_id*\ ] [\ **-c | -**\ **-check**\ ] [\ **-a | -**\ **-activate**\ ] [\ **-l | -**\ **-list**\ ] [\ **-u | -**\ **-upload**\ ] [\ **-d | -**\ **-delete**\ ]
|
||||
|
||||
|
||||
|
||||
@@ -118,11 +125,20 @@ NeXtScale FPC specific:
|
||||
The command will update firmware for NeXtScale FPC when given an FPC node and the http information needed to access the firmware. The http information required includes both the MN IP address as well as the directory containing the firmware. It is recommended that the firmware be downloaded and placed in the /install directory structure as the xCAT MN /install directory is configured with the correct permissions for http. Refer to the doc to get more details: XCAT_NeXtScale_Clusters
|
||||
|
||||
|
||||
OpenPOWER specific:
|
||||
===================
|
||||
OpenPOWER specific (using IPMI):
|
||||
================================
|
||||
|
||||
|
||||
The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and the hpm1 formatted file path.
|
||||
The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and either the hpm formatted file path or path to a data directory.
|
||||
\ **Note:**\ When using \ **rflash**\ in hierarchical environment, the hpm file or data directory must be accessible from Service Nodes.
|
||||
|
||||
|
||||
OpenPOWER OpenBMC specific:
|
||||
===========================
|
||||
|
||||
|
||||
The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER node and either an update .tar file or an uploaded image id.
|
||||
\ **Note:**\ When using \ **rflash**\ in hierarchical environment, the .tar file must be accessible from Service Nodes.
|
||||
|
||||
|
||||
|
||||
@@ -140,7 +156,7 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node
|
||||
|
||||
\ **-c|-**\ **-check**\
|
||||
|
||||
Check the firmware version of BMC and HPM file.
|
||||
Check the firmware version of BMC and an update file.
|
||||
|
||||
|
||||
|
||||
@@ -156,6 +172,12 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node
|
||||
|
||||
|
||||
|
||||
\ **-d=**\ \ *data_directory*\
|
||||
|
||||
Used for IBM Power S822LC for Big Data systems only. Specifies the directory where the \ **pUpdate**\ utility and at least one of BMC or PNOR update files are located. The utility and update files can be downloaded from FixCentral.
|
||||
|
||||
|
||||
|
||||
\ **-**\ **-activate**\ {\ **concurrent**\ | \ **disruptive**\ }
|
||||
|
||||
Must be specified to activate the new Licensed Internal Code. The "disruptive" option will cause the target systems to be recycled. Without this flag, LIC updates will be installed only, not activated.
|
||||
@@ -180,6 +202,30 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node
|
||||
|
||||
|
||||
|
||||
\ **-a|-**\ **-activate**\
|
||||
|
||||
Activate update image. Image id must be specified.
|
||||
|
||||
|
||||
|
||||
\ **-l|-**\ **-list**\
|
||||
|
||||
List currently uploaded update images. "(\*)" indicates currently active image.
|
||||
|
||||
|
||||
|
||||
\ **-u|-**\ **-upload**\
|
||||
|
||||
Upload update image. Specified file must be in .tar format.
|
||||
|
||||
|
||||
|
||||
\ **-d|-**\ **-delete**\
|
||||
|
||||
Delete update image from BMC
|
||||
|
||||
|
||||
|
||||
\ **-v|-**\ **-version**\
|
||||
|
||||
Displays the command's version.
|
||||
@@ -267,6 +313,16 @@ The command will update firmware for OpenPOWER BMC when given an OpenPOWER node
|
||||
|
||||
|
||||
|
||||
6. To update the firmware on IBM Power S822LC for Big Data machine specify the node name and the file path of the data directory containing pUpdate utility and BMC and/or PNOR update files:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
rflash briggs01 -d=/root/supermicro/OP825
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
****************
|
||||
\ **Location**\
|
||||
|
@@ -25,7 +25,7 @@ BMC/MPA specific:
|
||||
=================
|
||||
|
||||
|
||||
\ **rinv**\ \ *noderange*\ {\ **pci | model | serial | asset | vpd | mprom | deviceid | guid | firm | diag | dimm | bios | mparom | mac | all**\ }
|
||||
\ **rinv**\ \ *noderange*\ [\ **model | serial | asset | vpd | deviceid | guid | firm | dimm | mprom | all**\ ]
|
||||
|
||||
|
||||
OpenPOWER (IPMI) server specific:
|
||||
@@ -39,7 +39,7 @@ OpenPOWER (OpenBMC) server specific:
|
||||
====================================
|
||||
|
||||
|
||||
\ **rinv**\ \ *noderange*\ [\ **model | serial | firm | cpu | dimm | all**\ ]
|
||||
\ **rinv**\ \ *noderange*\ [\ **model | serial | firm | cpu | dimm | all**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
|
||||
PPC (with HMC) specific:
|
||||
@@ -126,12 +126,6 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou
|
||||
|
||||
|
||||
|
||||
\ **pci**\
|
||||
|
||||
Retrieves PCI bus information.
|
||||
|
||||
|
||||
|
||||
\ **bus**\
|
||||
|
||||
List all buses for each I/O slot.
|
||||
@@ -140,8 +134,7 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou
|
||||
|
||||
\ **config**\
|
||||
|
||||
Retrieves number of processors, speed, total memory, and DIMM
|
||||
locations.
|
||||
Retrieves number of processors, speed, total memory, and DIMM locations.
|
||||
|
||||
|
||||
|
||||
@@ -177,7 +170,7 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou
|
||||
|
||||
\ **asset**\
|
||||
|
||||
Retrieves asset tag. Usually it's the MAC address of eth0.
|
||||
Retrieves asset tag. Usually it's the MAC address of eth0.
|
||||
|
||||
|
||||
|
||||
@@ -199,6 +192,12 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou
|
||||
|
||||
|
||||
|
||||
\ **dimm**\
|
||||
|
||||
Retrieves dual in-line memory module information.
|
||||
|
||||
|
||||
|
||||
\ **deviceid**\
|
||||
|
||||
Retrieves device identification. Usually device, manufacturing and product IDs.
|
||||
@@ -235,6 +234,12 @@ Calling \ **rinv**\ for VMware will display the UUID/GUID, number of CPUs, amou
|
||||
|
||||
|
||||
|
||||
\ **-V | -**\ **-verbose**\
|
||||
|
||||
Prints verbose output, if available.
|
||||
|
||||
|
||||
|
||||
\ **-t**\
|
||||
|
||||
Set the values in the vm table to what vCenter has for the indicated nodes.
|
||||
|
@@ -45,7 +45,7 @@ OpenPOWER OpenBMC:
|
||||
==================
|
||||
|
||||
|
||||
\ **rpower**\ \ *noderange*\ [\ **off | on | reset | boot | stat | state | status**\ ]
|
||||
\ **rpower**\ \ *noderange*\ [\ **off | on | softoff | reset | boot | bmcreboot | bmcstate | stat | state | status**\ ]
|
||||
|
||||
|
||||
PPC (with IVM or HMC) specific:
|
||||
@@ -380,6 +380,18 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
\ **bmcreboot**\
|
||||
|
||||
To reboot BMC.
|
||||
|
||||
|
||||
|
||||
\ **bmcstate**\
|
||||
|
||||
To get state of the BMC.
|
||||
|
||||
|
||||
|
||||
\ **state**\
|
||||
|
||||
To get state of the instance.
|
||||
|
@@ -47,7 +47,7 @@ OpenBMC specific:
|
||||
=================
|
||||
|
||||
|
||||
\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | vlan**\ }
|
||||
\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | vlan | sshcfg**\ }
|
||||
|
||||
|
||||
MPA specific:
|
||||
@@ -251,8 +251,7 @@ DESCRIPTION
|
||||
***********
|
||||
|
||||
|
||||
\ **rspconfig**\ configures various settings in the nodes' service processors. If only a keyword is
|
||||
specified, without the \ **=**\ , it displays the current value.
|
||||
\ **rspconfig**\ configures various settings in the nodes' service processors.
|
||||
|
||||
For options \ **autopower | iocap | decfg | memdecfg | procdecfg | time | date | spdump | sysdump | network**\ , user need to use \ *chdef -t site enableASMI=yes*\ to enable ASMI first.
|
||||
|
||||
@@ -526,6 +525,12 @@ OPTIONS
|
||||
|
||||
|
||||
|
||||
\ **sshcfg**\
|
||||
|
||||
Copy SSH keys.
|
||||
|
||||
|
||||
|
||||
\ **swnet**\ ={[\ *ip*\ ],[\ *gateway*\ ],[\ *netmask*\ ]}
|
||||
|
||||
Set the Switch network parameters.
|
||||
|
@@ -19,7 +19,7 @@ sinv.1
|
||||
****************
|
||||
|
||||
|
||||
\ **sinv**\ [\ **-o**\ \ *output*\ ] [\ **-p**\ \ *template path*\ ] [\ **-t**\ \ *template count*\ ] [\ **-s**\ \ *seed node*\ ] [\ **-i**\ ] [\ **-e**\ ] [\ **-r**\ ] [\ **-V**\ ] [\ **-**\ **-devicetype**\ \ *type_of_device*\ ] [\ **-l**\ \ *userID*\ ] [[\ **-f**\ \ *command file*\ ] | [\ **-c**\ \ *command*\ ]]
|
||||
\ **sinv**\ [\ **-o**\ \ *output*\ ] \ **-p**\ \ *template path*\ [\ **-t**\ \ *template count*\ ] [\ **-s**\ \ *seed node*\ ] [\ **-i**\ ] [\ **-e**\ ] [\ **-r**\ ] [\ **-V**\ ] [\ **-**\ **-devicetype**\ \ *type_of_device*\ ] [\ **-l**\ \ *userID*\ ] {\ **-f**\ \ *command file*\ | \ **-c**\ \ *command*\ }
|
||||
|
||||
\ **sinv**\ [\ **-h**\ | \ **-v**\ ]
|
||||
|
||||
@@ -30,9 +30,9 @@ sinv.1
|
||||
|
||||
|
||||
The \ **sinv**\ command is designed to check the configuration of the nodes in a cluster.
|
||||
The command takes as input command line flags, and one or more templates which will be compared against the output of the xdsh command, designated to be run by the -c or -f flag, on the nodes in the noderange.
|
||||
The command takes as input command line flags, and one or more templates which will be compared against the output of the \ **xdsh**\ command, designated to be run by the \ **-c**\ or \ **-f**\ flag, on the nodes in the noderange.
|
||||
|
||||
The nodes will then be grouped according to the template they match and a report returned to the administrator in the output file designated by the -o flag, or to stdout.
|
||||
The nodes will then be grouped according to the template they match and a report returned to the administrator in the output file designated by the \ **-o**\ flag, or to stdout.
|
||||
|
||||
\ **sinv**\ supports checking the output from the \ **rinv**\ or \ **xdsh**\ command.
|
||||
|
||||
@@ -40,13 +40,13 @@ The \ **sinv**\ command is an xCAT Distributed Shell Utility.
|
||||
|
||||
\ **COMMAND**\ \ **SPECIFICATION**\ :
|
||||
|
||||
The xdsh or rinv command to execute on the remote targets is specified by the \ **-c**\ flag, or by the \ **-f**\ flag
|
||||
The \ **xdsh**\ or \ **rinv**\ command to execute on the remote targets is specified by the \ **-c**\ flag, or by the \ **-f**\ flag
|
||||
which is followed by the fully qualified path to a file containing the command.
|
||||
|
||||
Note: do not add | xdshcoll to the command on the command line or in the
|
||||
command file, it is automatically added by sinv.
|
||||
Note: do not add \ **| xdshcoll**\ to the command on the command line or in the
|
||||
command file, it is automatically added by \ **sinv**\ .
|
||||
|
||||
The syntax for the \ **-c**\ \ **sinv**\ parameter is as follows:
|
||||
The syntax for the \ **-c**\ parameter is as follows:
|
||||
|
||||
"\ *command*\ [; \ *command*\ ]..."
|
||||
|
||||
@@ -60,9 +60,9 @@ those that read from standard input.
|
||||
|
||||
\ **REMOTE**\ \ **SHELL**\ \ **COMMAND**\ :
|
||||
|
||||
For xdsh, support is explicitly provided
|
||||
for AIX Remote Shell and OpenSSH, but any secure remote command that
|
||||
conforms to the IETF (Internet Engineering Task Force) Secure Remote
|
||||
For \ **xdsh**\ , support is explicitly provided
|
||||
for AIX Remote Shell and OpenSSH, but any secure remote command that
|
||||
conforms to the IETF (Internet Engineering Task Force) Secure Remote
|
||||
Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
|
||||
|
||||
@@ -74,32 +74,28 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
|
||||
\ **-o | -**\ **-output**\ \ *report output file*\
|
||||
|
||||
Optional output file. This is the location of the file that will contain the report of the nodes that match, and do not match, the input templates.
|
||||
If the flag is not used, the output will go to stdout.
|
||||
Optional output file. This is the location of the file that will contain the report of the nodes that match, and do not match, the input templates. If the flag is not used, the output will go to stdout.
|
||||
|
||||
|
||||
|
||||
\ **-p | -**\ **-tp**\ \ *template path*\
|
||||
|
||||
This is the path to the template file. The template contains the output
|
||||
of xdsh command, that has been run against a "seed" node, a node
|
||||
that contains the configuration that you would like
|
||||
all nodes in your noderange to match.
|
||||
of \ **xdsh**\ or \ **rinv**\ command, that has been run against a "seed" node, a node
|
||||
that contains the configuration that you would like all nodes in your noderange to match.
|
||||
|
||||
The admin can create the template by running the xdsh command on
|
||||
the seed node, pipe to xdshcoll ( required) and store the output
|
||||
The admin can create the template by running the \ **xdsh**\ or \ **rinv**\ command on
|
||||
the seed node, pipe to \ **xdshcoll**\ (required) and store the output
|
||||
in the template path. See examples.
|
||||
|
||||
\ **Note:**\ The admin can also edit the
|
||||
template to remove any lines that they do not want checked.
|
||||
\ **Note:**\ The admin can also edit the template to remove any lines that they do not want checked.
|
||||
|
||||
An alternative method is to use the [\ **-s**\ \ *seed node*\ ] parameter,
|
||||
which will automatically build the template for you from the
|
||||
seed node named.
|
||||
|
||||
If a template path file does not exist, and a seed node is not input,
|
||||
then sinv will automatically use the one node in the noderange as
|
||||
the seed node and build the template.
|
||||
If a a seed node is not provided, then command will automatically use the first node in the noderange as
|
||||
the seed node.
|
||||
|
||||
|
||||
|
||||
@@ -107,7 +103,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
|
||||
This count is the number of templates that the command will use
|
||||
to check for nodes matches. If the template in the template path does not
|
||||
match a node, the \ **sinv**\ will check additional templates up
|
||||
match a node, the \ **sinv**\ will check additional templates up
|
||||
to the template count.
|
||||
|
||||
For each node, it will compare the node against each template to see if
|
||||
@@ -127,9 +123,8 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
that is stored in template path. You can use this parameter instead of running
|
||||
the command yourself to build the template.
|
||||
|
||||
\ **Note:**\ If the template path file does not exist, and no seed node is
|
||||
supplied, the seed node automatically is one node in the
|
||||
noderange.
|
||||
\ **Note:**\ If no seed node is supplied, the first node in the noderange is automatically
|
||||
selected as a seed node.
|
||||
|
||||
|
||||
|
||||
@@ -147,9 +142,9 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
|
||||
This requires the check of node output against template to be an exact match.
|
||||
If this flag is not set, \ **sinv**\ checks to see if the return from the
|
||||
xdsh command to the nodes contain a match for each line in the input
|
||||
\ **xdsh**\ or \ **rinv**\ command to the nodes contain a match for each line in the input
|
||||
template (except for xdshcoll header and comments). If not in exactmatch mode,
|
||||
there can exist more lines in the xdsh return from the nodes.
|
||||
there can be more lines in the \ **xdsh**\ or \ **rinv**\ return from the nodes.
|
||||
|
||||
For example, if running a "rpm -qa | grep xCAT" command, without exactmatch
|
||||
set, if the node contains more xCAT rpms that listed in the template,
|
||||
@@ -185,21 +180,21 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
|
||||
\ **-c | -**\ **-command**\
|
||||
|
||||
The xdsh or rinv command that will be run. The command should be enclosed in
|
||||
double quotes to insure correct shell interpretation. This parameter must only contain, the node range or the image path (Linux) or spot name for AIX. It cannot be used to set additional input flags to xdsh or rinv (for example -s,-T,-e). See examples below.
|
||||
The \ **xdsh**\ or \ **rinv**\ command that will be run. The command should be enclosed in
|
||||
double quotes to insure correct shell interpretation. This parameter must only contain, the node range or the image path (Linux) or spot name for AIX. It cannot be used to set additional input flags to \ **xdsh**\ or \ **rinv**\ (for example \ **-s**\ ,\ **-T**\ ,\ **-e**\ ). See examples below.
|
||||
|
||||
\ **Note:**\ do not add the | xdshcoll to the command,
|
||||
it is automatically added by sinv. sinv also automatically sets the -v flag for xdsh.
|
||||
\ **Note:**\ do not add the \ **| xdshcoll**\ to the command,
|
||||
it is automatically added by \ **sinv**\ . \ **sinv**\ also automatically sets the \ **-v**\ flag for \ **xdsh**\ .
|
||||
|
||||
|
||||
|
||||
\ **-f | -**\ **-file**\
|
||||
|
||||
The file containing the xdsh or rinv command that will be run.
|
||||
The file containing the \ **xdsh**\ or \ **rinv**\ command that will be run.
|
||||
This should be the fully qualified name of the file.
|
||||
|
||||
\ **Note:**\ do not add the | xdshcoll to the command in the file,
|
||||
it is automatically added by sinv.
|
||||
\ **Note:**\ do not add the \ **| xdshcoll**\ to the command in the file,
|
||||
it is automatically added by \ **sinv**\ .
|
||||
|
||||
|
||||
|
||||
@@ -208,11 +203,11 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
This flag indicates that generated templates should be removed at the
|
||||
at the end of the \ **sinv**\ command execution.
|
||||
|
||||
If the flag is input, then all templates that are generated by the \ **sinv**\
|
||||
If the flag is specified, then all templates that are generated by the \ **sinv**\
|
||||
command, will be removed. If the first template is created by the admin,
|
||||
it will not be removed.
|
||||
|
||||
If the flag is not input, no
|
||||
If the flag is not specified, no
|
||||
templates will be removed. It is up to the admin to cleanup templates.
|
||||
|
||||
|
||||
@@ -242,7 +237,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
|
||||
|
||||
|
||||
1. To setup sinv.template (name optional) for input to the \ **sinv**\ command , enter:
|
||||
1. To setup sinv.template (name optional) for input to the \ **sinv**\ command, enter:
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
@@ -250,7 +245,7 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
xdsh node1,node2 "rpm -qa | grep ssh " | xdshcoll > /tmp/sinv.template
|
||||
|
||||
|
||||
Note: when setting up the template the output of xdsh must be piped to xdshcoll, sinv processing depends on it.
|
||||
Note: when setting up the template the output of \ **xdsh**\ must be piped to \ **xdshcoll**\ , \ **sinv**\ processing depends on it.
|
||||
|
||||
|
||||
|
||||
@@ -262,12 +257,12 @@ Command Protocol can be used. See man \ **xdsh**\ for more details.
|
||||
rinv node1-node2 serial | xdshcoll > /tmp/rinv.template
|
||||
|
||||
|
||||
Note: when setting up the template the output of rinv must be piped to xdshcoll, sinv processing depends on it.
|
||||
Note: when setting up the template the output of \ **rinv**\ must be piped to \ **xdshcoll**\ , \ **sinv**\ processing depends on it.
|
||||
|
||||
|
||||
|
||||
3. To execute \ **sinv**\ using the sinv.template generated above
|
||||
on the nodegroup, \ **testnodes**\ ,possibly generating up to two
|
||||
on the nodegroup, \ *testnodes*\ ,possibly generating up to two
|
||||
new templates, and removing all generated templates in the end, and writing
|
||||
output report to /tmp/sinv.output, enter:
|
||||
|
||||
@@ -277,12 +272,12 @@ output report to /tmp/sinv.output, enter:
|
||||
sinv -c "xdsh testnodes rpm -qa | grep ssh" -p /tmp/sinv.template -t 2 -r -o /tmp/sinv.output
|
||||
|
||||
|
||||
Note: do not add the pipe to xdshcoll on the -c flag, it is automatically added by the sinv routine.
|
||||
Note: do not add the pipe to \ **xdshcoll**\ on the \ **-c**\ flag, it is automatically added by the \ **sinv**\ .
|
||||
|
||||
|
||||
|
||||
4. To execute \ **sinv**\ on noderange, node1-node4, using the seed node, node8,
|
||||
to generate the first template, using the xdsh command (-c),
|
||||
4. To execute \ **sinv**\ on noderange, \ *node1-node4*\ , using the seed node, \ *node8*\ ,
|
||||
to generate the first template, using the \ **xdsh**\ command (\ **-c**\ ),
|
||||
possibly generating up to two additional
|
||||
templates and not removing any templates at the end, enter:
|
||||
|
||||
@@ -294,8 +289,8 @@ templates and not removing any templates at the end, enter:
|
||||
|
||||
|
||||
|
||||
5. To execute \ **sinv**\ on noderange, node1-node4, using the seed node, node8,
|
||||
to generate the first template, using the rinv command (-c),
|
||||
5. To execute \ **sinv**\ on noderange, \ *node1-node4*\ , using the seed node, \ *node8*\ ,
|
||||
to generate the first template, using the \ **rinv**\ command (\ **-c**\ ),
|
||||
possibly generating up to two additional
|
||||
templates and removing any generated templates at the end, enter:
|
||||
|
||||
@@ -307,8 +302,8 @@ templates and removing any generated templates at the end, enter:
|
||||
|
||||
|
||||
|
||||
6. To execute \ **sinv**\ on noderange, node1-node4, using node1 as
|
||||
the seed node, to generate the sinv.template from the xdsh command (-c),
|
||||
6. To execute \ **sinv**\ on noderange, \ *node1-node4*\ , using \ *node1*\ as
|
||||
the seed node, to generate the sinv.template from the \ **xdsh**\ command (\ **-c**\ ),
|
||||
using the exact match option, generating no additional templates, enter:
|
||||
|
||||
|
||||
@@ -322,14 +317,14 @@ using the exact match option, generating no additional templates, enter:
|
||||
|
||||
|
||||
|
||||
7. To execute \ **sinv**\ on the Linux osimage defined for cn1. First build a template from the /etc/hosts on the node. Then run sinv to compare.
|
||||
7. To execute \ **sinv**\ on the Linux osimage defined for cn1. First build a template from the /etc/hosts on the node. Then run \ **sinv**\ to compare.
|
||||
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
xdsh cn1 "cat /etc/hosts" | xdshcoll > /tmp/sinv2/template"
|
||||
|
||||
sinv -c "xdsh -i /install/netboot/rhels6/ppc64/test_ramdisk_statelite/rootimg cat /etc/hosts" -e -t1 -p /tmp/sinv.template -o /tmp/sinv.output
|
||||
sinv -c "xdsh -i /install/netboot/rhels6/ppc64/test_ramdisk_statelite/rootimg cat /etc/hosts" -e -t 1 -p /tmp/sinv.template -o /tmp/sinv.output
|
||||
|
||||
|
||||
|
||||
|
@@ -59,6 +59,12 @@ Name
|
||||
conveniently specify a list of nodes. The result is that the command will
|
||||
be applied to a range of nodes, often in parallel.
|
||||
|
||||
If you invoke xCAT \ **noderange**\ from a shell you may need to quote the
|
||||
\ **noderange**\ if the shell would otherwise treat the punctuation marks in
|
||||
the \ **noderange**\ as control operators. The affected punctuation marks may
|
||||
include Asterisk (\`*'), Left Square Bracket (\`[') , Right Square Bracket
|
||||
(\`]'), Circumflex Accent (\`^'), and Overline (\`~').
|
||||
|
||||
\ **noderange**\ is a comma-separated list. Each token (text between commas)
|
||||
in the list can be any of the forms listed below:
|
||||
|
||||
@@ -357,6 +363,14 @@ Example of \ **xCAT Node Name Format**\ node/group names:
|
||||
|
||||
|
||||
|
||||
************
|
||||
\ **Bugs**\
|
||||
************
|
||||
|
||||
The special characters used by xCAT \ **noderange**\ are also special characters
|
||||
to many shell programs. In particular, the characters \`*', \`[', \`]', \`^',
|
||||
and \`~' may have to be escaped from the shell.
|
||||
|
||||
****************
|
||||
\ **SEE ALSO**\
|
||||
****************
|
||||
|
@@ -62,7 +62,7 @@ bootparams Attributes:
|
||||
|
||||
\ **addkcmdline**\
|
||||
|
||||
User specified one or more parameters to be passed to the kernel. For the kernel options need to be persistent after installation, specify them with prefix "R::"
|
||||
User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" ")
|
||||
|
||||
|
||||
|
||||
|
@@ -56,7 +56,7 @@ linuximage Attributes:
|
||||
|
||||
\ **addkcmdline**\
|
||||
|
||||
User specified arguments to be passed to the kernel. The user arguments are appended to xCAT.s default kernel arguments. For the kernel options need to be persistent after installation, specify them with prefix "R::". This attribute is ignored if linuximage.boottarget is set.
|
||||
User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" "). This attribute is ignored if linuximage.boottarget is set.
|
||||
|
||||
|
||||
|
||||
|
@@ -110,8 +110,9 @@ site Attributes:
|
||||
dhcplease: The lease time for the dhcp client. The default value is 43200.
|
||||
|
||||
disjointdhcps: If set to '1', the .leases file on a service node only contains
|
||||
the nodes it manages. The default value is '0'.
|
||||
'0' value means include all the nodes in the subnet.
|
||||
the nodes it manages. And when 'sharedtftp' is disabled, nodeset handles
|
||||
boot loader configuration on a service node only for the nodes it manages.
|
||||
The default value is '0'. It means include all the nodes in the subnet.
|
||||
|
||||
pruneservices: Whether to enable service pruning when noderm is run (i.e.
|
||||
removing DHCP entries when noderm is executed)
|
||||
|
@@ -19,7 +19,7 @@ Name
|
||||
****************
|
||||
|
||||
|
||||
\ **nodeset**\ \ *noderange*\ [\ **boot**\ | \ **stat**\ | \ **offline**\ | \ **runcmd=bmcsetup**\ | \ **osimage**\ [=\ *imagename*\ ] | \ **shell**\ | \ **shutdown**\ ]
|
||||
\ **nodeset**\ \ *noderange*\ [\ **boot**\ | \ **stat**\ [\ **-a**\ ]| \ **offline**\ | \ **runcmd=bmcsetup**\ | \ **osimage**\ [=\ *imagename*\ ] | \ **shell**\ | \ **shutdown**\ ] [\ **-V | -**\ **-verbose**\ ]
|
||||
|
||||
\ **nodeset**\ \ *noderange*\ \ **osimage**\ [=\ *imagename*\ ] [\ **-**\ **-noupdateinitrd**\ ] [\ **-**\ **-ignorekernelchk**\ ]
|
||||
|
||||
@@ -40,10 +40,16 @@ changing the network boot files. Each xCAT node always boots from the
|
||||
network and downloads a boot file with instructions on what action to
|
||||
take next.
|
||||
|
||||
\ **nodeset**\ will manipulate the boot configuration files of yaboot and pxelinux.0.
|
||||
\ **nodeset**\ will manipulate the boot configuration files of xnba, grub2, petitboot, yaboot and pxelinux.0.
|
||||
|
||||
Assume that /tftpboot is the root for tftpd (set in site(5)|site.5).
|
||||
|
||||
\ **nodeset**\ for petitboot makes changes to /tftpboot/petitboot/{node name}
|
||||
|
||||
\ **nodeset**\ for xnba makes changes to /tftpboot/xcat/xnba/nodes/{node name}
|
||||
|
||||
\ **nodeset**\ for grub2 makes changes to /tftpboot/boot/grub2/{node name}
|
||||
|
||||
\ **nodeset**\ for pxe makes changes to /tftpboot/pxelinux.cfg/{node hex ip}
|
||||
|
||||
\ **nodeset**\ for yaboot makes changes to /tftpboot/etc/{node hex ip}
|
||||
@@ -53,6 +59,8 @@ Assume that /tftpboot is the root for tftpd (set in site(5)|site.5).
|
||||
\ **nodeset**\ is called by \ **rinstall**\ and \ **winstall**\ and is also called by the
|
||||
installation process remotely to set the boot state back to "boot".
|
||||
|
||||
In a hierarchical cluster managed by service nodes, \ **nodeset**\ command is used to make sure compute node states are consistent on service and management nodes. When errors are reported, run the command with verbose mode. And the command will display additional service node information, which might be useful in identifying the problem.
|
||||
|
||||
A user can supply their own scripts to be run on the mn or on the service node (if a hierarchical cluster) for a node when the nodeset command is run. Such scripts are called \ **prescripts**\ . They should be copied to /install/prescripts directory. A table called \ *prescripts*\ is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the nodeset command are stored in the 'begin' column of \ *prescripts*\ table. The scripts to be run at the end of the nodeset command are stored in the 'end' column of \ *prescripts*\ table. You can run 'tabdump -d prescripts' command for details. The following two environment variables will be passed to each script: NODES contains all the names of the nodes that need to run the script for and ACTION contains the current nodeset action. If \ *#xCAT setting:MAX_INSTANCE=number*\ is specified in the script, the script will get invoked for each node in parallel, but no more than \ *number*\ of instances will be invoked at a time. If it is not specified, the script will be invoked once for all the nodes.
|
||||
|
||||
|
||||
@@ -101,7 +109,7 @@ A user can supply their own scripts to be run on the mn or on the service node (
|
||||
|
||||
\ **stat**\
|
||||
|
||||
Display the current boot loader config file description for the nodes requested
|
||||
Display the current boot loader config file description for the nodes requested. When \ **disjointdhcps**\ is set, using \ **-a**\ to display them on all available service nodes.
|
||||
|
||||
|
||||
|
||||
@@ -125,6 +133,12 @@ A user can supply their own scripts to be run on the mn or on the service node (
|
||||
|
||||
|
||||
|
||||
\ **-V | -**\ **-verbose**\
|
||||
|
||||
Verbose mode.
|
||||
|
||||
|
||||
|
||||
\ **-h | -**\ **-help**\
|
||||
|
||||
Print help.
|
||||
|
@@ -6,5 +6,5 @@ If at a later date you want to update xCAT, first, update the software repositor
|
||||
yum clean metadata # or, yum clean all
|
||||
yum update '*xCAT*'
|
||||
|
||||
|
||||
|
||||
# To check and update the packages provided by xcat-dep:
|
||||
yum update '*xcat*'
|
||||
|
@@ -6,4 +6,5 @@ If at a later date you want to update xCAT, first, update the software repositor
|
||||
zypper refresh
|
||||
zypper update "*xCAT*"
|
||||
|
||||
|
||||
# To check and update the packages provided by xcat-dep:
|
||||
zypper update "*xcat*"
|
||||
|
@@ -33,7 +33,7 @@ if ($inet6support) {
|
||||
if ($^O =~ /^linux/i) {
|
||||
|
||||
# Is IPv6 enabled on the MN or xcat client node at all?
|
||||
my $ipv6enabled = `ip addr 2> /dev/null | grep inet6`;
|
||||
my $ipv6enabled = `ip -6 -o addr 2> /dev/null`;
|
||||
if (!$ipv6enabled) {
|
||||
$inet6support = 0;
|
||||
}
|
||||
@@ -1129,6 +1129,13 @@ sub handle_response {
|
||||
return;
|
||||
}
|
||||
|
||||
my $msgsource;
|
||||
if ($ENV{'XCATSHOWSVR'}) {
|
||||
unless ($rsp->{NoSvrPrefix}) { # some plugins could disable the prefix forcely by seting the flag in response.
|
||||
$msgsource = $rsp->{xcatdsource}->[0] if ($rsp->{xcatdsource});
|
||||
}
|
||||
}
|
||||
|
||||
#print "in handle_response\n";
|
||||
# Handle errors
|
||||
if (defined($rsp->{errorcode})) {
|
||||
@@ -1141,24 +1148,23 @@ sub handle_response {
|
||||
$xCAT::Client::EXITCODE |= $rsp->{errorcode};
|
||||
} # assume it is a non-reference scalar
|
||||
}
|
||||
|
||||
if ($rsp->{error}) {
|
||||
|
||||
#print "printing error\n";
|
||||
if (ref($rsp->{error}) eq 'ARRAY') {
|
||||
foreach my $text (@{ $rsp->{error} }) {
|
||||
if ($rsp->{NoErrorPrefix}) {
|
||||
print STDERR "$text\n";
|
||||
} else {
|
||||
print STDERR "Error: $text\n";
|
||||
}
|
||||
my $desc = "$text";
|
||||
$desc = "[$msgsource]: $desc" if ($msgsource && $desc);
|
||||
$desc = "Error: $desc" unless ($rsp->{NoErrorPrefix});
|
||||
print STDERR "$desc\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($rsp->{NoErrorPrefix}) {
|
||||
print STDERR ($rsp->{error} . "\n");
|
||||
} else {
|
||||
print STDERR ("Error: " . $rsp->{error} . "\n");
|
||||
}
|
||||
my $desc = $rsp->{error};
|
||||
$desc = "[$msgsource]: $desc" if ($msgsource && $desc);
|
||||
$desc = "Error: $desc" unless ($rsp->{NoErrorPrefix});
|
||||
print STDERR "$desc\n";
|
||||
}
|
||||
}
|
||||
if ($rsp->{warning}) {
|
||||
@@ -1166,19 +1172,17 @@ sub handle_response {
|
||||
#print "printing warning\n";
|
||||
if (ref($rsp->{warning}) eq 'ARRAY') {
|
||||
foreach my $text (@{ $rsp->{warning} }) {
|
||||
if ($rsp->{NoWarnPrefix}) {
|
||||
print STDERR "$text\n";
|
||||
} else {
|
||||
print STDERR "Warning: $text\n";
|
||||
}
|
||||
my $desc = "$text";
|
||||
$desc = "[$msgsource]: $desc" if ($msgsource && $desc);
|
||||
$desc = "Warning: $desc" unless ($rsp->{NoWarnPrefix});
|
||||
print STDERR "$desc\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
if ($rsp->{NoWarnPrefix}) {
|
||||
print STDERR ($rsp->{warning} . "\n");
|
||||
} else {
|
||||
print STDERR ("Warning: " . $rsp->{warning} . "\n");
|
||||
}
|
||||
my $desc = $rsp->{warning};
|
||||
$desc = "[$msgsource]: $desc" if ($msgsource && $desc);
|
||||
$desc = "Warning: $desc" unless ($rsp->{NoWarnPrefix});
|
||||
print STDERR "$desc\n";
|
||||
}
|
||||
}
|
||||
if ($rsp->{info}) {
|
||||
@@ -1186,11 +1190,15 @@ sub handle_response {
|
||||
#print "printing info\n";
|
||||
if (ref($rsp->{info}) eq 'ARRAY') {
|
||||
foreach my $text (@{ $rsp->{info} }) {
|
||||
print "$text\n";
|
||||
my $desc = "$text";
|
||||
$desc = "[$msgsource]: $desc" if ($msgsource && $desc);
|
||||
print "$desc\n";
|
||||
}
|
||||
}
|
||||
else {
|
||||
print($rsp->{info} . "\n");
|
||||
my $desc = $rsp->{info};
|
||||
$desc = "[$msgsource]: $desc" if ($msgsource && $desc);
|
||||
print "$desc\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1224,6 +1232,11 @@ sub handle_response {
|
||||
} else {
|
||||
$desc = $node->{name};
|
||||
}
|
||||
if ($desc) {
|
||||
$desc = "$desc: [$msgsource]" if ($msgsource);
|
||||
} else {
|
||||
$desc = "[$msgsource]" if ($msgsource);
|
||||
}
|
||||
if ($node->{errorcode}) {
|
||||
if (ref($node->{errorcode}) eq 'ARRAY') {
|
||||
foreach my $ecode (@{ $node->{errorcode} }) {
|
||||
@@ -1274,7 +1287,7 @@ sub handle_response {
|
||||
if ($node->{base64_data}) {
|
||||
$desc = $desc . ": " . decode_base64($node->{base64_data}->[0]);
|
||||
}
|
||||
if ($desc) {
|
||||
if ($desc && $desc ne "[$msgsource]") {
|
||||
if ($errflg == 1) {
|
||||
print STDERR ("$desc\n");
|
||||
} else {
|
||||
@@ -1306,7 +1319,10 @@ sub handle_response {
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($desc) { print "$desc\n"; }
|
||||
if ($desc) {
|
||||
$desc = "[$msgsource]: $desc" if ($msgsource);
|
||||
print "$desc\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
} # end of handle_response
|
||||
|
@@ -780,6 +780,7 @@ sub setobjdefs
|
||||
|
||||
$montable->commit;
|
||||
$monsettable->commit;
|
||||
$objhash{$objname}{updated} = 1;
|
||||
next;
|
||||
} #if ($type eq 'monitoring')
|
||||
|
||||
@@ -870,6 +871,9 @@ sub setobjdefs
|
||||
}
|
||||
|
||||
}
|
||||
unless ($ret) {
|
||||
$objhash{$objname}{updated} = 1;
|
||||
}
|
||||
|
||||
$thistable->commit;
|
||||
|
||||
|
@@ -51,7 +51,9 @@ $::STATUS_BOOTED = "booted";
|
||||
$::STATUS_POWERING_ON = "powering-on";
|
||||
$::STATUS_POWERING_OFF = "powering-off";
|
||||
$::STATUS_DISCOVERING = "discovering";
|
||||
$::STATUS_DISCOVERED = "discovered";
|
||||
$::STATUS_CONFIGURING = "configuring";
|
||||
$::STATUS_CONFIGURED = "configured";
|
||||
$::STATUS_STANDING_BY = "standingby";
|
||||
$::STATUS_SHELL = "shell";
|
||||
$::STATUS_DEFINED = "defined";
|
||||
@@ -69,7 +71,9 @@ $::STATUS_BMCREADY = "bmcready";
|
||||
$::STATUS_POWERING_ON => 1,
|
||||
$::STATUS_POWERING_OFF => 1,
|
||||
$::STATUS_DISCOVERING => 1,
|
||||
$::STATUS_DISCOVERED => 1,
|
||||
$::STATUS_CONFIGURING => 1,
|
||||
$::STATUS_CONFIGURED => 1,
|
||||
$::STATUS_STANDING_BY => 1,
|
||||
$::STATUS_SHELL => 1,
|
||||
$::STATUS_DEFINED => 1,
|
||||
|
@@ -147,6 +147,12 @@ OID, and have the switch table port value match exactly the format suggested by
|
||||
return 0;
|
||||
}
|
||||
|
||||
#HP calls their PortChannel interfaces "trunks"
|
||||
#designated as Trk1, etc. don't match those
|
||||
if ($namepersnmp =~ /Trk/) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
#The blacklist approach has been exhausted. For now, assuming that means good,
|
||||
#if something ambiguous happens, the whitelist would have been:
|
||||
#'Port','Port #','/' (if namepercfg has no /, then / would be...),
|
||||
@@ -356,6 +362,8 @@ sub dump_mac_info {
|
||||
}
|
||||
}
|
||||
@{ $ret{$switch}->{$snmpportname}->{MACaddress} } = @{ $self->{macinfo}->{$switch}->{$snmpportname} };
|
||||
@{ $ret{$switch}->{$snmpportname}->{Vlanid} } = @{ $self->{vlaninfo}->{$switch}->{$snmpportname} };
|
||||
@{ $ret{$switch}->{$snmpportname}->{Mtu} } = @{ $self->{mtuinfo}->{$switch}->{$snmpportname} };
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -720,6 +728,12 @@ sub refresh_switch {
|
||||
return;
|
||||
}
|
||||
|
||||
# get mtu
|
||||
my $iftomtumap = walkoid($session, '.1.3.6.1.2.1.2.2.1.4', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback});
|
||||
unless (defined($iftomtumap)) {
|
||||
xCAT::MsgUtils->message("I", "MTU information is not availabe for this switch $switch");
|
||||
}
|
||||
|
||||
#Above is valid without community string indexing, on cisco, we need it on the next one and onward
|
||||
my $iftovlanmap = walkoid($session, '.1.3.6.1.4.1.9.9.68.1.2.2.1.2', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); #use cisco vlan membership mib to ascertain vlan
|
||||
my $trunktovlanmap = walkoid($session, '.1.3.6.1.4.1.9.9.46.1.6.1.1.5', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); #for trunk ports, we are interested in the native vlan, so we need cisco vtp mib too
|
||||
@@ -783,24 +797,38 @@ sub refresh_switch {
|
||||
xCAT::MsgUtils->message("S", "Error communicating with " . $session->{DestHost} . ": Unable to get MAC entries via either BRIDGE or Q-BRIDE MIB");
|
||||
return;
|
||||
}
|
||||
|
||||
if (defined($self->{collect_mac_info})) {
|
||||
my %index_to_mac = ();
|
||||
my %index_to_vlan = ();
|
||||
foreach (keys %$mactoindexmap) {
|
||||
my $index = $mactoindexmap->{$_};
|
||||
my @tmp = split /\./, $_;
|
||||
my $vlan = @tmp[0];
|
||||
my @mac = @tmp[ -6 .. -1 ];
|
||||
my $macstring = sprintf("%02x:%02x:%02x:%02x:%02x:%02x", @mac);
|
||||
push @{ $index_to_mac{$index} }, $macstring;
|
||||
push @{ $index_to_vlan{$index} }, $vlan;
|
||||
}
|
||||
foreach my $boid (keys %$bridgetoifmap) {
|
||||
my $port_index = $boid;
|
||||
my $port_name = $namemap->{ $bridgetoifmap->{$port_index} };
|
||||
my $mtu = $iftomtumap->{ $bridgetoifmap->{$port_index} };
|
||||
if (defined($index_to_mac{$port_index})) {
|
||||
push @{ $self->{macinfo}->{$switch}->{$port_name} }, @{ $index_to_mac{$port_index} };
|
||||
}
|
||||
else {
|
||||
$self->{macinfo}->{$switch}->{$port_name}->[0] = '';
|
||||
}
|
||||
|
||||
if (defined($index_to_vlan{$port_index})) {
|
||||
push @{ $self->{vlaninfo}->{$switch}->{$port_name} }, @{ $index_to_vlan{$port_index} };
|
||||
}
|
||||
else {
|
||||
$self->{vlaninfo}->{$switch}->{$port_name}->[0] = '';
|
||||
}
|
||||
push @{ $self->{mtuinfo}->{$switch}->{$port_name} } , $mtu;
|
||||
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
@@ -736,7 +736,7 @@ sub get_nic_ip
|
||||
my %iphash;
|
||||
my $mode = "MULTICAST";
|
||||
my $payingattention = 0;
|
||||
my $interface;
|
||||
my $interface = "";
|
||||
my $keepcurrentiface;
|
||||
|
||||
|
||||
@@ -793,6 +793,7 @@ sub get_nic_ip
|
||||
delete $iphash{$interface};
|
||||
}
|
||||
$keepcurrentiface = 0;
|
||||
$interface = "";
|
||||
if (!($line =~ /LOOPBACK/) and
|
||||
$line =~ /UP( |,|>)/ and
|
||||
$line =~ /$mode/) {
|
||||
@@ -1644,10 +1645,14 @@ sub getNodeIPaddress
|
||||
{
|
||||
require xCAT::Table;
|
||||
my $nodetocheck = shift;
|
||||
my $port = shift;
|
||||
my $nodeip;
|
||||
if ($nodetocheck eq 'xCAT::NetworkUtils') { #was called with -> syntax
|
||||
$nodetocheck = shift;
|
||||
}
|
||||
|
||||
$nodeip = xCAT::NetworkUtils->getipaddr($nodetocheck);
|
||||
# Quick return if pass in an IP
|
||||
return $nodetocheck if (xCAT::NetworkUtils->isIpaddr($nodetocheck));
|
||||
|
||||
my $nodeip = xCAT::NetworkUtils->getipaddr($nodetocheck);
|
||||
if (!$nodeip)
|
||||
{
|
||||
my $hoststab = xCAT::Table->new('hosts');
|
||||
@@ -1665,6 +1670,51 @@ sub getNodeIPaddress
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head3 checkNodeIPaddress
|
||||
Arguments:
|
||||
Node name only one at a time
|
||||
Returns: a hash object contains IP or Error
|
||||
Globals:
|
||||
none
|
||||
Example: my $ipresult = xCAT::NetworkUtils::checkNodeIPaddress($nodetocheck);
|
||||
|
||||
=cut
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
sub checkNodeIPaddress
|
||||
{
|
||||
require xCAT::Table;
|
||||
my $nodetocheck = shift;
|
||||
if ($nodetocheck eq 'xCAT::NetworkUtils') { #was called with -> syntax
|
||||
$nodetocheck = shift;
|
||||
}
|
||||
my $ret;
|
||||
|
||||
my $nodeip;
|
||||
my $hoststab = xCAT::Table->new('hosts');
|
||||
my $ent = $hoststab->getNodeAttribs($nodetocheck, ['ip']);
|
||||
if ($ent->{'ip'}) {
|
||||
$nodeip = $ent->{'ip'};
|
||||
}
|
||||
|
||||
# Get the IP from DNS
|
||||
my $dnsip = xCAT::NetworkUtils->getipaddr($nodetocheck);
|
||||
if (!$dnsip)
|
||||
{
|
||||
$ret->{'error'} = "The $nodetocheck can not be resolved.";
|
||||
$ret->{'ip'} = $nodeip if ($nodeip);
|
||||
} elsif (!$nodeip) {
|
||||
$ret->{'ip'} = $dnsip;
|
||||
} else {
|
||||
$ret->{'ip'} = $nodeip;
|
||||
$ret->{'error'} = "Defined IP address of $nodetocheck is inconsistent with DNS." if ($nodeip ne $dnsip);
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
|
@@ -217,14 +217,16 @@ sub add_ppc {
|
||||
###############################
|
||||
# Update hosts table
|
||||
###############################
|
||||
if ($otherinterfaces) {
|
||||
$db{hosts}->setNodeAttribs($name,
|
||||
{ otherinterfaces => $ips });
|
||||
} else {
|
||||
$db{hosts}->setNodeAttribs($name,
|
||||
{ ip => $ips });
|
||||
if ($ips) {
|
||||
if ($otherinterfaces) {
|
||||
$db{hosts}->setNodeAttribs($name,
|
||||
{ otherinterfaces => $ips });
|
||||
} else {
|
||||
$db{hosts}->setNodeAttribs($name,
|
||||
{ ip => $ips });
|
||||
}
|
||||
$db{hosts}{commit} = 1;
|
||||
}
|
||||
$db{hosts}{commit} = 1;
|
||||
|
||||
###############################
|
||||
# Update mac table
|
||||
|
@@ -331,8 +331,8 @@ passed as argument rather than by table value',
|
||||
'kernel' => 'The kernel that network boot actions should currently acquire and use. Note this could be a chained boot loader such as memdisk or a non-linux boot loader',
|
||||
'initrd' => 'The initial ramdisk image that network boot actions should use (could be a DOS floppy or hard drive image if using memdisk as kernel)',
|
||||
'kcmdline' => 'Arguments to be passed to the kernel',
|
||||
'addkcmdline' => 'User specified one or more parameters to be passed to the kernel. For the kernel options need to be persistent after installation, specify them with prefix "R::"',
|
||||
'dhcpstatements' => 'xCAT manipulated custom dhcp statements (not intended for user manipulation)',
|
||||
'addkcmdline' => 'User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" ")',
|
||||
'dhcpstatements' => 'xCAT manipulated custom dhcp statements (not intended for user manipulation)',
|
||||
'adddhcpstatements' => 'Custom dhcp statements for administrator use (not implemneted yet)',
|
||||
comments => 'Any user-written notes.',
|
||||
disable => "Set to 'yes' or '1' to comment out this row.",
|
||||
@@ -799,7 +799,7 @@ passed as argument rather than by table value',
|
||||
imagename => 'The name of this xCAT OS image definition.',
|
||||
template => 'The fully qualified name of the template file that will be used to create the OS installer configuration file for stateful installations (e.g. kickstart for RedHat, autoyast for SLES).',
|
||||
boottarget => 'The name of the boottarget definition. When this attribute is set, xCAT will use the kernel, initrd and kernel params defined in the boottarget definition instead of the default.',
|
||||
addkcmdline => 'User specified arguments to be passed to the kernel. The user arguments are appended to xCAT.s default kernel arguments. For the kernel options need to be persistent after installation, specify them with prefix "R::". This attribute is ignored if linuximage.boottarget is set.',
|
||||
addkcmdline => 'User specified kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" "). This attribute is ignored if linuximage.boottarget is set.',
|
||||
pkglist => 'The fully qualified name of the file that stores the distro packages list that will be included in the image. Make sure that if the pkgs in the pkglist have dependency pkgs, the dependency pkgs should be found in one of the pkgdir',
|
||||
pkgdir => 'The name of the directory where the distro packages are stored. It could be set to multiple paths. The multiple paths must be separated by ",". The first path in the value of osimage.pkgdir must be the OS base pkg dir path, such as pkgdir=/install/rhels6.2/x86_64,/install/updates . In the os base pkg path, there are default repository data. And in the other pkg path(s), the users should make sure there are repository data. If not, use "createrepo" command to create them. For ubuntu, multiple mirrors can be specified in the pkgdir attribute, the mirrors must be prefixed by the protocol(http/ssh) and delimited with "," between each other.',
|
||||
otherpkglist => 'The fully qualified name of the file that stores non-distro package lists that will be included in the image. It could be set to multiple paths. The multiple paths must be separated by ",".',
|
||||
@@ -1029,8 +1029,9 @@ passed as argument rather than by table value',
|
||||
" dhcpsetup: If set to 'n', it will skip the dhcp setup process in the nodeset cmd.\n\n" .
|
||||
" dhcplease: The lease time for the dhcp client. The default value is 43200.\n\n" .
|
||||
" disjointdhcps: If set to '1', the .leases file on a service node only contains\n" .
|
||||
" the nodes it manages. The default value is '0'.\n" .
|
||||
" '0' value means include all the nodes in the subnet.\n\n" .
|
||||
" the nodes it manages. And when 'sharedtftp' is disabled, nodeset handles\n" .
|
||||
" boot loader configuration on a service node only for the nodes it manages.\n" .
|
||||
" The default value is '0'. It means include all the nodes in the subnet.\n\n" .
|
||||
" pruneservices: Whether to enable service pruning when noderm is run (i.e.\n" .
|
||||
" removing DHCP entries when noderm is executed)\n\n" .
|
||||
" managedaddressmode: The mode of networking configuration during node provision.\n" .
|
||||
@@ -1590,7 +1591,7 @@ zvmivp => {
|
||||
The xCAT object definition commands support to use nicextraparams.<nicname> as the sub attributes.',
|
||||
nicdevices => 'Comma-separated list of NIC device per NIC, multiple ethernet devices can be bonded as bond device, these ethernet devices are separated by | . <nic1>!<dev1>|<dev3>,<nic2>!<dev2>, e.g. bond0!eth0|eth2,br0!bond0. The xCAT object definition commands support to use nicdevices.<nicname> as the sub attributes.',
|
||||
nicsadapter => 'Comma-separated list of extra parameters that will be used for each NIC configuration.
|
||||
<nic1>!<param1=value1 param2=value2>|<param3=value3>,<nic2>!<param4=value4 param5=value5>|<param6=value6>, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes.',
|
||||
<nic1>!<param1=value1 param2=value2>,<nic2>!<param4=value4 param5=value5>, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face',
|
||||
comments => 'Any user-written notes.',
|
||||
disable => "Set to 'yes' or '1' to comment out this row.",
|
||||
},
|
||||
|
@@ -2,6 +2,7 @@ package xCAT::Scope;
|
||||
|
||||
use xCAT::Utils;
|
||||
use xCAT::Table;
|
||||
use xCAT::TableUtils;
|
||||
use xCAT::ServiceNodeUtils qw(getSNList);
|
||||
|
||||
|
||||
@@ -125,16 +126,17 @@ sub get_parallel_scope {
|
||||
=head3 get_broadcast_scope_with_parallel
|
||||
|
||||
Convert a request object to an array of multiple requests according to the
|
||||
splitted node range.
|
||||
splitted node range. Also it replicates the requests to all required service
|
||||
nodes or management node.
|
||||
|
||||
Arguments:
|
||||
Reference of request
|
||||
Callback: TODO, Optional, the Callback will be used to filter the nodes
|
||||
SN list: Array of target service nodes
|
||||
Returns: An array of requests
|
||||
Error:
|
||||
none
|
||||
Example:
|
||||
my $reqs = xCAT::Scope->get_broadcast_scope($request);
|
||||
my $reqs = xCAT::Scope->get_broadcast_scope_with_parallel($request, \@snlist);
|
||||
=cut
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
@@ -145,25 +147,118 @@ sub get_broadcast_scope_with_parallel {
|
||||
}
|
||||
#Exit if the packet has been preprocessed in its history
|
||||
if ($req->{_xcatpreprocessed}->[0] == 1) { return [$req]; }
|
||||
$req->{_xcatpreprocessed}->[0] = 1;
|
||||
|
||||
#Handle the one for current management/service node
|
||||
my $reqs = get_parallel_scope($req);
|
||||
my @requests = @$reqs;
|
||||
my $snlist = shift;
|
||||
|
||||
#Broadcast the request to other management/service nodes
|
||||
foreach (xCAT::ServiceNodeUtils->getSNList()) {
|
||||
if (xCAT::NetworkUtils->thishostisnot($_)) {
|
||||
my $xcatdest = $_;
|
||||
my $reqcopy = {%$req};
|
||||
$reqcopy->{'_xcatdest'} = $_;
|
||||
$reqcopy->{_xcatpreprocessed}->[0] = 1;
|
||||
#Apply callback to filter the node range in future.
|
||||
$reqs = get_parallel_scope($reqcopy);
|
||||
foreach (@$reqs) {
|
||||
push @requests, {%$_};
|
||||
}
|
||||
my $reqs = get_parallel_scope($req);
|
||||
|
||||
my @requests = (); # The request array will be return.
|
||||
push @requests, @$reqs;
|
||||
|
||||
# when this method is called on service node, it is required to broadcast to MN too.
|
||||
# get site.master from DB in order to dispatch to MN ( MN will not be added in servicenode table)
|
||||
if ( xCAT::Utils->isServiceNode() ) {
|
||||
my @entries = xCAT::TableUtils->get_site_attribute("master");
|
||||
my $master = $entries[0];
|
||||
foreach (@$reqs) {
|
||||
my $reqcopy = {%$_};
|
||||
$reqcopy->{'_xcatdest'} = $master;
|
||||
push @requests, $reqcopy;
|
||||
}
|
||||
}
|
||||
|
||||
#Broadcast the request to all service nodes
|
||||
foreach (@$snlist) {
|
||||
my $xcatdest = $_;
|
||||
next unless (xCAT::NetworkUtils->thishostisnot($xcatdest));
|
||||
|
||||
foreach (@$reqs) {
|
||||
my $reqcopy = {%$_};
|
||||
$reqcopy->{'_xcatdest'} = $xcatdest;
|
||||
push @requests, $reqcopy;
|
||||
}
|
||||
}
|
||||
return \@requests;
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
=head3 get_broadcast_disjoint_scope_with_parallel
|
||||
|
||||
Convert a request object to an array of multiple requests according to the
|
||||
splitted node range. Also it replicates the requests to all required service
|
||||
nodes or management node, but the request to a service node will only contains
|
||||
the node range it manages.
|
||||
|
||||
Arguments:
|
||||
Reference of request
|
||||
SN hash: Hash of target service nodes => Managed CNs
|
||||
Special servers: Array of servers, those servers are required to handle whole noderange.
|
||||
Returns: An array of requests
|
||||
Error:
|
||||
none
|
||||
Example:
|
||||
my $reqs = xCAT::Scope->get_broadcast_disjoint_scope_with_parallel($request, \@snhash);
|
||||
=cut
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
sub get_broadcast_disjoint_scope_with_parallel {
|
||||
my $req = shift;
|
||||
if ($req =~ /xCAT::Scope/) {
|
||||
$req = shift;
|
||||
}
|
||||
#Exit if the packet has been preprocessed in its history
|
||||
if ($req->{_xcatpreprocessed}->[0] == 1) { return [$req]; }
|
||||
$req->{_xcatpreprocessed}->[0] = 1;
|
||||
|
||||
my $sn_hash = shift;
|
||||
my $extras = shift;
|
||||
|
||||
my @requests = (); # The request array will be return.
|
||||
my $reqs = get_parallel_scope($req);
|
||||
|
||||
my $handled4me = 0; # indicate myself is already handled.
|
||||
my %prehandledhash = ();# the servers which is already handled.
|
||||
foreach (@$extras) {
|
||||
my $xcatdest = $_;
|
||||
if (xCAT::NetworkUtils->thishostisnot($xcatdest)) {
|
||||
# TODO, To avoid sending request to a multi-home server many times.
|
||||
foreach (@$reqs) {
|
||||
my $reqcopy = {%$_};
|
||||
$reqcopy->{'_xcatdest'} = $xcatdest;
|
||||
push @requests, $reqcopy;
|
||||
}
|
||||
$prehandledhash{$xcatdest} = 1;
|
||||
} elsif ($handled4me == 0) {
|
||||
push @requests, @$reqs;
|
||||
$handled4me = 1;
|
||||
}
|
||||
}
|
||||
|
||||
#Broadcast the request to all available service nodes
|
||||
foreach (keys %$sn_hash) {
|
||||
my $xcatdest = $_;
|
||||
# to check if the SN already handled
|
||||
next if (exists($prehandledhash{$xcatdest}));
|
||||
|
||||
if (xCAT::NetworkUtils->thishostisnot($xcatdest)) {
|
||||
my $reqcopy = {%$req};
|
||||
$reqcopy->{'_xcatdest'} = $xcatdest;
|
||||
$reqcopy->{'node'} = $sn_hash->{$xcatdest};
|
||||
|
||||
$reqs = get_parallel_scope($reqcopy);
|
||||
push @requests, @$reqs;
|
||||
} elsif ($handled4me == 0) {
|
||||
my $reqcopy = {%$req};
|
||||
$reqcopy->{'node'} = $sn_hash->{$xcatdest};
|
||||
|
||||
$reqs = get_parallel_scope($reqcopy);
|
||||
push @requests, @$reqs;
|
||||
$handled4me = 1;
|
||||
}
|
||||
}
|
||||
|
||||
return \@requests;
|
||||
}
|
||||
|
||||
|
@@ -844,12 +844,28 @@ sub new
|
||||
}
|
||||
|
||||
my $oldumask = umask 0077;
|
||||
unless ($::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} }) { #= $self->{tabname};
|
||||
$::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} } =
|
||||
DBI->connect($self->{connstring}, $self->{dbuser}, $self->{dbpass}, { AutoCommit => $self->{realautocommit} });
|
||||
my $retry = 0;
|
||||
while (!$::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} }) {
|
||||
eval {
|
||||
local $SIG{__WARN__} = sub {
|
||||
my $message = shift;
|
||||
if ($retry == 3 && $message) {
|
||||
xCAT::MsgUtils->message("S", "Failed to connect to ".$self->{tabname}." table after retrying $retry times: $message");
|
||||
}
|
||||
};
|
||||
$::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} } =
|
||||
DBI->connect($self->{connstring}, $self->{dbuser}, $self->{dbpass}, { AutoCommit => $self->{realautocommit} });
|
||||
};
|
||||
if ($::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} }) {
|
||||
last;
|
||||
} elsif ($retry == 3) {
|
||||
last;
|
||||
} else {
|
||||
sleep (2**$retry);
|
||||
}
|
||||
$retry++;
|
||||
}
|
||||
umask $oldumask;
|
||||
|
||||
$self->{dbh} = $::XCAT_DBHS->{ $self->{connstring}, $self->{dbuser}, $self->{dbpass}, $self->{realautocommit} };
|
||||
|
||||
#Store the Table object reference as afflicted by changes to the DBH
|
||||
@@ -2186,6 +2202,12 @@ sub getNodesAttribs {
|
||||
$self->{nodelist}->{_use_cache} = 1;
|
||||
}
|
||||
my $rethash;
|
||||
my @hierarchy_attrs = ();
|
||||
my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs");
|
||||
if ($hierarchy_field) {
|
||||
@hierarchy_attrs = split(/,/, $hierarchy_field);
|
||||
}
|
||||
$options{hierarchy_attrs} = \@hierarchy_attrs;
|
||||
foreach (@$nodelist) {
|
||||
my @nodeentries = $self->getNodeAttribs($_, \@realattribs, %options);
|
||||
$rethash->{$_} = \@nodeentries; #$self->getNodeAttribs($_,\@attribs);
|
||||
@@ -2435,6 +2457,16 @@ sub getNodeAttribs
|
||||
} else {
|
||||
@attribs = @_;
|
||||
}
|
||||
|
||||
if (!exists($options{hierarchy_attrs})) {
|
||||
my @hierarchy_attrs = ();
|
||||
my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs");
|
||||
if ($hierarchy_field) {
|
||||
@hierarchy_attrs = split(/,/, $hierarchy_field);
|
||||
}
|
||||
$options{hierarchy_attrs} = \@hierarchy_attrs;
|
||||
}
|
||||
|
||||
my $datum;
|
||||
my $oldusecache;
|
||||
my $nloldusecache;
|
||||
@@ -2665,12 +2697,7 @@ sub getNodeAttribs_nosub_returnany
|
||||
|
||||
my $attrib;
|
||||
my $result;
|
||||
my @hierarchy_attrs;
|
||||
my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs");
|
||||
if ($hierarchy_field) {
|
||||
@hierarchy_attrs = split(/,/, $hierarchy_field);
|
||||
}
|
||||
|
||||
my @hierarchy_attrs = @{ $options{hierarchy_attrs} };
|
||||
my $data = $results[0];
|
||||
if (defined {$data}) { #if there was some data for the node, loop through and check it
|
||||
foreach $result (@results) {
|
||||
@@ -3103,7 +3130,13 @@ sub getAllNodeAttribs
|
||||
#} end SF 3580
|
||||
|
||||
#my $localhash = $self->getNodesAttribs(\@nodes,$attribq); #NOTE: This is stupid, rebuilds the cache for every entry, FIXME
|
||||
|
||||
my %options;
|
||||
my @hierarchy_attrs = ();
|
||||
my $hierarchy_field = xCAT::TableUtils->get_site_attribute("hierarchicalattrs");
|
||||
if ($hierarchy_field) {
|
||||
@hierarchy_attrs = split(/,/, $hierarchy_field);
|
||||
}
|
||||
$options{hierarchy_attrs} = \@hierarchy_attrs;
|
||||
foreach (@nodes)
|
||||
{
|
||||
if ($donenodes{$_}) { next; }
|
||||
@@ -3117,7 +3150,7 @@ sub getAllNodeAttribs
|
||||
# }
|
||||
#} else {
|
||||
my @attrs =
|
||||
$self->getNodeAttribs($_, $attribq); #@{$localhash->{$_}} #$self->getNodeAttribs($_, $attribq)
|
||||
$self->getNodeAttribs($_, $attribq, %options); #@{$localhash->{$_}} #$self->getNodeAttribs($_, $attribq)
|
||||
; #Logic moves to getNodeAttribs
|
||||
#}
|
||||
#populate node attribute by default, this sort of expansion essentially requires it.
|
||||
|
@@ -4,7 +4,6 @@
|
||||
package xCAT::Usage;
|
||||
use Getopt::Long;
|
||||
use xCAT::Utils;
|
||||
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
=head1 xCAT::Usage
|
||||
@@ -33,7 +32,7 @@ my %usage = (
|
||||
rpower noderange [on|off|reset|boot|stat|state|status]
|
||||
rpower noderange [pduon|pduoff|pdustat]
|
||||
OpenPOWER OpenBMC:
|
||||
rpower noderange [on|off|reset|boot|stat|state|status]
|
||||
rpower noderange [on|off|softoff|reset|boot|bmcreboot|bmcstate|stat|state|status]
|
||||
KVM Virtualization specific:
|
||||
rpower <noderange> [boot] [ -c <path to iso> ]
|
||||
PPC (with IVM or HMC) specific:
|
||||
@@ -95,14 +94,12 @@ my %usage = (
|
||||
Common:
|
||||
rinv <noderange> [all|model|serial] [-V|--verbose]
|
||||
rinv [-h|--help|-v|--version]
|
||||
BMC specific:
|
||||
rinv <noderange> [mprom|deviceid|uuid|guid|vpd|dimm|all]
|
||||
BMC/MPA specific:
|
||||
rinv <noderange> [model|serial|asset|vpd|deviceid|guid|firm|dimm|mprom|all]
|
||||
OpenPOWER (IPMI) server specific:
|
||||
rinv <noderange> [model|serial|deviceid|uuid|guid|vpd|mprom|firm|all]
|
||||
OpenPOWER (OpenBMC) server specific:
|
||||
rinv <noderange> [model|serial|firm|cpu|dimm|all]
|
||||
MPA specific:
|
||||
rinv <noderange> [firm|bios|diag|mprom|sprom|mparom|mac|mtm]
|
||||
rinv <noderange> [model|serial|firm|cpu|dimm|all] [-V|--verbose]
|
||||
PPC specific(with HMC):
|
||||
rinv <noderange> [all|bus|config|serial|model|firm]
|
||||
PPC specific(using Direct FSP Management):
|
||||
@@ -121,7 +118,7 @@ my %usage = (
|
||||
pdu specific:
|
||||
rinv noderange ",
|
||||
"rsetboot" =>
|
||||
"Usage: rsetboot <noderange> [net|hd|cd|floppy|def|stat] [-V|--verbose] [-u] [-p]
|
||||
"Usage: rsetboot <noderange> [net|hd|cd|floppy|def|stat] [-u] [-p]
|
||||
rsetboot [-h|--help|-v|--version]",
|
||||
"rbootseq" =>
|
||||
"Usage:
|
||||
@@ -327,6 +324,9 @@ my %usage = (
|
||||
"Usage: lsslp [-h|--help|-v|--version]
|
||||
lsslp [<noderange>][-V|--verbose][-i ip[,ip..]][-w][-r|-x|-z][-n][-I][-s FRAME|CEC|MM|IVM|RSA|HMC|CMM|IMM2|FSP]
|
||||
[-u] [--range IPranges][-t tries][--vpdtable][-C counts][-T timeout]",
|
||||
"pdudiscover" =>
|
||||
"Usage: pdudiscover [-h|--help|-v|--version]
|
||||
pdudiscover [<noderange>|--range ipranges] [-r|-x|-z] [-w] [-V|--verbose] [--setup]",
|
||||
"switchdiscover" =>
|
||||
"Usage: switchdiscover [-h|--help|-v|--version]
|
||||
switchdiscover [<noderange>|--range ipranges] [-s scan_methods] [-r|-x|-z] [-w] [-V|--verbose] [--setup]",
|
||||
@@ -345,8 +345,10 @@ my %usage = (
|
||||
rflash <noderange> -p <rpm_directory> [--activate {disruptive|deferred}] [-d <data_directory>]
|
||||
rflash <noderange> [--commit | --recover] [-V|--verbose]
|
||||
rflash <noderange> [--bpa_acdl]
|
||||
PPC64LE (using BMC Management) specific:
|
||||
rflash <noderange> [-c | --check] [--retry=<count>] [-V] <hpm_file>",
|
||||
PPC64LE (using IPMI Management) specific:
|
||||
rflash <noderange> [-c|--check] [--retry=<count>] [-V] [<hpm_file>|-d=<data_directory>]
|
||||
PPC64LE (using OpenBMC Management) specific:
|
||||
rflash <noderange> [-c|--check] [-l|--list] [-a|--activate] [-u|--upload] [-d|--delete] [<tar_file>|<image_id>]",
|
||||
"mkhwconn" =>
|
||||
"Usage:
|
||||
mkhwconn [-h|--help]
|
||||
@@ -487,7 +489,7 @@ Options:
|
||||
"Usage:
|
||||
Common:
|
||||
nodeset [-h|--help|-v|--version]
|
||||
nodeset <noderange> [shell|boot|runcmd=bmcsetup|osimage[=<imagename>]|offline|shutdown|stat]",
|
||||
nodeset <noderange> [shell|boot|runcmd=bmcsetup|osimage[=<imagename>]|offline|shutdown|stat [-a]]",
|
||||
"rmflexnode" =>
|
||||
"Usage:
|
||||
rmflexnode [-h|--help|-v|--version]
|
||||
@@ -652,11 +654,11 @@ sub validateArgs {
|
||||
#filtered by GetOpt subroutine
|
||||
#fortunately the commands in this branch does not have such options
|
||||
foreach(@extrargs){
|
||||
if($_ !~ m/^-[-]?\S+/){
|
||||
if($_ and $_ !~ m/^-[-]?\S+/){
|
||||
$count+=1;
|
||||
}
|
||||
}
|
||||
if ($count!=1) {
|
||||
unless (($command =~ m/^(rinstall|winstall)$/ and $count==0) or $count==1) {
|
||||
return [1,"Invalid argument: '".join(" ",@extrargs)."'"];
|
||||
}
|
||||
}
|
||||
|
@@ -638,7 +638,7 @@ sub calc_conserver_version
|
||||
{
|
||||
my $ver_str = shift;
|
||||
my @vers = split(/\./, $ver_str);
|
||||
return ord($vers[2]) + ord($vers[1]) * 10000 + ord($vers[0]) * 100000000;
|
||||
return int($vers[2]) + int($vers[1]) * 10000 + int($vers[0]) * 100000000;
|
||||
}
|
||||
|
||||
|
||||
@@ -4025,14 +4025,14 @@ sub servicemap {
|
||||
# (general service name) => {list of possible service names}
|
||||
#
|
||||
my %svchash = (
|
||||
"dhcp" => [ "dhcp3-server", "dhcpd", "isc-dhcp-server" ],
|
||||
"nfs" => [ "nfsserver", "nfs-server", "nfs", "nfs-kernel-server" ],
|
||||
"named" => [ "named", "bind9" ],
|
||||
"syslog" => [ "syslog", "syslogd", "rsyslog" ],
|
||||
"firewall" => [ "iptables", "firewalld", "ufw" ],
|
||||
"http" => [ "apache2", "httpd" ],
|
||||
"ntpserver" => [ "ntpd", "ntp" ],
|
||||
"mysql" => [ "mysqld", "mysql" ],
|
||||
"dhcp" => [ "dhcp3-server", "dhcpd", "isc-dhcp-server" ],
|
||||
"nfs" => [ "nfsserver", "nfs-server", "nfs", "nfs-kernel-server" ],
|
||||
"named" => [ "named", "bind9" ],
|
||||
"syslog" => [ "syslog", "syslogd", "rsyslog" ],
|
||||
"firewall" => [ "iptables", "firewalld", "ufw" ],
|
||||
"http" => [ "apache2", "httpd" ],
|
||||
"ntpserver" => [ "ntpd", "ntp" ],
|
||||
"mysql" => [ "mysqld", "mysql", "mariadb" ],
|
||||
);
|
||||
|
||||
my $path = undef;
|
||||
|
45
perl-xCAT/xCAT/data/switchinfo.pm
Normal file
45
perl-xCAT/xCAT/data/switchinfo.pm
Normal file
@@ -0,0 +1,45 @@
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
#This module includes some glocal table to look up the switch type via mac and vendor
|
||||
|
||||
package xCAT::data::switchinfo;
|
||||
|
||||
require Exporter;
|
||||
@ISA = qw(Exporter);
|
||||
@EXPORT = qw();
|
||||
@EXPORT_OK = qw(global_mac_identity global_switch_type);
|
||||
|
||||
use strict;
|
||||
|
||||
#the hash to look up switch type with MAC
|
||||
our %global_mac_identity = (
|
||||
"a8:97:dc" => "BNT G8052 switch",
|
||||
"6c:ae:8b" => "BNT G8264-T switch",
|
||||
"fc:cf:62" => "BNT G8124 switch",
|
||||
"7c:fe:90" => "Mellanox IB switch",
|
||||
"cc:37:ab" => "Edgecore Networks Switch",
|
||||
"8c:ea:1b" => "Edgecore Networks Switch"
|
||||
);
|
||||
|
||||
#the hash to lookup switch type with vendor
|
||||
our %global_switch_type = (
|
||||
Juniper => "Juniper",
|
||||
juniper => "Juniper",
|
||||
Cisco => "Cisco",
|
||||
cisco => "Cisco",
|
||||
BNT => "BNT",
|
||||
Blade => "BNT",
|
||||
G8052 => "BNT",
|
||||
RackSwitch => "BNT",
|
||||
Mellanox => "Mellanox",
|
||||
mellanox => "Mellanox",
|
||||
MLNX => "Mellanox",
|
||||
MELLAN => "Mellanox",
|
||||
Cumulus => "onie",
|
||||
cumulus => "onie",
|
||||
Edgecore => "onie"
|
||||
);
|
||||
|
||||
|
||||
|
||||
1;
|
525
travis.pl
Normal file
525
travis.pl
Normal file
@@ -0,0 +1,525 @@
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
use strict;
|
||||
use warnings;
|
||||
use Getopt::Long;
|
||||
use Data::Dumper;
|
||||
use Time::Local;
|
||||
use File::Basename;
|
||||
use File::Path;
|
||||
use File::Find;
|
||||
use LWP::UserAgent;
|
||||
use HTTP::Request;
|
||||
use Encode;
|
||||
use Encode::CN;
|
||||
use JSON;
|
||||
use URI::Escape;
|
||||
use LWP::Simple;
|
||||
|
||||
use Term::ANSIColor qw(:constants);
|
||||
$Term::ANSIColor::AUTORESET = 1;
|
||||
|
||||
#---Global attributes---
|
||||
my $rst = 0;
|
||||
my $check_result_str="``CI CHECK RESULT`` : ";
|
||||
my $last_func_start = timelocal(localtime());
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: runcmd
|
||||
# Description: run a command after 'cmd' label in one case
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
# $::RUNCMD_RC : the return code of command
|
||||
# @$outref : the output of command
|
||||
#--------------------------------------------------------
|
||||
sub runcmd
|
||||
{
|
||||
my ($cmd) = @_;
|
||||
my $rc = 0;
|
||||
$::RUNCMD_RC = 0;
|
||||
my $outref = [];
|
||||
@$outref = `$cmd 2>&1`;
|
||||
if ($?)
|
||||
{
|
||||
$rc = $?;
|
||||
$rc = $rc >> 8;
|
||||
$::RUNCMD_RC = $rc;
|
||||
}
|
||||
chomp(@$outref);
|
||||
return @$outref;
|
||||
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: get_files_recursive
|
||||
# Description: Search all file in one directory recursively
|
||||
# Atrributes:
|
||||
# $dir (input attribute)
|
||||
# The target scan directory
|
||||
# $files_path_ref (output attribute)
|
||||
# the reference of array where save all vaild files under $dir
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub get_files_recursive
|
||||
{
|
||||
my $dir = shift;
|
||||
my $files_path_ref = shift;
|
||||
|
||||
my $fd = undef;
|
||||
if(!opendir($fd, $dir)){
|
||||
print "[get_files_recursive]: failed to open $dir :$!\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (; ;)
|
||||
{
|
||||
my $direntry = readdir($fd);
|
||||
last unless (defined($direntry));
|
||||
next if ($direntry =~ m/^\.\w*/);
|
||||
next if ($direntry eq '..');
|
||||
my $target = "$dir/$direntry";
|
||||
if (-d $target) {
|
||||
get_files_recursive($target, $files_path_ref);
|
||||
} else {
|
||||
push(@{$files_path_ref}, glob("$target\n"));
|
||||
}
|
||||
}
|
||||
closedir($fd);
|
||||
return 0;
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: check_pr_format
|
||||
# Description:
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub check_pr_format{
|
||||
if($ENV{'TRAVIS_EVENT_TYPE'} eq "pull_request"){
|
||||
my $pr_url = "https://api.github.com/repos/$ENV{'TRAVIS_REPO_SLUG'}/pulls/$ENV{'TRAVIS_PULL_REQUEST'}";
|
||||
my $pr_url_resp = get($pr_url);
|
||||
my $pr_content = decode_json($pr_url_resp);
|
||||
my $pr_title = $pr_content->{title};
|
||||
my $pr_body = $pr_content->{body};
|
||||
|
||||
#print "[check_pr_format] Dumper pr_content:\n";
|
||||
#print Dumper $pr_content;
|
||||
print "[check_pr_format] pr title = $pr_title\n";
|
||||
print "[check_pr_format] pr body = $pr_body \n";
|
||||
|
||||
my $checkrst="";
|
||||
if(! $pr_title){
|
||||
$checkrst.="Miss title.";
|
||||
}
|
||||
if(! $pr_body){
|
||||
$checkrst.="Miss description.";
|
||||
}
|
||||
|
||||
if(length($checkrst) == 0){
|
||||
$check_result_str .= "> **PR FORMAT CORRECT**";
|
||||
send_back_comment("$check_result_str");
|
||||
}else{
|
||||
$check_result_str .= "> **PR FORMAT ERROR** : $checkrst";
|
||||
send_back_comment("$check_result_str");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: check_pr_format
|
||||
# Description:
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub send_back_comment{
|
||||
my $message = shift;
|
||||
|
||||
my $comment_url = "https://api.github.com/repos/$ENV{'TRAVIS_REPO_SLUG'}/issues/$ENV{'TRAVIS_PULL_REQUEST'}/comments";
|
||||
my $comment_url_resp = get($comment_url);
|
||||
my $json = new JSON;
|
||||
my $comment_content = $json->decode($comment_url_resp);
|
||||
my $comment_len = @$comment_content;
|
||||
|
||||
#print "\n\n>>>>>Dumper comment_content: $comment_len\n";
|
||||
#print Dumper $comment_content;
|
||||
|
||||
my $post_url = $comment_url;
|
||||
my $post_method = "POST";
|
||||
if($comment_len > 0){
|
||||
foreach my $comment (@{$comment_content}){
|
||||
if($comment->{'body'} =~ /CI CHECK RESULT/) {
|
||||
$post_url = $comment->{'url'};
|
||||
$post_method = "PATCH";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "[send_back_comment] method = $post_method to $post_url\n";
|
||||
`curl -u "$ENV{'xcatbotuser'}:$ENV{'xcatbotpw'}" -X $post_method -d '{"body":"$message"}' $post_url`;
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: build_xcat_core
|
||||
# Description:
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub build_xcat_core{
|
||||
my @output;
|
||||
my @cmds = ("gpg --list-keys",
|
||||
"sed -i '/SignWith: yes/d' $ENV{'PWD'}/build-ubunturepo");
|
||||
foreach my $cmd (@cmds){
|
||||
print "[build_xcat_core] to run $cmd\n";
|
||||
@output = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print "[build_xcat_core] $cmd ....[Failed]\n";
|
||||
send_back_comment("> **BUILD ERROR** : $cmd failed. Please click ``Details`` label in ``Merge pull request`` box for detailed information");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
my $cmd = "sudo ./build-ubunturepo -c UP=0 BUILDALL=1";
|
||||
@output = runcmd("$cmd");
|
||||
print ">>>>>Dumper the output of '$cmd'\n";
|
||||
print Dumper \@output;
|
||||
if($::RUNCMD_RC){
|
||||
my $lastline = $output[-1];
|
||||
$lastline =~ s/[\r\n\t\\"']*//g;
|
||||
print "[build_xcat_core] $cmd ....[Failed]\n";
|
||||
#print ">>>>>Dumper the output of '$cmd'\n";
|
||||
#print Dumper \@output;
|
||||
$check_result_str .= "> **BUILD ERROR**, Please click ``Details`` label in ``Merge pull request`` box for detailed information";
|
||||
send_back_comment("$check_result_str");
|
||||
return 1;
|
||||
}else{
|
||||
print "[build_xcat_core] $cmd ....[Pass]\n";
|
||||
$check_result_str .= "> **BUILD SUCCESSFUL** ";
|
||||
send_back_comment("$check_result_str");
|
||||
}
|
||||
|
||||
# my $buildpath ="/home/travis/build/xcat-core/";
|
||||
# my @buildfils = ();
|
||||
# get_files_recursive("$buildpath", \@buildfils);
|
||||
# print "\n-----------Dumper build files-----------\n";
|
||||
# print Dumper \@buildfils;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: install_xcat
|
||||
# Description:
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub install_xcat{
|
||||
|
||||
my @cmds = ("cd ./../../xcat-core && sudo ./mklocalrepo.sh",
|
||||
"sudo chmod 777 /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=amd64] http://xcat.org/files/xcat/repos/apt/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo echo \"deb [arch=ppc64el] http://xcat.org/files/xcat/repos/apt/xcat-dep trusty main\" >> /etc/apt/sources.list",
|
||||
"sudo wget -q -O - \"http://xcat.org/files/xcat/repos/apt/apt.key\" | sudo apt-key add -",
|
||||
"sudo apt-get -qq update");
|
||||
my @output;
|
||||
foreach my $cmd (@cmds){
|
||||
print "[install_xcat] to run $cmd\n";
|
||||
@output = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print RED "[install_xcat] $cmd. ...[Failed]\n";
|
||||
print "[install_xcat] error message:\n";
|
||||
print Dumper \@output;
|
||||
$check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information ";
|
||||
send_back_comment("$check_result_str");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
my $cmd = "sudo apt-get install xcat --force-yes";
|
||||
@output = runcmd("$cmd");
|
||||
#print ">>>>>Dumper the output of '$cmd'\n";
|
||||
#print Dumper \@output;
|
||||
if($::RUNCMD_RC){
|
||||
my $lastline = $output[-1];
|
||||
$lastline =~ s/[\r\n\t\\"']*//g;
|
||||
print "[install_xcat] $cmd ....[Failed]\n";
|
||||
print ">>>>>Dumper the output of '$cmd'\n";
|
||||
print Dumper \@output;
|
||||
$check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information";
|
||||
send_back_comment("$check_result_str");
|
||||
return 1;
|
||||
}else{
|
||||
print "[install_xcat] $cmd ....[Pass]\n";
|
||||
|
||||
print "\n------To config xcat and check if xcat work correctly-----\n";
|
||||
@cmds = ("sudo -s /opt/xcat/share/xcat/scripts/setup-local-client.sh -f travis",
|
||||
"sudo -s /opt/xcat/sbin/chtab priority=1.1 policy.name=travis policy.rule=allow",
|
||||
". /etc/profile.d/xcat.sh && tabdump policy",
|
||||
". /etc/profile.d/xcat.sh && tabdump site",
|
||||
". /etc/profile.d/xcat.sh && lsxcatd -a",
|
||||
"ls /opt/xcat/sbin",
|
||||
"service xcatd status");
|
||||
my $ret = 0;
|
||||
foreach my $cmd (@cmds){
|
||||
print "\n[install_xcat] To run $cmd.....\n";
|
||||
@output = runcmd("$cmd");
|
||||
print Dumper \@output;
|
||||
if($::RUNCMD_RC){
|
||||
print RED "[install_xcat] $cmd. ...[Failed]\n";
|
||||
#print Dumper \@output;
|
||||
$ret = 1;
|
||||
}else{
|
||||
print "[install_xcat] $cmd....[Pass]\n";
|
||||
}
|
||||
}
|
||||
if($ret){
|
||||
$check_result_str .= "> **INSTALL XCAT ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information";
|
||||
send_back_comment("$check_result_str");
|
||||
return 1;
|
||||
}
|
||||
$check_result_str .= "> **INSTALL XCAT SUCCESSFUL**";
|
||||
send_back_comment("$check_result_str");
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: check_syntax
|
||||
# Description:
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub check_syntax{
|
||||
my @output;
|
||||
my @syntax_err;
|
||||
my $ret = 0;
|
||||
|
||||
my @target_dirs=("/opt/xcat",
|
||||
"/install");
|
||||
foreach my $dir (@target_dirs){
|
||||
my @files = ();
|
||||
get_files_recursive("$dir", \@files);
|
||||
|
||||
foreach my $file (@files) {
|
||||
next if($file =~ /\/opt\/xcat\/share\/xcat\/netboot\/genesis\//);
|
||||
next if($file =~ /\/opt\/xcat\/probe\//);
|
||||
|
||||
@output = runcmd("file $file");
|
||||
if($output[0] =~ /perl /i){
|
||||
@output = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && perl -I /opt/xcat/lib/perl -I /opt/xcat/lib -I /usr/lib/perl5 -I /usr/share/perl -c $file'");
|
||||
if($::RUNCMD_RC){
|
||||
push @syntax_err, @output;
|
||||
$ret = 1;
|
||||
}
|
||||
#}elsif($output[0] =~ /shell/i){
|
||||
# @output = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && sh -n $file'");
|
||||
# if($::RUNCMD_RC){
|
||||
# push @syntax_err, @output;
|
||||
# $ret = 1;
|
||||
# }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(@syntax_err){
|
||||
print "[check_syntax] syntax checking ....[Failed]\n";
|
||||
print "[check_syntax] Dumper error message:\n";
|
||||
print Dumper @syntax_err;
|
||||
$check_result_str .= "> **CODE SYNTAX ERROR** : Please click ``Details`` label in ``Merge pull request`` box for detailed information";
|
||||
send_back_comment("$check_result_str");
|
||||
}else{
|
||||
print "[check_syntax] syntax checking ....[Pass]\n";
|
||||
$check_result_str .= "> **CODE SYNTAX CORRECT**";
|
||||
send_back_comment("$check_result_str");
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: run_fast_regression_test
|
||||
# Description:
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub run_fast_regression_test{
|
||||
my $cmd = "sudo apt-get install xcat-test --force-yes";
|
||||
my @output = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
|
||||
print Dumper \@output;
|
||||
return 1;
|
||||
}else{
|
||||
print "[run_fast_regression_test] $cmd .....:\n";
|
||||
print Dumper \@output;
|
||||
}
|
||||
|
||||
$cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l bundleinfo'";
|
||||
@output = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print RED "[run_fast_regression_test] $cmd ....[Failed]\n";
|
||||
print "[run_fast_regression_test] error dumper:\n";
|
||||
print Dumper \@output;
|
||||
return 1;
|
||||
}else{
|
||||
print "[run_fast_regression_test] $cmd .....:\n";
|
||||
print Dumper \@output;
|
||||
}
|
||||
|
||||
my $hostname = `hostname`;
|
||||
chomp($hostname);
|
||||
print "hostname = $hostname\n";
|
||||
my $conf_file = "$ENV{'PWD'}/regression.conf";
|
||||
$cmd = "echo '[System]' > $conf_file; echo 'MN=$hostname' >> $conf_file; echo '[Table_site]' >> $conf_file; echo 'key=domain' >>$conf_file; echo 'value=pok.stglabs.ibm.com' >> $conf_file";
|
||||
@output = runcmd("$cmd");
|
||||
if($::RUNCMD_RC){
|
||||
print RED "[run_fast_regression_test] $cmd ....[Failed]";
|
||||
print "[run_fast_regression_test] error dumper:\n";
|
||||
print Dumper \@output;
|
||||
return 1;
|
||||
}
|
||||
|
||||
print "Dumper regression conf file:\n";
|
||||
@output = runcmd("cat $conf_file");
|
||||
print Dumper \@output;
|
||||
|
||||
my @caseslist = runcmd("sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -l caselist -b MN_basic.bundle'");
|
||||
my $casenum = @caseslist;
|
||||
|
||||
my $x = 0;
|
||||
my @failcase;
|
||||
my $passnum = 0;
|
||||
my $failnum = 0;
|
||||
foreach my $case (@caseslist){
|
||||
++$x;
|
||||
$cmd = "sudo bash -c '. /etc/profile.d/xcat.sh && xcattest -f $conf_file -t $case'";
|
||||
print "[run_fast_regression_test] run $x: $cmd\n";
|
||||
@output = runcmd("$cmd");
|
||||
#print Dumper \@output;
|
||||
for(my $i = $#output; $i>-1; --$i){
|
||||
if($output[$i] =~ /------END::(.+)::Failed/){
|
||||
push @failcase, $1;
|
||||
++$failnum;
|
||||
print Dumper \@output;
|
||||
last;
|
||||
}elsif ($output[$i] =~ /------END::(.+)::Passed/){
|
||||
++$passnum;
|
||||
last;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if($failnum){
|
||||
my $log_str = join (",", @failcase );
|
||||
$check_result_str .= "> **FAST REGRESSION TEST Failed**: Totalcase $casenum Pass $passnum failed $failnum FailedCases: $log_str. Please click ``Details`` label in ``Merge pull request`` box for detailed information";
|
||||
send_back_comment("$check_result_str");
|
||||
return 1;
|
||||
}else{
|
||||
$check_result_str .= "> **FAST REGRESSION TEST Successful**: Totalcase $casenum Pass $passnum failed $failnum";
|
||||
send_back_comment("$check_result_str");
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#--------------------------------------------------------
|
||||
# Fuction name: run_fast_regression_test
|
||||
# Description:
|
||||
# Atrributes:
|
||||
# Retrun code:
|
||||
#--------------------------------------------------------
|
||||
sub mark_time{
|
||||
my $func_name=shift;
|
||||
my $nowtime = timelocal(localtime());
|
||||
my $nowtime_str = scalar(localtime());
|
||||
my $duration = $nowtime - $last_func_start;
|
||||
$last_func_start = $nowtime;
|
||||
print "[mark_time] $nowtime_str, ElapsedTime of $func_name is $duration s\n";
|
||||
}
|
||||
|
||||
#===============Main Process=============================
|
||||
|
||||
#Dumper Travis Environment Attribute
|
||||
print GREEN "\n------Dumper Travis Environment Attribute------\n";
|
||||
my @travis_env_attr = ("TRAVIS_REPO_SLUG",
|
||||
"TRAVIS_BRANCH",
|
||||
"TRAVIS_EVENT_TYPE",
|
||||
"TRAVIS_PULL_REQUEST",
|
||||
"GITHUB_TOKEN",
|
||||
"USERNAME",
|
||||
"PASSWORD",
|
||||
"PWD");
|
||||
foreach (@travis_env_attr){
|
||||
if($ENV{$_}) {
|
||||
print "$_ = '$ENV{$_}'\n";
|
||||
} else {
|
||||
print "$_ = ''\n";
|
||||
}
|
||||
}
|
||||
|
||||
my @os_info = runcmd("cat /etc/os-release");
|
||||
print "Current OS information:\n";
|
||||
print Dumper \@os_info;
|
||||
|
||||
my @perl_vserion = runcmd("perl -v");
|
||||
print "Current perl information:\n";
|
||||
print Dumper \@perl_vserion;
|
||||
|
||||
#my @sh_version = runcmd("sudo bash -c 'sh --version'");
|
||||
#print "Current sh information:\n";
|
||||
#print Dumper \@sh_version;
|
||||
|
||||
my @disk = runcmd("df -h");
|
||||
print "Disk information:\n";
|
||||
print Dumper \@disk;
|
||||
|
||||
#Start to check the format of pull request
|
||||
$last_func_start = timelocal(localtime());
|
||||
print GREEN "\n------To Check Pull Request Format------\n";
|
||||
$rst = check_pr_format();
|
||||
if($rst){
|
||||
print RED "Check pull request format failed\n";
|
||||
exit $rst;
|
||||
}
|
||||
mark_time("check_pr_format");
|
||||
|
||||
#Start to build xcat core
|
||||
|
||||
print GREEN "\n------To Build xCAT core package------\n";
|
||||
$rst = build_xcat_core();
|
||||
if($rst){
|
||||
print RED "Build xCAT core package failed\n";
|
||||
exit $rst;
|
||||
}
|
||||
mark_time("build_xcat_core");
|
||||
|
||||
#Start to install xcat
|
||||
print GREEN "\n------To install xcat------\n";
|
||||
$rst = install_xcat();
|
||||
if($rst){
|
||||
print RED "Install xcat failed\n";
|
||||
exit $rst;
|
||||
}
|
||||
mark_time("install_xcat");
|
||||
|
||||
#Check the syntax of changing code
|
||||
print GREEN "\n------To check the syntax of changing code------\n";
|
||||
$rst = check_syntax();
|
||||
if($rst){
|
||||
print RED "check the syntax of changing code failed\n";
|
||||
exit $rst;
|
||||
}
|
||||
mark_time("check_syntax");
|
||||
|
||||
#run fast regression
|
||||
print GREEN "\n------To run fast regression test------\n";
|
||||
$rst = run_fast_regression_test();
|
||||
if($rst){
|
||||
print RED "Run fast regression test failed\n";
|
||||
exit $rst;
|
||||
}
|
||||
mark_time("run_fast_regression_test");
|
||||
|
||||
exit 0;
|
@@ -9,7 +9,7 @@ if [ -z "$1" ];then
|
||||
fi
|
||||
|
||||
str_nic_name=$1
|
||||
str_ip_mask=`ip addr show dev $str_nic_name | grep inet | grep -v inet6 | awk '{print $2}' | head -n 1`
|
||||
str_ip_mask=`ip -4 -o addr show dev $str_nic_name | awk '{print $4}' | head -n 1`
|
||||
|
||||
str_ip=`echo $str_ip_mask | awk -F'/' '{print $1}'`
|
||||
str_mask=`echo $str_ip_mask | awk -F'/' '{print $2}'`
|
||||
|
@@ -72,6 +72,8 @@ $::pgcmddir = "/usr/bin"; # pg cmds location
|
||||
$::debiancfgdir = "/etc/postgresql/9.1/main";
|
||||
my $INIT;
|
||||
my $SETUPODBC;
|
||||
my @LISTENADDRS;
|
||||
my @ACCESSADDRS;
|
||||
my $NOSTART;
|
||||
my $SETUPPCM;
|
||||
my $HELP;
|
||||
@@ -83,6 +85,8 @@ if (
|
||||
!GetOptions(
|
||||
'i|init' => \$INIT,
|
||||
'o|odbc' => \$SETUPODBC,
|
||||
'l|listen=s'=> \@LISTENADDRS,
|
||||
'a|access=s'=> \@ACCESSADDRS,
|
||||
'N|nostart' => \$NOSTART,
|
||||
'P|PCM' => \$SETUPPCM,
|
||||
'h|help' => \$HELP,
|
||||
@@ -128,6 +132,13 @@ if ((!($INIT)) && ($SETUPODBC))
|
||||
|
||||
}
|
||||
|
||||
# create comma-separated list of additional listen addresses
|
||||
my $listenaddrs = undef;
|
||||
if (@LISTENADDRS)
|
||||
{
|
||||
$listenaddrs = join ',', @LISTENADDRS;
|
||||
}
|
||||
|
||||
#
|
||||
# Get OS
|
||||
#
|
||||
@@ -428,7 +439,7 @@ sub usage
|
||||
"Usage:\npgsqlsetup - Performs the setup of PostgreSQL for xCAT to use as its database. See man pgsqlsetup for more information."
|
||||
);
|
||||
my $msg =
|
||||
"pgsqlsetup <-h|--help>\n <-v|--version>\n <-i|--init> [-N|--nostart] [-P|--PCM] [-o|--odbc] [-V|--verbose]\n <-o|--odbc> [-V|--verbose]";
|
||||
"pgsqlsetup <-h|--help>\n <-v|--version>\n <-i|--init> [-N|--nostart] [-l|--listen address] [-a|--access address] [-P|--PCM] [-o|--odbc] [-V|--verbose]\n <-o|--odbc> [-V|--verbose]";
|
||||
|
||||
xCAT::MsgUtils->message('I', "$msg");
|
||||
}
|
||||
@@ -726,7 +737,8 @@ sub initpgdb
|
||||
}
|
||||
&runpostgrescmd($cmd);
|
||||
|
||||
# insert MN ip address in the # IPv4 local connections: stanza of
|
||||
# insert MN ip address and any -a addresses
|
||||
# in the # IPv4 local connections: stanza of
|
||||
# the /var/lib/pgsql/data/pg_hba.conf file
|
||||
# if it is not already there
|
||||
|
||||
@@ -735,43 +747,44 @@ sub initpgdb
|
||||
if ($debianflag) {
|
||||
$hbafile = $::debiancfgdir . "/pg_hba.conf";
|
||||
}
|
||||
$cmd = "fgrep $::MN $hbafile";
|
||||
$cmd = "cp $hbafile $hbafile.org"; # backup the original
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
if ($::RUNCMD_RC != 0) # not already there
|
||||
{
|
||||
$cmd = "cp $hbafile $hbafile.org"; # backup the original
|
||||
|
||||
push @ACCESSADDRS, $::MN; # add management node to list
|
||||
my $insertstr = undef; # start with empty string
|
||||
for my $hbaaccess (@ACCESSADDRS)
|
||||
{
|
||||
$cmd = "fgrep $hbaaccess $hbafile";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
my $insertstr = "host all all ";
|
||||
$insertstr .= $::MN;
|
||||
$insertstr .= "\/32 md5 ";
|
||||
$cmd =
|
||||
"awk '{gsub(\"\IPv4 local connections:\",\"\IPv4 local connections:\\n$insertstr \"); print}' $hbafile > $hbafile.xcat";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
|
||||
if ($::RUNCMD_RC != 0)
|
||||
if ($::RUNCMD_RC != 0) # not already there
|
||||
{
|
||||
|
||||
xCAT::MsgUtils->message("E", " $cmd failed.");
|
||||
exit(1);
|
||||
$insertstr .= "host all all ";
|
||||
$insertstr .= $hbaaccess;
|
||||
$insertstr .= "\/32 md5\\n "; # add entry line to string
|
||||
}
|
||||
$cmd = "cp -p $hbafile.xcat $hbafile ";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
|
||||
xCAT::MsgUtils->message("E", " $cmd failed.");
|
||||
exit(1);
|
||||
}
|
||||
$cmd = "rm $hbafile.xcat ";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
|
||||
xCAT::MsgUtils->message("E", " $cmd failed.");
|
||||
exit(1);
|
||||
}
|
||||
$dbrestart = 1;
|
||||
}
|
||||
}
|
||||
$cmd = "awk '{gsub(\"\IPv4 local connections:\",\"\IPv4 local connections:\\n$insertstr \"); print}' $hbafile > $hbafile.xcat";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message("E", " $cmd failed.");
|
||||
exit(1);
|
||||
}
|
||||
$cmd = "cp -p $hbafile.xcat $hbafile ";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message("E", " $cmd failed.");
|
||||
exit(1);
|
||||
}
|
||||
$cmd = "rm $hbafile.xcat ";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
xCAT::MsgUtils->message("E", " $cmd failed.");
|
||||
exit(1);
|
||||
}
|
||||
$dbrestart = 1;
|
||||
|
||||
# setup the postgresql.conf file
|
||||
my $pgconf = $::installdatadir;
|
||||
@@ -789,6 +802,10 @@ sub initpgdb
|
||||
if ($::osname eq 'Linux')
|
||||
{
|
||||
$cmd = qq~ echo listen_addresses = \\'localhost,$::MN\\' >> $pgconf~;
|
||||
if ($::listenaddrs)
|
||||
{
|
||||
$cmd = qq~ echo listen_addresses = \\'localhost,$::MN,$::listenaddrs\\' >> $pgconf~;
|
||||
}
|
||||
`$cmd`;
|
||||
}
|
||||
|
||||
@@ -796,6 +813,10 @@ sub initpgdb
|
||||
if ($::osname eq 'AIX')
|
||||
{
|
||||
$cmd = qq~ echo listen_addresses = \\'$::MN\\' >> $pgconf~;
|
||||
if ($::listenaddrs)
|
||||
{
|
||||
$cmd = qq~ echo listen_addresses = \\'$::MN,$::listenaddrs\\' >> $pgconf~;
|
||||
}
|
||||
`$cmd`;
|
||||
$cmd = qq~echo logging_collector = on >> $pgconf~;
|
||||
`$cmd`;
|
||||
|
@@ -87,7 +87,7 @@ if [ $USE_CONFLUENT == "1" ] && ([ -x "/opt/confluent/bin/confetty" ] || [ -x "/
|
||||
fi
|
||||
if [ -z "$CONSERVER" ]; then
|
||||
CONSERVER=`nodels $1 nodehm.conserver 2>/dev/null | awk -F: '{print $2}' | tr -d ' '`
|
||||
declare -a ipaddrs=`ip addr | grep 'inet' | awk {'print $2'} | cut -d/ -f1 | grep -v : | tr '\n' ' '`
|
||||
declare -a ipaddrs=`ip -o a | awk {'print $4'} | cut -d/ -f1 | grep -v : | tr '\n' ' '`
|
||||
for IP in ${ipaddrs[*]}; do
|
||||
if [[ "${CONSERVER}" == "${IP}" ]]; then
|
||||
# conserver is the same node, do not connect using -s
|
||||
|
@@ -21,6 +21,7 @@ use Getopt::Long;
|
||||
use xCAT::MsgUtils;
|
||||
use xCAT::Utils;
|
||||
use xCAT::Client;
|
||||
use xCAT::NodeRange;
|
||||
use Cwd;
|
||||
use strict;
|
||||
|
||||
@@ -65,15 +66,31 @@ while ($arg =~ /^-/) {
|
||||
$cmdref->{noderange}->[0] = $arg;
|
||||
push(@{ $cmdref->{arg} }, @ARGV);
|
||||
|
||||
my $startconsole=0;
|
||||
if(grep m/^-c|--console$/,@ARGV){
|
||||
$startconsole=1;
|
||||
}
|
||||
|
||||
my $noderange = $cmdref->{noderange}->[0]; # save the noderange
|
||||
my @noderange=xCAT::NodeRange::noderange($noderange);
|
||||
|
||||
if($bname eq "rinstall" and $startconsole==1 and scalar @noderange!=1 ){
|
||||
xCAT::MsgUtils->message("E", "Error: rinstall -c/--console can only be run against one node! Please use winstall -c/--console for multiple nodes.");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Allow to print server information when -V/--verbose
|
||||
foreach (reverse(@ARGV)) {
|
||||
if ($_ eq '-V' || $_ eq '--verbose') {
|
||||
$ENV{'XCATSHOWSVR'} = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
# ok call Client to run the plugin rinstall.pm
|
||||
xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response);
|
||||
|
||||
if ($xCAT::Client::EXITCODE == 0) # no errors
|
||||
{
|
||||
my $startconsole = $cmdref->{startconsole}->[0];
|
||||
|
||||
# if startconsole requested ( -c flag) for rinstall always for winstall
|
||||
# This is set in the rinstall plugin
|
||||
if ($startconsole == 1) {
|
||||
@@ -82,9 +99,7 @@ if ($xCAT::Client::EXITCODE == 0) # no errors
|
||||
exec("rcons $noderange");
|
||||
}
|
||||
elsif (basename($0) =~ /winstall/) {
|
||||
|
||||
# winstall can commence a wcons command to the noderange for monitoring the provision cycle
|
||||
|
||||
exec("wcons $noderange");
|
||||
}
|
||||
}
|
||||
|
@@ -200,5 +200,13 @@ foreach (keys %ENV) {
|
||||
}
|
||||
}
|
||||
|
||||
# Allow to print server information when -V/--verbose
|
||||
foreach (reverse(@ARGV)) {
|
||||
if ($_ eq '-V' || $_ eq '--verbose') {
|
||||
$ENV{'XCATSHOWSVR'} = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response);
|
||||
exit $xCAT::Client::EXITCODE;
|
||||
|
@@ -102,5 +102,13 @@ foreach (keys %ENV) {
|
||||
}
|
||||
}
|
||||
|
||||
# Allow to print server information when -V
|
||||
foreach (reverse(@ARGV)) {
|
||||
if ($_ eq '-V') {
|
||||
$ENV{'XCATSHOWSVR'} = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response);
|
||||
exit $xCAT::Client::EXITCODE;
|
||||
|
@@ -51,6 +51,14 @@ foreach (keys %ENV) {
|
||||
}
|
||||
}
|
||||
|
||||
# Allow to print server information when -V/--verbose
|
||||
foreach (reverse(@ARGV)) {
|
||||
if ($_ eq '-V' || $_ eq '--verbose') {
|
||||
$ENV{'XCATSHOWSVR'} = 1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
xCAT::Client::submit_request($cmdref, \&xCAT::Client::handle_response);
|
||||
exit $xCAT::Client::EXITCODE;
|
||||
|
||||
|
@@ -37,7 +37,6 @@ opt/xcat/bin/xcatclient opt/xcat/bin/lstree
|
||||
opt/xcat/bin/xcatclient opt/xcat/bin/lsflexnode
|
||||
opt/xcat/bin/xcatclient opt/xcat/bin/rmflexnode
|
||||
opt/xcat/bin/xcatclient opt/xcat/bin/mkflexnode
|
||||
opt/xcat/bin/xcatclient opt/xcat/bin/getadapter
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/bin/lsslp
|
||||
opt/xcat/bin/xcatclient opt/xcat/bin/imgcapture
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/bin/swapnodes
|
||||
@@ -126,6 +125,7 @@ opt/xcat/bin/xcatclientnnr opt/xcat/bin/rmzone
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/bin/slpdiscover
|
||||
opt/xcat/bin/xcatclient opt/xcat/bin/xCATWorld
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/bin/switchdiscover
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/bin/pdudiscover
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/bin/bmcdiscover
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/bin/makentp
|
||||
opt/xcat/bin/xcatclientnnr opt/xcat/sbin/rescanplugins
|
||||
|
@@ -1,83 +0,0 @@
|
||||
=head1 NAME
|
||||
|
||||
B<getadapter> - Obtain all network adapters's predictable name and some other information before provision or network configuration.
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
B<getadapter> I<noderange> [B<-f>]
|
||||
|
||||
B<getadapter> [B<-h>|B<--help>|B<-v>|B<--version>|B<-V>]
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
Traditionally, network interfaces in Linux are enumerated as eth[0123...], but these names do not necessarily correspond to actual labels on the chassis. B<getadapter> help customer to get predictable network device name and some other network adapter information before provision or network configuration.
|
||||
|
||||
B<getadapter> use genesis to collect network adapters information, so that mean it need to restart the target node.
|
||||
|
||||
B<getadapter> For each node within the <noderange>, follows below scheme:
|
||||
|
||||
If the target node is scanned for the first time, B<getadapter> will trigger genesis to collect information then save the information at the B<nicsadapter> column of nics table.
|
||||
If the target node has ever been scanned, B<getadapter> will use the information from nics table first.
|
||||
If user hopes to scan the adapter information for the node but these information already exist, B<-f> option can be used to start rescan process.
|
||||
|
||||
B<getadapter> tries to collect more information for the target network device, but doesn't guarantee collect same much information for every network device.
|
||||
|
||||
Below are the possible information can be collect up to now:
|
||||
B<name>: the consistent name which can be used by confignic directly in operating system which follow the same naming scheme with rhels7
|
||||
B<pci>: the pci location
|
||||
B<mac>: the MAC address
|
||||
B<candidatename>: All the names which satisfy predictable network device naming scheme. I<(if xcat enhance confignic command later, user can use these names to configure their network adapter, even customize their name)>
|
||||
B<vender>: the vender of network device
|
||||
B<model>: the model of network device
|
||||
B<linkstate>: the link state of network device
|
||||
|
||||
=head1 OPTIONS
|
||||
|
||||
B<-h>
|
||||
|
||||
Display usage message.
|
||||
|
||||
B<-v>
|
||||
|
||||
Command Version.
|
||||
|
||||
B<-V>
|
||||
|
||||
Display verbose message.
|
||||
|
||||
B<-f>
|
||||
|
||||
Force to trigger new round scan. ignore the data collected before.
|
||||
|
||||
|
||||
=head1 EXAMPLES
|
||||
|
||||
1. To collect node[1-3]'s network device information, enter:
|
||||
|
||||
getadapter node[1-2]
|
||||
|
||||
Output is similar to:
|
||||
|
||||
-->Starting scan for: node1,node2
|
||||
The whole scan result:
|
||||
--------------------------------------
|
||||
[node1]: Adapter information exists, no need to scan.
|
||||
--------------------------------------
|
||||
[node2] scan successfully, below are the latest data
|
||||
node2:[1]->eno1!mac=34:40:b5:be:6a:80|pci=/pci0000:00/0000:00:01.0/0000:0c:00.0|candidatename=eno1/enp12s0f0/enx3440b5be6a80
|
||||
node2:[2]->enp0s29u1u1u5!mac=36:40:b5:bf:44:33|pci=/pci0000:00/0000:00:1d.0/usb2/2-1/2-1.1/2-1.1.5/2-1.1.5:1.0|candidatename=enp0s29u1u1u5/enx3640b5bf4433
|
||||
|
||||
Every node gets a separate section to display its all network adapters information, every network adapter owns single line which start as node name and followed by index and other information.
|
||||
|
||||
|
||||
2. Force to trigger new round scan
|
||||
|
||||
getadatper node -f
|
||||
|
||||
|
||||
|
||||
=head1 SEE ALSO
|
||||
|
||||
L<noderange(3)|noderange.3>
|
||||
|
||||
|
@@ -9,7 +9,7 @@ B<pgsqlsetup> {B<-h> | B<--help>}
|
||||
|
||||
B<pgsqlsetup> {B<-v> | B<--version>}
|
||||
|
||||
B<pgsqlsetup> {B<-i> | B<--init>} [B<-N> | B<--nostart>] [B<-P> | B<--PCM>] [B<-o> | B<--odbc>] [B<-V> | B<--verbose>]
|
||||
B<pgsqlsetup> {B<-i> | B<--init>} [B<-N> | B<--nostart>] [B<--listen> | B<-l> I<address>] [B<--access> | B<-a> I<address>] [B<-P> | B<--PCM>] [B<-o> | B<--odbc>] [B<-V> | B<--verbose>]
|
||||
|
||||
B<pgsqlsetup> {B<-o> | B<--setupODBC>} [B<-V> | B<--verbose>]
|
||||
|
||||
@@ -38,7 +38,7 @@ Displays verbose messages.
|
||||
|
||||
The init option is used to setup an installed PostgreSQL database so that xCAT can use the database. This involves creating the xcat database, the xcat admin id, allowing access to the xcatdb database by the Management Node. It customizes the postgresql.conf configuration file, adds the management server to the pg_hba.conf and starts the PostgreSQL server. It also backs up the current xCAT database and restores it into the newly setup xcatdb PostgreSQL database. It creates the /etc/xcat/cfgloc file to point the xcatd daemon to the PostgreSQL database and restarts the xcatd daemon using the database.
|
||||
On AIX, it additionally setup the xcatadm unix id and the postgres id and group. For AIX, you should be using the PostgreSQL rpms available from the xCAT website. For Linux, you should use the PostgreSQL rpms shipped with the OS. You can chose the -o option, to run after the init.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, edit the pg_hba.conf file.
|
||||
To add additional nodes to access the PostgreSQL server, setup on the Management Node, use the -a option.
|
||||
|
||||
For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB
|
||||
|
||||
@@ -46,6 +46,14 @@ For more documentation see:Setting_Up_PostgreSQL_as_the_xCAT_DB
|
||||
|
||||
This option with the -i flag will create the database, but will not backup and restore xCAT tables into the database. It will create the cfgloc file such that the next start of xcatd will try and contact the database. This can be used to setup the xCAT PostgreSQL database during or before install.
|
||||
|
||||
=item B<-l|--listen> I<address>
|
||||
|
||||
This option is used to specify additional IP addresses on which the PostgreSQL database will listen. Without it, only localhost (on Linux) and the management node's main IP (on Linux and AIX) will be configured. This option can be specified multiple times.
|
||||
|
||||
=item B<-a|--access> I<address>
|
||||
|
||||
This option is used to specify additional IP addresses from which the service nodes will connect to the PostgreSQL database. Without it, only the management node will be configured for database access. This option can be specified multiple times.
|
||||
|
||||
=item B<-P|--PCM>
|
||||
|
||||
This option sets up PostgreSQL database to be used with xCAT running with PCM.
|
||||
|
@@ -1,6 +1,6 @@
|
||||
=head1 Name
|
||||
|
||||
B<rflash> - Performs Licensed Internal Code (LIC) update support for HMC-attached POWER5 and POWER6 Systems, and POWER7 systems using Direct FSP management. B<rflash> is also able to update firmware for NextScale Fan Power Controllers (FPC).
|
||||
B<rflash> - Performs Licensed Internal Code (LIC) update or firmware update on supported xCAT managed nodes.
|
||||
|
||||
=head1 B<Synopsis>
|
||||
|
||||
@@ -22,9 +22,13 @@ B<rflash> I<noderange> {B<--commit>|B<--recover>}
|
||||
|
||||
B<rflash> I<noderange> I<http_directory>
|
||||
|
||||
=head2 OpenPOWER BMC specific:
|
||||
=head2 OpenPOWER BMC specific (using IPMI):
|
||||
|
||||
B<rflash> I<noderange> I<hpm_file_path> [B<-c>|B<--check>] [B<--retry=>I<count>] [B<-V>]
|
||||
B<rflash> I<noderange> [I<hpm_file_path> | B<-d=>I<data_directory>] [B<-c>|B<--check>] [B<--retry=>I<count>] [B<-V>]
|
||||
|
||||
=head2 OpenPOWER OpenBMC specific :
|
||||
|
||||
B<rflash> I<noderange> [I<tar_file_path> | I<image_id>] [B<-c>|B<--check>] [B<-a>|B<--activate>] [B<-l>|B<--list>] [B<-u>|B<--upload>] [B<-d>|B<--delete>]
|
||||
|
||||
=head1 B<Description>
|
||||
|
||||
@@ -38,6 +42,7 @@ The I<noderange> can be an CEC or CEC list, a Lpar or Lpar list and a Frame or F
|
||||
|
||||
The command will update firmware for NeXtScale FPC when given an FPC node and the http information needed to access the firmware.
|
||||
|
||||
|
||||
=head2 PPC (with HMC) specific:
|
||||
|
||||
The B<rflash> command uses the B<xdsh> command to connect to the HMC controlling the given managed system and perform the updates. Before running B<rflash>, use B<rspconfig> to check if the related HMC ssh is enabled. To enable a HMC ssh connection, use B<rspconfig> command.
|
||||
@@ -78,9 +83,15 @@ For more details about the Firmware Update using Direct FSP/BPA Management, refe
|
||||
|
||||
The command will update firmware for NeXtScale FPC when given an FPC node and the http information needed to access the firmware. The http information required includes both the MN IP address as well as the directory containing the firmware. It is recommended that the firmware be downloaded and placed in the /install directory structure as the xCAT MN /install directory is configured with the correct permissions for http. Refer to the doc to get more details: XCAT_NeXtScale_Clusters
|
||||
|
||||
=head2 OpenPOWER specific:
|
||||
=head2 OpenPOWER specific (using IPMI):
|
||||
|
||||
The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and the hpm1 formatted file path.
|
||||
The command will update firmware for OpenPOWER BMC when given an OpenPOWER node and either the hpm formatted file path or path to a data directory.
|
||||
B<Note:> When using B<rflash> in hierarchical environment, the hpm file or data directory must be accessible from Service Nodes.
|
||||
|
||||
=head2 OpenPOWER OpenBMC specific:
|
||||
|
||||
The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER node and either an update .tar file or an uploaded image id.
|
||||
B<Note:> When using B<rflash> in hierarchical environment, the .tar file must be accessible from Service Nodes.
|
||||
|
||||
=head1 B<Options>
|
||||
|
||||
@@ -92,7 +103,7 @@ Writes the command's usage statement to standard output.
|
||||
|
||||
=item B<-c|--check>
|
||||
|
||||
Check the firmware version of BMC and HPM file.
|
||||
Check the firmware version of BMC and an update file.
|
||||
|
||||
=item B<-p> I<directory>
|
||||
|
||||
@@ -102,6 +113,10 @@ Specifies the directory where the packages are located.
|
||||
|
||||
Specifies the directory where the raw data from rpm packages for each CEC/Frame are located. The default directory is /tmp. The option is only used in Direct FSP/BPA Management.
|
||||
|
||||
=item B<-d=>I<data_directory>
|
||||
|
||||
Used for IBM Power S822LC for Big Data systems only. Specifies the directory where the B<pUpdate> utility and at least one of BMC or PNOR update files are located. The utility and update files can be downloaded from FixCentral.
|
||||
|
||||
=item B<--activate> {B<concurrent> | B<disruptive>}
|
||||
|
||||
Must be specified to activate the new Licensed Internal Code. The "disruptive" option will cause the target systems to be recycled. Without this flag, LIC updates will be installed only, not activated.
|
||||
@@ -118,6 +133,22 @@ Used to recover the flash image in the permanent side of the chip to the tempora
|
||||
|
||||
Specify number of times to retry the update if failure is detected. Default value is 2. Value of 0 can be used to indicate no retries.
|
||||
|
||||
=item B<-a|--activate>
|
||||
|
||||
Activate update image. Image id must be specified.
|
||||
|
||||
=item B<-l|--list>
|
||||
|
||||
List currently uploaded update images. "(*)" indicates currently active image.
|
||||
|
||||
=item B<-u|--upload>
|
||||
|
||||
Upload update image. Specified file must be in .tar format.
|
||||
|
||||
=item B<-d|--delete>
|
||||
|
||||
Delete update image from BMC
|
||||
|
||||
=item B<-v|--version>
|
||||
|
||||
Displays the command's version.
|
||||
@@ -167,6 +198,11 @@ Print verbose message to rflash log file (/var/log/xcat/rflash/fs3.log) when upd
|
||||
|
||||
rflash fs3 /firmware/8335_810.1543.20151021b_update.hpm -V
|
||||
|
||||
=item 6.
|
||||
To update the firmware on IBM Power S822LC for Big Data machine specify the node name and the file path of the data directory containing pUpdate utility and BMC and/or PNOR update files:
|
||||
|
||||
rflash briggs01 -d=/root/supermicro/OP825
|
||||
|
||||
=back
|
||||
|
||||
=head1 B<Location>
|
||||
|
@@ -8,7 +8,7 @@ B<rinv> [B<-h>|B<--help>|B<-v>|B<--version>]
|
||||
|
||||
=head2 BMC/MPA specific:
|
||||
|
||||
B<rinv> I<noderange> {B<pci>|B<model>|B<serial>|B<asset>|B<vpd>|B<mprom>|B<deviceid>|B<guid>|B<firm>|B<diag>|B<dimm>|B<bios>|B<mparom>|B<mac>|B<all>}
|
||||
B<rinv> I<noderange> [B<model>|B<serial>|B<asset>|B<vpd>|B<deviceid>|B<guid>|B<firm>|B<dimm>|B<mprom>|B<all>]
|
||||
|
||||
=head2 OpenPOWER (IPMI) server specific:
|
||||
|
||||
@@ -16,7 +16,7 @@ B<rinv> I<noderange> [B<model>|B<serial>|B<deviceid>|B<uuid>|B<guid>|B<vpd>|B<mp
|
||||
|
||||
=head2 OpenPOWER (OpenBMC) server specific:
|
||||
|
||||
B<rinv> I<noderange> [B<model>|B<serial>|B<firm>|B<cpu>|B<dimm>|B<all>]
|
||||
B<rinv> I<noderange> [B<model>|B<serial>|B<firm>|B<cpu>|B<dimm>|B<all>] [B<-V>|B<--verbose>]
|
||||
|
||||
=head2 PPC (with HMC) specific:
|
||||
|
||||
@@ -40,7 +40,6 @@ B<rinv> I<noderange> [B<-t>]
|
||||
|
||||
B<rinv> I<noderange>
|
||||
|
||||
|
||||
=head2 zVM specific:
|
||||
|
||||
B<rinv> I<noderange> [B<config>|B<all>]
|
||||
@@ -78,18 +77,13 @@ Calling B<rinv> for VMware will display the UUID/GUID, number of CPUs, amount of
|
||||
|
||||
=over 7
|
||||
|
||||
=item B<pci>
|
||||
|
||||
Retrieves PCI bus information.
|
||||
|
||||
=item B<bus>
|
||||
|
||||
List all buses for each I/O slot.
|
||||
|
||||
=item B<config>
|
||||
|
||||
Retrieves number of processors, speed, total memory, and DIMM
|
||||
locations.
|
||||
Retrieves number of processors, speed, total memory, and DIMM locations.
|
||||
|
||||
=item B<model>
|
||||
|
||||
@@ -113,7 +107,7 @@ To output the raw information of deconfigured resources for CEC.
|
||||
|
||||
=item B<asset>
|
||||
|
||||
Retrieves asset tag. Usually it's the MAC address of eth0.
|
||||
Retrieves asset tag. Usually it's the MAC address of eth0.
|
||||
|
||||
=item B<vpd>
|
||||
|
||||
@@ -127,6 +121,10 @@ Diagnostics information of firmware.
|
||||
|
||||
Retrieves mprom firmware level.
|
||||
|
||||
=item B<dimm>
|
||||
|
||||
Retrieves dual in-line memory module information.
|
||||
|
||||
=item B<deviceid>
|
||||
|
||||
Retrieves device identification. Usually device, manufacturing and product IDs.
|
||||
@@ -151,6 +149,10 @@ Print help.
|
||||
|
||||
Print version.
|
||||
|
||||
=item B<-V>|B<--verbose>
|
||||
|
||||
Prints verbose output, if available.
|
||||
|
||||
=item B<-t>
|
||||
|
||||
Set the values in the vm table to what vCenter has for the indicated nodes.
|
||||
|
@@ -22,7 +22,7 @@ B<rpower> I<noderange> [B<pduon>|B<pduoff>|B<pdustat>|B<pdureset>]
|
||||
|
||||
=head2 OpenPOWER OpenBMC:
|
||||
|
||||
B<rpower> I<noderange> [B<off>|B<on>|B<reset>|B<boot>|B<stat>|B<state>|B<status>]
|
||||
B<rpower> I<noderange> [B<off>|B<on>|B<softoff>|B<reset>|B<boot>|B<bmcreboot>|B<bmcstate>|B<stat>|B<state>|B<status>]
|
||||
|
||||
=head2 PPC (with IVM or HMC) specific:
|
||||
|
||||
@@ -247,6 +247,14 @@ To pause all processes in the instance.
|
||||
|
||||
To unpause all processes in the instance.
|
||||
|
||||
=item B<bmcreboot>
|
||||
|
||||
To reboot BMC.
|
||||
|
||||
=item B<bmcstate>
|
||||
|
||||
To get state of the BMC.
|
||||
|
||||
=item B<state>
|
||||
|
||||
To get state of the instance.
|
||||
|
@@ -24,7 +24,7 @@ B<rspconfig> I<noderange> B<garp>=I<time>
|
||||
|
||||
=head2 OpenBMC specific:
|
||||
|
||||
B<rspconfig> I<noderange> {B<ip>|B<netmask>|B<gateway>|B<vlan>}
|
||||
B<rspconfig> I<noderange> {B<ip>|B<netmask>|B<gateway>|B<vlan>|B<sshcfg>}
|
||||
|
||||
=head2 MPA specific:
|
||||
|
||||
@@ -204,8 +204,7 @@ B<rspconfig> I<noderange> B<--resetnet>
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
B<rspconfig> configures various settings in the nodes' service processors. If only a keyword is
|
||||
specified, without the B<=>, it displays the current value.
|
||||
B<rspconfig> configures various settings in the nodes' service processors.
|
||||
|
||||
For options B<autopower>|B<iocap>|B<decfg>|B<memdecfg>|B<procdecfg>|B<time>|B<date>|B<spdump>|B<sysdump>|B<network>, user need to use I<chdef -t site enableASMI=yes> to enable ASMI first.
|
||||
|
||||
@@ -390,6 +389,10 @@ Performs a service processor dump.
|
||||
|
||||
Enable or disable SSH on MPA.
|
||||
|
||||
=item B<sshcfg>
|
||||
|
||||
Copy SSH keys.
|
||||
|
||||
=item B<swnet>={[I<ip>],[I<gateway>],[I<netmask>]}
|
||||
|
||||
Set the Switch network parameters.
|
||||
|
@@ -4,7 +4,7 @@ B<sinv> - Checks the software configuration of the nodes in the cluster.
|
||||
|
||||
=head1 B<SYNOPSIS>
|
||||
|
||||
B<sinv> [B<-o> I<output>] [B<-p> I<template path>] [B<-t> I<template count>] [B<-s> I<seed node>] [B<-i>] [B<-e>] [B<-r>] [B<-V>] [B<--devicetype> I<type_of_device>] [B<-l> I<userID>] [[B<-f> I<command file>] | [B<-c> I<command>]]
|
||||
B<sinv> [B<-o> I<output>] B<-p> I<template path> [B<-t> I<template count>] [B<-s> I<seed node>] [B<-i>] [B<-e>] [B<-r>] [B<-V>] [B<--devicetype> I<type_of_device>] [B<-l> I<userID>] {B<-f> I<command file> | B<-c> I<command>}
|
||||
|
||||
B<sinv> [B<-h> | B<-v>]
|
||||
|
||||
@@ -12,9 +12,9 @@ B<sinv> [B<-h> | B<-v>]
|
||||
=head1 B<DESCRIPTION>
|
||||
|
||||
The B<sinv> command is designed to check the configuration of the nodes in a cluster.
|
||||
The command takes as input command line flags, and one or more templates which will be compared against the output of the xdsh command, designated to be run by the -c or -f flag, on the nodes in the noderange.
|
||||
The command takes as input command line flags, and one or more templates which will be compared against the output of the B<xdsh> command, designated to be run by the B<-c> or B<-f> flag, on the nodes in the noderange.
|
||||
|
||||
The nodes will then be grouped according to the template they match and a report returned to the administrator in the output file designated by the -o flag, or to stdout.
|
||||
The nodes will then be grouped according to the template they match and a report returned to the administrator in the output file designated by the B<-o> flag, or to stdout.
|
||||
|
||||
B<sinv> supports checking the output from the B<rinv> or B<xdsh> command.
|
||||
|
||||
@@ -24,14 +24,14 @@ The B<sinv> command is an xCAT Distributed Shell Utility.
|
||||
|
||||
B<COMMAND> B<SPECIFICATION>:
|
||||
|
||||
The xdsh or rinv command to execute on the remote targets is specified by the B<-c> flag, or by the B<-f> flag
|
||||
The B<xdsh> or B<rinv> command to execute on the remote targets is specified by the B<-c> flag, or by the B<-f> flag
|
||||
which is followed by the fully qualified path to a file containing the command.
|
||||
|
||||
|
||||
Note: do not add | xdshcoll to the command on the command line or in the
|
||||
command file, it is automatically added by sinv.
|
||||
Note: do not add B<| xdshcoll> to the command on the command line or in the
|
||||
command file, it is automatically added by B<sinv>.
|
||||
|
||||
The syntax for the B<-c> B<sinv> parameter is as follows:
|
||||
The syntax for the B<-c> parameter is as follows:
|
||||
|
||||
"I<command>[; I<command>]..."
|
||||
|
||||
@@ -45,9 +45,9 @@ those that read from standard input.
|
||||
|
||||
B<REMOTE> B<SHELL> B<COMMAND>:
|
||||
|
||||
For xdsh, support is explicitly provided
|
||||
for AIX Remote Shell and OpenSSH, but any secure remote command that
|
||||
conforms to the IETF (Internet Engineering Task Force) Secure Remote
|
||||
For B<xdsh>, support is explicitly provided
|
||||
for AIX Remote Shell and OpenSSH, but any secure remote command that
|
||||
conforms to the IETF (Internet Engineering Task Force) Secure Remote
|
||||
Command Protocol can be used. See man B<xdsh> for more details.
|
||||
|
||||
=head1 B<OPTIONS>
|
||||
@@ -56,37 +56,33 @@ Command Protocol can be used. See man B<xdsh> for more details.
|
||||
|
||||
=item B<-o>|B<--output> I<report output file>
|
||||
|
||||
Optional output file. This is the location of the file that will contain the report of the nodes that match, and do not match, the input templates.
|
||||
If the flag is not used, the output will go to stdout.
|
||||
Optional output file. This is the location of the file that will contain the report of the nodes that match, and do not match, the input templates. If the flag is not used, the output will go to stdout.
|
||||
|
||||
=item B<-p>|B<--tp> I<template path>
|
||||
|
||||
This is the path to the template file. The template contains the output
|
||||
of xdsh command, that has been run against a "seed" node, a node
|
||||
that contains the configuration that you would like
|
||||
all nodes in your noderange to match.
|
||||
of B<xdsh> or B<rinv> command, that has been run against a "seed" node, a node
|
||||
that contains the configuration that you would like all nodes in your noderange to match.
|
||||
|
||||
The admin can create the template by running the xdsh command on
|
||||
the seed node, pipe to xdshcoll ( required) and store the output
|
||||
The admin can create the template by running the B<xdsh> or B<rinv> command on
|
||||
the seed node, pipe to B<xdshcoll> (required) and store the output
|
||||
in the template path. See examples.
|
||||
|
||||
B<Note:> The admin can also edit the
|
||||
template to remove any lines that they do not want checked.
|
||||
B<Note:> The admin can also edit the template to remove any lines that they do not want checked.
|
||||
|
||||
An alternative method is to use the [B<-s> I<seed node>] parameter,
|
||||
which will automatically build the template for you from the
|
||||
seed node named.
|
||||
|
||||
If a template path file does not exist, and a seed node is not input,
|
||||
then sinv will automatically use the one node in the noderange as
|
||||
the seed node and build the template.
|
||||
If a a seed node is not provided, then command will automatically use the first node in the noderange as
|
||||
the seed node.
|
||||
|
||||
|
||||
=item B<-t>|B<--tc> I<template count>
|
||||
|
||||
This count is the number of templates that the command will use
|
||||
to check for nodes matches. If the template in the template path does not
|
||||
match a node, the B<sinv> will check additional templates up
|
||||
match a node, the B<sinv> will check additional templates up
|
||||
to the template count.
|
||||
|
||||
For each node, it will compare the node against each template to see if
|
||||
@@ -104,9 +100,8 @@ This is the node that will be used to build the first template
|
||||
that is stored in template path. You can use this parameter instead of running
|
||||
the command yourself to build the template.
|
||||
|
||||
B<Note:> If the template path file does not exist, and no seed node is
|
||||
supplied, the seed node automatically is one node in the
|
||||
noderange.
|
||||
B<Note:> If no seed node is supplied, the first node in the noderange is automatically
|
||||
selected as a seed node.
|
||||
|
||||
|
||||
=item B<-i>|B<--ignorefirst>
|
||||
@@ -121,9 +116,9 @@ configuration.
|
||||
|
||||
This requires the check of node output against template to be an exact match.
|
||||
If this flag is not set, B<sinv> checks to see if the return from the
|
||||
xdsh command to the nodes contain a match for each line in the input
|
||||
B<xdsh> or B<rinv> command to the nodes contain a match for each line in the input
|
||||
template (except for xdshcoll header and comments). If not in exactmatch mode,
|
||||
there can exist more lines in the xdsh return from the nodes.
|
||||
there can be more lines in the B<xdsh> or B<rinv> return from the nodes.
|
||||
|
||||
For example, if running a "rpm -qa | grep xCAT" command, without exactmatch
|
||||
set, if the node contains more xCAT rpms that listed in the template,
|
||||
@@ -153,30 +148,30 @@ Specifies a remote user name to use for remote command execution.
|
||||
|
||||
=item B<-c>|B<--command>
|
||||
|
||||
The xdsh or rinv command that will be run. The command should be enclosed in
|
||||
double quotes to insure correct shell interpretation. This parameter must only contain, the node range or the image path (Linux) or spot name for AIX. It cannot be used to set additional input flags to xdsh or rinv (for example -s,-T,-e). See examples below.
|
||||
The B<xdsh> or B<rinv> command that will be run. The command should be enclosed in
|
||||
double quotes to insure correct shell interpretation. This parameter must only contain, the node range or the image path (Linux) or spot name for AIX. It cannot be used to set additional input flags to B<xdsh> or B<rinv> (for example B<-s>,B<-T>,B<-e>). See examples below.
|
||||
|
||||
B<Note:> do not add the | xdshcoll to the command,
|
||||
it is automatically added by sinv. sinv also automatically sets the -v flag for xdsh.
|
||||
B<Note:> do not add the B<| xdshcoll> to the command,
|
||||
it is automatically added by B<sinv>. B<sinv> also automatically sets the B<-v> flag for B<xdsh>.
|
||||
|
||||
=item B<-f>|B<--file>
|
||||
|
||||
The file containing the xdsh or rinv command that will be run.
|
||||
The file containing the B<xdsh> or B<rinv> command that will be run.
|
||||
This should be the fully qualified name of the file.
|
||||
|
||||
B<Note:> do not add the | xdshcoll to the command in the file,
|
||||
it is automatically added by sinv.
|
||||
B<Note:> do not add the B<| xdshcoll> to the command in the file,
|
||||
it is automatically added by B<sinv>.
|
||||
|
||||
=item B<-r>|B<--remove>
|
||||
|
||||
This flag indicates that generated templates should be removed at the
|
||||
at the end of the B<sinv> command execution.
|
||||
|
||||
If the flag is input, then all templates that are generated by the B<sinv>
|
||||
If the flag is specified, then all templates that are generated by the B<sinv>
|
||||
command, will be removed. If the first template is created by the admin,
|
||||
it will not be removed.
|
||||
|
||||
If the flag is not input, no
|
||||
If the flag is not specified, no
|
||||
templates will be removed. It is up to the admin to cleanup templates.
|
||||
|
||||
=item B<-h>|B<--help>
|
||||
@@ -200,48 +195,48 @@ Verbose mode.
|
||||
=over 3
|
||||
|
||||
=item 1.
|
||||
To setup sinv.template (name optional) for input to the B<sinv> command , enter:
|
||||
To setup sinv.template (name optional) for input to the B<sinv> command, enter:
|
||||
|
||||
xdsh node1,node2 "rpm -qa | grep ssh " | xdshcoll > /tmp/sinv.template
|
||||
|
||||
Note: when setting up the template the output of xdsh must be piped to xdshcoll, sinv processing depends on it.
|
||||
Note: when setting up the template the output of B<xdsh> must be piped to B<xdshcoll>, B<sinv> processing depends on it.
|
||||
|
||||
=item 2.
|
||||
To setup rinv.template for input to the B<sinv> command , enter:
|
||||
|
||||
rinv node1-node2 serial | xdshcoll > /tmp/rinv.template
|
||||
|
||||
Note: when setting up the template the output of rinv must be piped to xdshcoll, sinv processing depends on it.
|
||||
Note: when setting up the template the output of B<rinv> must be piped to B<xdshcoll>, B<sinv> processing depends on it.
|
||||
|
||||
=item 3.
|
||||
To execute B<sinv> using the sinv.template generated above
|
||||
on the nodegroup, B<testnodes> ,possibly generating up to two
|
||||
on the nodegroup, I<testnodes> ,possibly generating up to two
|
||||
new templates, and removing all generated templates in the end, and writing
|
||||
output report to /tmp/sinv.output, enter:
|
||||
|
||||
sinv -c "xdsh testnodes rpm -qa | grep ssh" -p /tmp/sinv.template -t 2 -r -o /tmp/sinv.output
|
||||
|
||||
Note: do not add the pipe to xdshcoll on the -c flag, it is automatically added by the sinv routine.
|
||||
Note: do not add the pipe to B<xdshcoll> on the B<-c> flag, it is automatically added by the B<sinv>.
|
||||
|
||||
=item 4.
|
||||
To execute B<sinv> on noderange, node1-node4, using the seed node, node8,
|
||||
to generate the first template, using the xdsh command (-c),
|
||||
To execute B<sinv> on noderange, I<node1-node4>, using the seed node, I<node8>,
|
||||
to generate the first template, using the B<xdsh> command (B<-c>),
|
||||
possibly generating up to two additional
|
||||
templates and not removing any templates at the end, enter:
|
||||
|
||||
sinv -c "xdsh node1-node4 lslpp -l | grep bos.adt" -s node8 -p /tmp/sinv.template -t 2 -o /tmp/sinv.output
|
||||
|
||||
=item 5.
|
||||
To execute B<sinv> on noderange, node1-node4, using the seed node, node8,
|
||||
to generate the first template, using the rinv command (-c),
|
||||
To execute B<sinv> on noderange, I<node1-node4>, using the seed node, I<node8>,
|
||||
to generate the first template, using the B<rinv> command (B<-c>),
|
||||
possibly generating up to two additional
|
||||
templates and removing any generated templates at the end, enter:
|
||||
|
||||
sinv -c "rinv node1-node4 serial" -s node8 -p /tmp/sinv.template -t 2 -r -o /tmp/rinv.output
|
||||
|
||||
=item 6.
|
||||
To execute B<sinv> on noderange, node1-node4, using node1 as
|
||||
the seed node, to generate the sinv.template from the xdsh command (-c),
|
||||
To execute B<sinv> on noderange, I<node1-node4>, using I<node1> as
|
||||
the seed node, to generate the sinv.template from the B<xdsh> command (B<-c>),
|
||||
using the exact match option, generating no additional templates, enter:
|
||||
|
||||
sinv -c "xdsh node1-node4 lslpp -l | grep bos.adt" -s node1 -e -p /tmp/sinv.template -o /tmp/sinv.output
|
||||
@@ -250,11 +245,11 @@ Note: the /tmp/sinv.template file must be empty, otherwise it will be used
|
||||
as an admin generated template.
|
||||
|
||||
=item 7.
|
||||
To execute B<sinv> on the Linux osimage defined for cn1. First build a template from the /etc/hosts on the node. Then run sinv to compare.
|
||||
To execute B<sinv> on the Linux osimage defined for cn1. First build a template from the /etc/hosts on the node. Then run B<sinv> to compare.
|
||||
|
||||
xdsh cn1 "cat /etc/hosts" | xdshcoll > /tmp/sinv2/template"
|
||||
|
||||
sinv -c "xdsh -i /install/netboot/rhels6/ppc64/test_ramdisk_statelite/rootimg cat /etc/hosts" -e -t1 -p /tmp/sinv.template -o /tmp/sinv.output
|
||||
sinv -c "xdsh -i /install/netboot/rhels6/ppc64/test_ramdisk_statelite/rootimg cat /etc/hosts" -e -t 1 -p /tmp/sinv.template -o /tmp/sinv.output
|
||||
|
||||
=item 8.
|
||||
|
||||
|
@@ -36,6 +36,12 @@ B<noderange> is a syntax that can be used in most xCAT commands to
|
||||
conveniently specify a list of nodes. The result is that the command will
|
||||
be applied to a range of nodes, often in parallel.
|
||||
|
||||
If you invoke xCAT B<noderange> from a shell you may need to quote the
|
||||
B<noderange> if the shell would otherwise treat the punctuation marks in
|
||||
the B<noderange> as control operators. The affected punctuation marks may
|
||||
include Asterisk (`*'), Left Square Bracket (`[') , Right Square Bracket
|
||||
(`]'), Circumflex Accent (`^'), and Overline (`~').
|
||||
|
||||
B<noderange> is a comma-separated list. Each token (text between commas)
|
||||
in the list can be any of the forms listed below:
|
||||
|
||||
@@ -231,6 +237,11 @@ Generate a list of nodes in the 1st two frames:
|
||||
|
||||
=back
|
||||
|
||||
=head1 B<Bugs>
|
||||
|
||||
The special characters used by xCAT B<noderange> are also special characters
|
||||
to many shell programs. In particular, the characters `*', `[', `]', `^',
|
||||
and `~' may have to be escaped from the shell.
|
||||
|
||||
=head1 B<SEE ALSO>
|
||||
|
||||
|
@@ -4,7 +4,7 @@ B<nodeset> - set the boot state for a noderange
|
||||
|
||||
=head1 B<Synopsis>
|
||||
|
||||
B<nodeset> I<noderange> [B<boot> | B<stat> | B<offline> | B<runcmd=bmcsetup> | B<osimage>[=I<imagename>] | B<shell> | B<shutdown>]
|
||||
B<nodeset> I<noderange> [B<boot> | B<stat> [B<-a>]| B<offline> | B<runcmd=bmcsetup> | B<osimage>[=I<imagename>] | B<shell> | B<shutdown>] [B<-V>|B<--verbose>]
|
||||
|
||||
B<nodeset> I<noderange> B<osimage>[=I<imagename>] [B<--noupdateinitrd>] [B<--ignorekernelchk>]
|
||||
|
||||
@@ -21,10 +21,16 @@ changing the network boot files. Each xCAT node always boots from the
|
||||
network and downloads a boot file with instructions on what action to
|
||||
take next.
|
||||
|
||||
B<nodeset> will manipulate the boot configuration files of yaboot and pxelinux.0.
|
||||
B<nodeset> will manipulate the boot configuration files of xnba, grub2, petitboot, yaboot and pxelinux.0.
|
||||
|
||||
Assume that /tftpboot is the root for tftpd (set in L<site(5)|site.5>).
|
||||
|
||||
B<nodeset> for petitboot makes changes to /tftpboot/petitboot/{node name}
|
||||
|
||||
B<nodeset> for xnba makes changes to /tftpboot/xcat/xnba/nodes/{node name}
|
||||
|
||||
B<nodeset> for grub2 makes changes to /tftpboot/boot/grub2/{node name}
|
||||
|
||||
B<nodeset> for pxe makes changes to /tftpboot/pxelinux.cfg/{node hex ip}
|
||||
|
||||
B<nodeset> for yaboot makes changes to /tftpboot/etc/{node hex ip}
|
||||
@@ -34,6 +40,8 @@ B<nodeset> only sets the next boot state, but does not reboot.
|
||||
B<nodeset> is called by B<rinstall> and B<winstall> and is also called by the
|
||||
installation process remotely to set the boot state back to "boot".
|
||||
|
||||
In a hierarchical cluster managed by service nodes, B<nodeset> command is used to make sure compute node states are consistent on service and management nodes. When errors are reported, run the command with verbose mode. And the command will display additional service node information, which might be useful in identifying the problem.
|
||||
|
||||
A user can supply their own scripts to be run on the mn or on the service node (if a hierarchical cluster) for a node when the nodeset command is run. Such scripts are called B<prescripts>. They should be copied to /install/prescripts directory. A table called I<prescripts> is used to specify the scripts and their associated actions. The scripts to be run at the beginning of the nodeset command are stored in the 'begin' column of I<prescripts> table. The scripts to be run at the end of the nodeset command are stored in the 'end' column of I<prescripts> table. You can run 'tabdump -d prescripts' command for details. The following two environment variables will be passed to each script: NODES contains all the names of the nodes that need to run the script for and ACTION contains the current nodeset action. If I<#xCAT setting:MAX_INSTANCE=number> is specified in the script, the script will get invoked for each node in parallel, but no more than I<number> of instances will be invoked at a time. If it is not specified, the script will be invoked once for all the nodes.
|
||||
|
||||
|
||||
@@ -68,7 +76,7 @@ If you would like to run a task after deployment, you can define that task with
|
||||
|
||||
=item B<stat>
|
||||
|
||||
Display the current boot loader config file description for the nodes requested
|
||||
Display the current boot loader config file description for the nodes requested. When B<disjointdhcps> is set, using B<-a> to display them on all available service nodes.
|
||||
|
||||
=item B<runcmd=bmcsetup>
|
||||
|
||||
@@ -84,6 +92,10 @@ The node will also be able to be sshed into and have utilities such as wget, tft
|
||||
|
||||
To make the node to get into power off status. This status only can be used after B<runcmd> and B<runimage> to power off the node after the performing of operations.
|
||||
|
||||
=item B<-V>|B<--verbose>
|
||||
|
||||
Verbose mode.
|
||||
|
||||
=item B<-h>|B<--help>
|
||||
|
||||
Print help.
|
||||
|
@@ -177,9 +177,9 @@ ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/lstree
|
||||
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/lsflexnode
|
||||
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/rmflexnode
|
||||
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/mkflexnode
|
||||
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/getadapter
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/lsslp
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/switchdiscover
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/pdudiscover
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/bmcdiscover
|
||||
ln -sf ../bin/xcatclientnnr $RPM_BUILD_ROOT/%{prefix}/bin/makentp
|
||||
ln -sf ../bin/xcatclient $RPM_BUILD_ROOT/%{prefix}/bin/imgcapture
|
||||
|
14
xCAT-genesis-builder/80-net-name-slot.rules
Normal file
14
xCAT-genesis-builder/80-net-name-slot.rules
Normal file
@@ -0,0 +1,14 @@
|
||||
# do not edit this file, it will be overwritten on update
|
||||
|
||||
ACTION!="add", GOTO="net_name_slot_end"
|
||||
SUBSYSTEM!="net", GOTO="net_name_slot_end"
|
||||
NAME!="", GOTO="net_name_slot_end"
|
||||
|
||||
IMPORT{cmdline}="net.ifnames"
|
||||
ENV{net.ifnames}=="0", GOTO="net_name_slot_end"
|
||||
|
||||
NAME=="", ENV{ID_NET_NAME_ONBOARD}!="", NAME="$env{ID_NET_NAME_ONBOARD}"
|
||||
NAME=="", ENV{ID_NET_NAME_SLOT}!="", NAME="$env{ID_NET_NAME_SLOT}"
|
||||
NAME=="", ENV{ID_NET_NAME_PATH}!="", NAME="$env{ID_NET_NAME_PATH}"
|
||||
|
||||
LABEL="net_name_slot_end"
|
@@ -5,7 +5,7 @@
|
||||
# this whole dir into it somewhere (like /tmp).
|
||||
# Then run this script. The optional 1st arg should be mcp if you are building against mcp.
|
||||
|
||||
# Currently, *Fedora 23* is the only OS supported to build genesis-base for ppc64, and Centos 6.5 for x86_64
|
||||
# Currently, *Fedora 26* is the only OS supported to build genesis-base for ppc64, and Centos 6.5 for x86_64
|
||||
|
||||
HOSTOS="$1"
|
||||
DIR=`dirname $0`
|
||||
@@ -18,37 +18,9 @@ if [ $BUILDARCH = "ppc64le" ]; then
|
||||
BUILDARCH="ppc64"
|
||||
fi
|
||||
|
||||
# For xcat-genesis-base-ppc64, we need to update mlx4-en driver for Mellanox ethernet nics.
|
||||
# IF you are sure you have installed newer driver on the build server you can use 'buildrpm -y' to skip the nodification
|
||||
if [ -z $1 ]; then
|
||||
HOSTOS="fedora23"
|
||||
HOSTOS="fedora26"
|
||||
fi
|
||||
if [ $BUILDARCH = 'ppc64' -a $HOSTOS != 'mcp' -a $HOSTOS != '-y' ]; then
|
||||
echo "The steps below are used to install mlnx driver 3.2-1 and i40e driver 1.5.16, if you are sure you have these or newer drivers, pls use \"-y\" to skip!"
|
||||
echo "1. Install OS related packages"
|
||||
echo " yum install rpmbuild"
|
||||
echo " yum install kernel-devel-`uname -r`"
|
||||
echo " yum install kernel-headers-`uname -r`"
|
||||
echo " yum install gcc-c++"
|
||||
echo "2. Download Mellanox EN Driver for Linux from http://www.mellanox.com/downloads/Drivers/mlnx-en-3.2-1.0.1.1.tgz"
|
||||
echo " Download Intel EN Driver follow this link and download from webpage https://downloadcenter.intel.com/downloads/eula/26370/Intel-Network-Adapter-Driver-for-PCI-E-Intel-40-Gigabit-Ethernet-Network-Connections-under-Linux-?httpDown=https%3A%2F%2Fdownloadmirror.intel.com%2F26370%2Feng%2Fi40e-1.5.16.tar.gz"
|
||||
echo "3. To install Mellanox Driver, extract it and run ./install.sh from the extracted directory"
|
||||
echo " tar -xvf mlnx-en-3.2-1.0.1.1.tgz"
|
||||
echo " ./mlnx-en-3.2-1.0.1.1/install.sh"
|
||||
echo " To install Intel Driver, create rpm and install"
|
||||
echo " rpmbuild -tb i40e-1.5.16.tar.gz"
|
||||
echo " rpm -i /<path-to>/i40e-1.5.16-1.ppc64le.rpm"
|
||||
echo " Additional Intel instructions can be found in README included in i40e-1.5.16.tar.gz"
|
||||
echo "4. Check whether the drivers are updated"
|
||||
echo " modprobe mlx4-en"
|
||||
echo " modinfo mlx4-en | grep version"
|
||||
echo " version: 3.2-1.0.1.1 (31 Jan 2016)"
|
||||
echo " modinfo i40e | grep version"
|
||||
echo " version: 1.5.16"
|
||||
echo "5. Once the steps above done, run \"$0 -y\" to build xCAT-genesis-base-ppc64"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
# get the input files for dracut in the right place
|
||||
# Fedora 20 ppc64 uses /usr/lib/dracut/modules.d
|
||||
@@ -133,30 +105,8 @@ if [ "$HOSTOS" = "mcp" ]; then
|
||||
# For ppc64 platform, needs to remove some files,
|
||||
# # and some files are in different directories
|
||||
elif [ $BUILDARCH = "ppc64" ]; then
|
||||
sed -i 's/dracut_install efibootmgr//' $DRACUTMODDIR/install
|
||||
sed -i 's/ efibootmgr//' $DRACUTMODDIR/install
|
||||
sed -i 's/ dmidecode//' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/libncurses.so.5.7/\/lib64\/libncurses.so.5.7/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/usr\/lib\/libstdc++.so.6.0.13/\/usr\/lib64\/libstdc++.so.6.0.13/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/libgcc_s.so.1/\/lib64\/libgcc_s.so.1/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/libtinfo.so.5.7/\/lib64\/libtinfo.so.5.7/' $DRACUTMODDIR/install
|
||||
# following changes are required on Fedora 20 ppc64
|
||||
# sed -i 's/\/lib64\/libnss_dns-2.12.so/\/lib64\/libnss_dns-2.18.so/' $DRACUTMODDIR/install
|
||||
# following changes are required on Fedora 23 ppc64
|
||||
sed -i 's/\/lib64\/libnss_dns-2.12.so/\/lib64\/libnss_dns-2.22.so/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/libc.so.6/\/lib64\/libc.so.6/' $DRACUTMODDIR/install
|
||||
# following changes are required on Fedora 23 ppc64
|
||||
#sed -i 's/\/lib\/ld-linux.so.2/\/lib64\/ld-2.18.so/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/ld-linux.so.2/\/lib64\/ld-2.22.so/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/libdl.so.2/\/lib64\/libdl.so.2/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/libm.so.6/\/lib64\/libm.so.6/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/libpthread.so.0/\/lib64\/libpthread.so.0/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib64\/libncurses.so.5.7/\/lib64\/libncurses.so.5.9/' $DRACUTMODDIR/install
|
||||
# following changes are required on Fedora 22 ppc64
|
||||
#sed -i 's/\/usr\/lib64\/libstdc++.so.6.0.13/\/usr\/lib64\/libstdc++.so.6.0.19/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/usr\/lib64\/libstdc++.so.6.0.13/\/usr\/lib64\/libstdc++.so.6.0.21/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib64\/libtinfo.so.5.7/\/lib64\/libtinfo.so.5.9/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/usr\/lib64\/libsasl2.so.2/\/usr\/lib64\/libsasl2.so.3/' $DRACUTMODDIR/install
|
||||
#sed -i 's/\/lib64\/libnss_dns-2.12.so/\/lib64\/libnss_dns-2.18.so/' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/terminfo\/l\/linux/\/usr\/share\/terminfo\/l\/linux/g' $DRACUTMODDIR/install
|
||||
sed -i 's/\/lib\/terminfo\/v\/vt100/\/usr\/share\/terminfo\/v\/vt100/g' $DRACUTMODDIR/install
|
||||
fi
|
||||
@@ -189,7 +139,8 @@ cd /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs
|
||||
zcat /tmp/xcatgenesis.$$.rfs|cpio -dumi
|
||||
|
||||
# add the perl library
|
||||
PERL_LIB_DIR="/usr/share/perl5 /usr/lib64/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5"
|
||||
# add /usr/share/ntp/lib for Fedora26 ppc64, the ntp-perl will installed libraries under it
|
||||
PERL_LIB_DIR="/usr/share/perl5 /usr/lib64/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/share/ntp/lib"
|
||||
for d in `echo $PERL_LIB_DIR`; do
|
||||
if [ -e $d ]; then
|
||||
echo Adding perl libary "$d"
|
||||
@@ -199,6 +150,10 @@ for d in `echo $PERL_LIB_DIR`; do
|
||||
fi
|
||||
done
|
||||
|
||||
# create the predictable naming for nics
|
||||
LIB_UDEV_RULES="/lib/udev/rules.d/"
|
||||
cp $DRACUTMODDIR/80-net-name-slot.rules /tmp/xcatgenesis.$$/opt/xcat/share/xcat/netboot/genesis/$BUILDARCH/fs/lib/udev/rules.d/
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "ERROR - expanding the initramfs, please correct the issues and try again"
|
||||
exit 1
|
||||
|
@@ -14,7 +14,7 @@ elif [ $reason = "BOUND" ]; then
|
||||
if [ ! -z "$old_ip_address" ]; then
|
||||
ip addr del dev $interface $old_ip_address/$old_subnet_mask
|
||||
fi
|
||||
for oldip in `ip addr show dev $interface|grep 'inet '|awk '{print $2}'`; do
|
||||
for oldip in `ip -o addr show dev $interface|awk '{print $4}'`; do
|
||||
ip addr del dev $interface $oldip
|
||||
done
|
||||
if [ ! -z "$new_ip_address" -a ! -z "$new_subnet_mask" ]; then
|
||||
|
@@ -5,18 +5,12 @@ dracut_install netstat # broadcom update requires
|
||||
dracut_install uniq # mellanox update requires
|
||||
dracut_install grep ip hostname /usr/bin/awk egrep grep dirname expr
|
||||
dracut_install mount.nfs sshd vi reboot lspci parted screen mkfs mkfs.ext4 mkfs.xfs xfs_db #mkfs.btrfs removed
|
||||
dracut_install efibootmgr
|
||||
#dracut_install libvirtd /usr/share/libvirt/cpu_map.xml /usr/bin/qemu-img /usr/libexec/qemu-kvm
|
||||
dracut_install mkswap df brctl vconfig ifenslave ssh-keygen scp clear dhclient lldpad
|
||||
dracut_install lldptool /lib64/libnss_dns-2.12.so /lib64/libnss_dns.so.2
|
||||
dracut_install poweroff ntpq ntpd ntp-wait hwclock date /usr/share/terminfo/x/xterm /usr/share/terminfo/s/screen /etc/nsswitch.conf /etc/services
|
||||
dracut_install /sbin/rsyslogd /etc/protocols umount /bin/rpm /usr/lib/rpm/rpmrc
|
||||
dracut_install chmod /lib/libc.so.6 /lib/ld-linux.so.2 /lib/libdl.so.2 /lib/libm.so.6 /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
|
||||
dracut_install dmidecode /usr/lib64/libstdc++.so.6 #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si
|
||||
dracut_install dmidecode /usr/lib64/libstdc++.so.5 #broadcom firmware update links against old lib
|
||||
dracut_install /lib/libpthread.so.0 #32 bit lib because UXSPI will not ship a native 64 bit build
|
||||
dracut_install /lib/libncurses.so.5.7 /usr/lib/libstdc++.so.6.0.13 /lib/libgcc_s.so.1 /lib/libtinfo.so.5.7
|
||||
dracut_install /lib64/libldap-2.4.so.2 /lib64/liblber-2.4.so.2 /usr/lib64/libsasl2.so.2 #uxspi has incurred these...
|
||||
dracut_install chmod /sbin/route /sbin/ifconfig /usr/bin/whoami /usr/bin/head /usr/bin/tail basename /etc/redhat-release ping tr lsusb /usr/share/hwdata/usb.ids #ibm fw wrapper requirements
|
||||
dracut_install efibootmgr lldptool dmidecode #uxspi prereqs, but will use dmidecode to improve decision on loading ipmi_si
|
||||
dracut_install /usr/share/zoneinfo/posix/Zulu
|
||||
dracut_install /usr/share/zoneinfo/posix/GMT-0
|
||||
dracut_install /usr/share/zoneinfo/posix/Europe/Istanbul
|
||||
@@ -594,7 +588,6 @@ inst_dir /var/lib/nfs/statd/sm
|
||||
inst_dir /var/lib/nfs/statd/sm.bak
|
||||
inst_dir /var/lib/nfs/rpc_pipefs/nfs
|
||||
inst "/bin/bash" "/bin/sh"
|
||||
inst "/lib64/libnss_dns-2.12.so"
|
||||
inst "/lib/terminfo/l/linux" "/lib/terminfo/l/linux"
|
||||
inst "/lib/terminfo/v/vt100" "/lib/terminfo/v/vt100"
|
||||
inst_hook cmdline 10 "$moddir/xcat-cmdline.sh"
|
||||
@@ -624,4 +617,4 @@ dracut_install /lib/udev/rules.d/95-dm-notify.rules
|
||||
dracut_install /usr/share/hwdata/pci.ids
|
||||
# The DB files for udevadm
|
||||
dracut_install /etc/udev/hwdb.bin
|
||||
dracut_install /lib64/libform.so.5 /lib64/libpanel.so.5 /lib64/libmenu.so.5 /lib64/libsysfs.so.2 /usr/sbin/iprconfig # iprconfig for IBM Power RAID configuration
|
||||
dracut_install /usr/sbin/iprconfig # iprconfig for IBM Power RAID configuration
|
||||
|
@@ -37,6 +37,7 @@ Packager: IBM Corp.
|
||||
%Description
|
||||
xCAT genesis (Genesis Enhanced Netboot Environment for System Information and Servicing) is a small, embedded-like environment for xCAT's use in discovery and management actions when interaction with an OS is infeasible.
|
||||
This package comprises the base platform with most of the xCAT specific behavior left to xCAT-genesis-scripts package.
|
||||
Built in environment "%dist" on %{_arch}.
|
||||
%Prep
|
||||
|
||||
|
||||
|
@@ -99,7 +99,6 @@ function snooze() {
|
||||
logger -s -t $log_label -p local4.debug "OpenPOWER, snooze for 30 seconds..."
|
||||
sleep 30
|
||||
else
|
||||
logger -s -t $log_label -p local4.debug "snooze for 1 second..."
|
||||
sleep 1
|
||||
fi
|
||||
}
|
||||
@@ -430,7 +429,7 @@ for user in $BMCUS; do
|
||||
if [ -z "$USERSLOT" ]; then
|
||||
USERSLOT=$((`ipmitool raw 6 0x44 1 1|awk '{print $3}'` + 1))
|
||||
fi
|
||||
if [ "$USERSLOT" == 0 ]; then USERSLOT=2; fi
|
||||
if [ "$USERSLOT" == 0 -o -z "$LOCKEDUSERS" ]; then USERSLOT=2; fi
|
||||
if [ "$ISITE" = 1 ]; then
|
||||
allowcred.awk &
|
||||
CREDPID=$!
|
||||
|
@@ -1,6 +1,13 @@
|
||||
#!/bin/bash
|
||||
log_label="xcat.genesis.dodiscovery"
|
||||
|
||||
#the time when the latest findme request is sent to master
|
||||
reqtime=0
|
||||
#the timeout value on the waiting for the "processed" response from master
|
||||
#when the xcatd on master finished the processing of my findme request,
|
||||
#a "processed" response will be replied
|
||||
maxresptime=180
|
||||
|
||||
minixcatd.awk &
|
||||
PUBKEY=`openssl rsa -in /etc/xcat/privkey.pem -pubout 2> /dev/null|grep -v "PUBLIC KEY"`
|
||||
PUBKEY=`echo $PUBKEY|sed -e 's/ //g'`
|
||||
@@ -25,11 +32,11 @@ logger -s -t $log_label -p local4.info "Waiting for nics to get addresses"
|
||||
while [ ! -z "$NICSGETTINGADDR" -a $timewaiting != 700 ]; do
|
||||
NEWNICSGETTINGADDR=""
|
||||
for nic in $NICSGETTINGADDR; do
|
||||
if ! ip addr show dev $nic |grep -v inet6|grep inet >/dev/null; then
|
||||
if ! ip -4 -o a show dev $nic |grep -q inet; then
|
||||
NEWNICSGETTINGADDR="$NEWNICSGETTINGADDR $nic"
|
||||
else
|
||||
echo -n "$nic|"
|
||||
ip addr show dev $nic |grep -v inet6|grep inet|sed -e s/\\/.*//|awk '{print $2}'
|
||||
ip -4 -o addr show dev $nic | awk '{print $4}' | sed -e sX/.*XX
|
||||
fi
|
||||
done
|
||||
sleep 0.1
|
||||
@@ -56,6 +63,23 @@ done
|
||||
|
||||
#time to make our packet...
|
||||
while [ ! -r /restart ]; do
|
||||
|
||||
#record the current time
|
||||
curtime=$(date +%s)
|
||||
|
||||
#the existence of "/processing" indicates that my findme request is under processing
|
||||
if [ -f "/processing" ]; then
|
||||
if [ $curtime -gt $[ $reqtime + $maxresptime ] ]; then
|
||||
#I think my findme request processing is timeout, I will resend the findme request
|
||||
logger -s -t $log_label -p local4.info "seems the processing of my findme request cost more than $maxresptime, send new findme request"
|
||||
rm -rf /processing
|
||||
else
|
||||
logger -s -t $log_label -p local4.info "My findme request is still under processing, do not send new request"
|
||||
sleep 5
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
|
||||
MTM=unknown
|
||||
SERIAL=unknown
|
||||
ARCH=unknown
|
||||
@@ -141,10 +165,12 @@ if [ "$UUID" != "unknown" ]; then
|
||||
echo "<uuid>$UUID</uuid>" >> /tmp/discopacket
|
||||
fi
|
||||
|
||||
if [ "$MTM" != "unknown" ]; then
|
||||
flag_mtm=`echo '$MTM' | sed 's/0//g'`
|
||||
if [ $flag_mtm ] && [ "$MTM" != "unknown" ]; then
|
||||
echo "<mtm>$MTM</mtm>" >> /tmp/discopacket
|
||||
fi
|
||||
if [ "$SERIAL" != "unknown" ]; then
|
||||
flag_serial=`echo '$SERIAL' | sed 's/0//g'`
|
||||
if [ $flag_serial ] && [ "$SERIAL" != "unknown" ]; then
|
||||
echo "<serial>$SERIAL</serial>" >> /tmp/discopacket
|
||||
fi
|
||||
if [ "$PLATFORM" != "unknown" ]; then
|
||||
@@ -159,6 +185,11 @@ if [ "$IsStatic" ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
BMCMAC=`ipmitool lan print 1 | grep 'MAC Address' | cut -d ":" -f2-7 | sed 's/ //'`
|
||||
if [ "$BMCMAC" ]; then
|
||||
echo "<bmcmac>$BMCMAC</bmcmac>" >> /tmp/discopacket
|
||||
fi
|
||||
|
||||
# Check whether the hardware support in-band BMC configuration with the IPMI device
|
||||
if [ -r /dev/ipmi0 -o -r /dev/ipmi/0 -o -r /dev/ipmidev/0 ]; then
|
||||
echo "<bmcinband>1</bmcinband>" >> /tmp/discopacket
|
||||
@@ -187,8 +218,8 @@ for dev in `ip link|grep -B1 ether|grep UP|awk '{print $2}'|sed -e s/://|grep -v
|
||||
ONBOARDINDEX=""
|
||||
DRIVER=`grep DRIVER /sys/class/net/$dev/device/uevent|awk -F= '{print $2}'`
|
||||
PCI_SLOT=`grep PCI_SLOT_NAME /sys/class/net/$dev/device/uevent|awk -F= '{print $2}'`
|
||||
ADDRESS=`ip address show dev $dev|grep "inet "|grep global|awk '{print $2}'`
|
||||
MAC=`ip link show dev $dev|grep ether|awk '{print $2}'| tr /a-f/ /A-F/`
|
||||
ADDRESS=`ip -4 -o a show dev $dev|awk '/global/{print $4}'`
|
||||
MAC=`ip link show dev $dev|grep ether|awk '{print $2}'| tr /a-f/ /A-F/`
|
||||
if [ "$MAC_OF_FIRST_UP_NIC" == "unknown" ]; then
|
||||
MAC_OF_FIRST_UP_NIC=`echo $MAC | sed -e s/://g`
|
||||
fi
|
||||
@@ -280,6 +311,9 @@ gzip -9 /tmp/discopacket
|
||||
logger -s -t $log_label -p local4.info "Sending the discovery packet to xCAT ($dhcps:$XCATPORT)..."
|
||||
(cat /tmp/discopacket.gz | udpcat.awk $dhcps $XCATPORT ) &
|
||||
done
|
||||
|
||||
#record the time when the "findme request is sent to master"
|
||||
reqtime=$(date +%s)
|
||||
#cat /tmp/discopacket
|
||||
logger -s -t $log_label -p local4.info "Sleeping 5 seconds..."
|
||||
sleep 5
|
||||
|
@@ -29,9 +29,11 @@ logger -s -t $log_label -p local4.info "Beginning doxcat process..."
|
||||
modprobe acpi_cpufreq 2>/dev/null # on some machines this fails
|
||||
modprobe cpufreq_ondemand
|
||||
if ls /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor &>/dev/null; then
|
||||
for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
|
||||
echo -n ondemand > $gov
|
||||
done
|
||||
if grep -q ondemand /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors; then
|
||||
for gov in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor; do
|
||||
echo -n ondemand > $gov
|
||||
done
|
||||
fi
|
||||
fi
|
||||
if [ ! -z "$BOOTIF" ]; then
|
||||
BOOTIF=`echo $BOOTIF|sed -e s/01-// -e s/-/:/g`
|
||||
@@ -212,7 +214,7 @@ else
|
||||
tries=0
|
||||
while [ -z "$bootnic" ]; do
|
||||
for tmp1 in $ALLUP_NICS; do
|
||||
if ip addr show dev $tmp1|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6|grep inet > /dev/null; then
|
||||
if ip -4 -o a show dev $tmp1|grep -v 'scope link'|grep -v 'dynamic'|grep -q inet ; then
|
||||
result=`ping -c1 -I $tmp1 $XCATMASTER 2>&1`
|
||||
if [ $? -eq 0 ]; then
|
||||
logger -s -t $log_label -p local4.info "the nic $tmp1 can ping $XCATMASTER"
|
||||
@@ -247,7 +249,7 @@ else
|
||||
|
||||
gripeiter=101
|
||||
logger -s -t $log_label -p local4.info "Acquiring network addresses.."
|
||||
while ! ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6|grep inet > /dev/null; do
|
||||
while ! ip -4 -o a show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -q inet; do
|
||||
sleep 0.1
|
||||
if [ $gripeiter = 1 ]; then
|
||||
logger -s -t $log_label -p local4.info "It seems to be taking a while to acquire an IPv4 address, you may want to check spanning tree..."
|
||||
@@ -261,7 +263,7 @@ openssl genrsa -out /etc/xcat/certkey.pem 4096 > /dev/null 2>&1 &
|
||||
|
||||
logger -s -t $log_label -p local4.info "Acquired IPv4 address on $bootnic"
|
||||
|
||||
ip addr show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|grep -v inet6|grep inet|awk '{print $2}'
|
||||
ip -4 -o a show dev $bootnic|grep -v 'scope link'|grep -v 'dynamic'|awk '{print $4}'
|
||||
|
||||
logger -s -t $log_label -p local4.info "Starting ntpd..."
|
||||
ntpd -g -x
|
||||
|
@@ -4,7 +4,6 @@
|
||||
XCATPORT=3001
|
||||
export XCATPORT
|
||||
|
||||
#XCATMASTER="10.3.5.21"
|
||||
ADAPTERFILE="/tmp/adapterinfo"
|
||||
SCANNICLOG="/tmp/adapterscan.log"
|
||||
|
||||
@@ -17,8 +16,6 @@ fi
|
||||
|
||||
echo "<xcatrequest>
|
||||
<command>getadapter</command>
|
||||
<clienttype>cli</clienttype>
|
||||
<noderange>$HOSTNAME</noderange>
|
||||
<action>update</action>" >> "$ADAPTERFILE"
|
||||
|
||||
#scan adapters have recognized by operating system
|
||||
@@ -111,5 +108,4 @@ else
|
||||
openssl s_client -connect $dhcps:$XCATPORT <"$ADAPTERFILE" >>"$SCANNICLOG" 2>&1
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
fi
|
@@ -1,18 +1,24 @@
|
||||
#!/usr/bin/awk -f
|
||||
# IBM(c) 2007 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
BEGIN {
|
||||
port = 3001
|
||||
listener = "/inet/tcp/" port "/0/0"
|
||||
quit = "no"
|
||||
while (match(quit,"no")) {
|
||||
while (match(quit,"no") && (listener |& getline) > 0) {
|
||||
if (match($0,"restart")) {
|
||||
print "restarting bootstrap process" |& listener
|
||||
quit="yes"
|
||||
system("echo \"" $0 "\" > /restart")
|
||||
close(listener)
|
||||
}
|
||||
}
|
||||
close(listener)
|
||||
}
|
||||
port = 3001
|
||||
listener = "/inet/tcp/" port "/0/0"
|
||||
quit = "no"
|
||||
while (match(quit,"no")) {
|
||||
while (match(quit,"no") && (listener |& getline) > 0) {
|
||||
if (match($0,"restart")) {
|
||||
print "restarting bootstrap process" |& listener
|
||||
quit="yes"
|
||||
system("echo \"" $0 "\" > /restart")
|
||||
close(listener)
|
||||
}else if(match($0,"processing")){
|
||||
print "processing request" |& listener
|
||||
system("echo \"" $0 "\" > /processing")
|
||||
}else if(match($0,"processed")){
|
||||
print "finished request process" |& listener
|
||||
system("rm -rf /processing")
|
||||
}
|
||||
}
|
||||
close(listener)
|
||||
}
|
||||
}
|
||||
|
134
xCAT-probe/subcmds/clusterstatus
Executable file
134
xCAT-probe/subcmds/clusterstatus
Executable file
@@ -0,0 +1,134 @@
|
||||
#! /usr/bin/perl
|
||||
# IBM(c) 2016 EPL license http://www.eclipse.org/legal/epl-v10.html
|
||||
|
||||
BEGIN { $::XCATROOT = $ENV{'XCATROOT'} ? $ENV{'XCATROOT'} : -d '/opt/xcat' ? '/opt/xcat' : '/usr'; }
|
||||
|
||||
use lib "$::XCATROOT/probe/lib/perl";
|
||||
use probe_utils;
|
||||
use File::Basename;
|
||||
use Net::Ping;
|
||||
use Getopt::Long qw(:config no_ignore_case);
|
||||
|
||||
use Data::Dumper;
|
||||
use warnings;
|
||||
|
||||
my $program_name = basename("$0");
|
||||
my $help;
|
||||
my $noderange = "compute";
|
||||
my $test;
|
||||
my $output = "stdout";
|
||||
my $verbose = 0;
|
||||
my $rst = 0;
|
||||
|
||||
$::USAGE = "Usage:
|
||||
$program_name -h
|
||||
$program_name {-d|-g} [-n noderange] [-V|--verbose]
|
||||
|
||||
Description:
|
||||
Use this command to get a summary of the cluster.
|
||||
|
||||
Options:
|
||||
-h : Get usage information of $program_name
|
||||
-n : Range of nodes to check. Default is \"compute\".
|
||||
-d : Discovery. Display count of discovered nodes.
|
||||
-g : Group count. Display count of nodes in each group.
|
||||
-V : To print additional debug information.
|
||||
";
|
||||
|
||||
#-------------------------------------
|
||||
# main process
|
||||
#-------------------------------------
|
||||
if (
|
||||
!GetOptions("--help|h" => \$help,
|
||||
"T" => \$test,
|
||||
"V|verbose" => \$VERBOSE,
|
||||
"d|discovery" => \$DISCOVERY,
|
||||
"g|groupcount" => \$GROUPCOUNT,
|
||||
"n=s" => \$noderange))
|
||||
{
|
||||
probe_utils->send_msg("$output", "f", "Invalid parameter for $program_name");
|
||||
probe_utils->send_msg("$output", "d", "$::USAGE");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if ($help) {
|
||||
if ($output ne "stdout") {
|
||||
probe_utils->send_msg("$output", "d", "$::USAGE");
|
||||
} else {
|
||||
print "$::USAGE";
|
||||
}
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ($test) {
|
||||
probe_utils->send_msg("$output", "o", "Use this command to get node summary in the cluster.");
|
||||
exit 0;
|
||||
}
|
||||
|
||||
if ((!$DISCOVERY) and (!$GROUPCOUNT)) {
|
||||
probe_utils->send_msg("$output", "f", "Discovery or groupcount option is required for $program_name");
|
||||
probe_utils->send_msg("$output", "d", "$::USAGE");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
if (scalar(@ARGV) >= 1) {
|
||||
|
||||
# After processing all the expected flags and arguments,
|
||||
# there is still left over stuff on the command line
|
||||
probe_utils->send_msg("$output", "f", "Invalid flag or parameter: @ARGV");
|
||||
probe_utils->send_msg("$output", "d", "$::USAGE");
|
||||
exit 1;
|
||||
}
|
||||
|
||||
check_for_discovered_nodes() if ($DISCOVERY);
|
||||
groupcount_nodes() if ($GROUPCOUNT);
|
||||
|
||||
# Check for node definitions with MAC address defined
|
||||
sub check_for_discovered_nodes {
|
||||
my $na = "N/A";
|
||||
my $rc = 0;
|
||||
|
||||
my $all_nodes_mac = `lsdef -i mac -c $noderange 2> /dev/null`;
|
||||
chomp($all_nodes_mac);
|
||||
my @all_nodes_mac_lines = split("[\n\r]", $all_nodes_mac);
|
||||
|
||||
if ($all_nodes_mac =~ /Usage:/) {
|
||||
|
||||
# lsdef command displayed a Usage message. Must be some noderange formatting problem.
|
||||
# Issue a warning and exit.
|
||||
probe_utils->send_msg("$output", "w", "Can not get a list of nodes from specified noderange.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
if (scalar(@all_nodes_mac_lines) <= 0) {
|
||||
|
||||
# There were no nodes matching the noderange. Issue a warning and exit.
|
||||
probe_utils->send_msg("$output", "w", "No nodes matching the noderange were found.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
# Go through the list of nodes and count how many have mac value
|
||||
my $mac_counter=0;
|
||||
foreach (@all_nodes_mac_lines) {
|
||||
# probe_utils->send_msg("$output", "d", "Processing $_.") if ($VERBOSE);
|
||||
my ($node_name, $value) = split ":", $_;
|
||||
my ($mac_name, $mac_value) = split "=", $value;
|
||||
if ($mac_value) {
|
||||
# mac if set for the node
|
||||
$mac_counter++;
|
||||
probe_utils->send_msg("$output", "d", "($mac_counter) $_") if ($VERBOSE);
|
||||
}
|
||||
}
|
||||
my $percent = sprintf("%.2f", (($mac_counter / scalar(@all_nodes_mac_lines)) * 100));
|
||||
|
||||
probe_utils->send_msg("$output", "o", "$mac_counter out of " . scalar(@all_nodes_mac_lines) . " in the noderange \"$noderange\" have been discovered ($percent/%)");
|
||||
return $rc;
|
||||
}
|
||||
|
||||
sub groupcount_nodes {
|
||||
my $na = "N/A";
|
||||
my $rc = 0;
|
||||
|
||||
probe_utils->send_msg("$output", "w", "Group count function is not yet implemented.");
|
||||
return $rc;
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user