From 0c37f5d028f3687efcffb692bef42121b11eb340 Mon Sep 17 00:00:00 2001 From: junxiawang Date: Wed, 17 May 2017 08:26:37 -0400 Subject: [PATCH 001/203] add stop lable for Dev to debug --- xCAT-test/autotest/testcase/installation/SN_setup_case | 1 + .../testcase/installation/reg_linux_diskfull_installation_flat | 1 + .../installation/reg_linux_diskfull_installation_hierarchy | 1 + .../testcase/installation/reg_linux_diskless_installation_flat | 1 + .../installation/reg_linux_diskless_installation_hierarchy | 1 + .../testcase/installation/reg_linux_statelite_installation_flat | 1 + .../reg_linux_statelite_installation_hierarchy_by_nfs | 1 + .../reg_linux_statelite_installation_hierarchy_by_ramdisk | 1 + 8 files changed, 8 insertions(+) diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 271427394..330bdeaa2 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -1,5 +1,6 @@ start:SN_setup_case os:Linux +stop:yes cmd:fdisk -l cmd:df -T cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index b5ef8f841..cbe7a6991 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -1,5 +1,6 @@ start:reg_linux_diskfull_installation_flat os:Linux +stop:yes cmd:fdisk -l cmd:df -T cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index a3a04ba54..eca702914 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -1,5 +1,6 @@ start:reg_linux_diskfull_installation_hierarchy os:Linux +stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index a6e90df47..1541fae4b 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -1,5 +1,6 @@ start:reg_linux_diskless_installation_flat os:Linux +stop:yes cmd:fdisk -l cmd:df -T cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 5e16e29af..8ca853faa 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -1,5 +1,6 @@ start:reg_linux_diskless_installation_hierarchy os:Linux +stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat index 829460d05..fa994e2c6 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -1,5 +1,6 @@ start:reg_linux_statelite_installation_flat os:Linux +stop:yes cmd:fdisk -l cmd:df -T diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index 7c8e83622..cfb83253f 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -1,5 +1,6 @@ start:reg_linux_statelite_installation_hierarchy_by_nfs os:Linux +stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index c2140c00d..a15e412f1 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -1,5 +1,6 @@ start:reg_linux_statelite_installation_hierarchy_by_ramdisk os:Linux +stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" From 6c8ed805f5eb79c19f16eaedeaaa9d68bd6605e7 Mon Sep 17 00:00:00 2001 From: junxiawang Date: Wed, 17 May 2017 08:19:23 -0400 Subject: [PATCH 002/203] add stop lable for Dev to debug --- xCAT-test/autotest/testcase/installation/SN_setup_case | 2 +- .../testcase/installation/reg_linux_diskfull_installation_flat | 2 +- .../installation/reg_linux_diskfull_installation_hierarchy | 2 +- .../testcase/installation/reg_linux_diskless_installation_flat | 2 +- .../installation/reg_linux_diskless_installation_hierarchy | 2 +- .../testcase/installation/reg_linux_statelite_installation_flat | 2 +- .../reg_linux_statelite_installation_hierarchy_by_nfs | 2 +- .../reg_linux_statelite_installation_hierarchy_by_ramdisk | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index 330bdeaa2..ceefee2aa 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -1,4 +1,4 @@ -start:SN_setup_case +start:SN_setup_case:stop:yes os:Linux stop:yes cmd:fdisk -l diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index cbe7a6991..5ca278086 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -1,4 +1,4 @@ -start:reg_linux_diskfull_installation_flat +start:reg_linux_diskfull_installation_flat:stop:yes os:Linux stop:yes cmd:fdisk -l diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index eca702914..80bfe6962 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -1,4 +1,4 @@ -start:reg_linux_diskfull_installation_hierarchy +start:reg_linux_diskfull_installation_hierarchy:stop:yes os:Linux stop:yes cmd:xdsh $$SN fdisk -l diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index 1541fae4b..e18b1842a 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -1,4 +1,4 @@ -start:reg_linux_diskless_installation_flat +start:reg_linux_diskless_installation_flat:stop:yes os:Linux stop:yes cmd:fdisk -l diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 8ca853faa..84e77b032 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -1,4 +1,4 @@ -start:reg_linux_diskless_installation_hierarchy +start:reg_linux_diskless_installation_hierarchy:stop:yes os:Linux stop:yes cmd:xdsh $$SN fdisk -l diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat index fa994e2c6..f96c03193 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -1,4 +1,4 @@ -start:reg_linux_statelite_installation_flat +start:reg_linux_statelite_installation_flat:stop:yes os:Linux stop:yes cmd:fdisk -l diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index cfb83253f..4bddbf6e2 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -1,4 +1,4 @@ -start:reg_linux_statelite_installation_hierarchy_by_nfs +start:reg_linux_statelite_installation_hierarchy_by_nfs:stop:yes os:Linux stop:yes cmd:xdsh $$SN fdisk -l diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index a15e412f1..beeaa5cb0 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -1,4 +1,4 @@ -start:reg_linux_statelite_installation_hierarchy_by_ramdisk +start:reg_linux_statelite_installation_hierarchy_by_ramdisk:stop:yes os:Linux stop:yes cmd:xdsh $$SN fdisk -l From a56d53b1a52b003410535fc777108c12ab6aa4ba Mon Sep 17 00:00:00 2001 From: junxiawang Date: Wed, 17 May 2017 07:09:50 -0400 Subject: [PATCH 003/203] Migration test just need to run under flat environment or will two dns server:SN and MN for CN --- .../autotest/testcase/migration/redhat_migration | 12 ++++++------ xCAT-test/autotest/testcase/migration/sles_migration | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index 27a489882..0cd7f859c 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -2,9 +2,9 @@ start:redhat_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -103,9 +103,9 @@ os:Linux description:update xCAT from $$MIGRATION2_VERSION to latest version, these two global parameter defined in config file stop:yes -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index e287ec852..a03bfc0d3 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -2,9 +2,9 @@ start:sles_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n @@ -105,9 +105,9 @@ start:sles_migration2 os:Linux description:update xCAT from $$MIGRATION22VERSION to latest version, these two global parameter defined in config file -#cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi -#cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN -#check:rc==0 +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN +check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w check:rc==0 cmd:makedns -n From 1550c575905354ce177e2069b97142b1551e72a9 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Thu, 18 May 2017 02:52:28 -0400 Subject: [PATCH 004/203] Modify release information for 2.13.4 --- docs/source/overview/xcat2_release.rst | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 18b27871b..21a39166b 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -14,11 +14,19 @@ xCAT 2.13.x |xCAT |New OS |New |New Feature | |Version | |Hardware | | +=================================+===============+=============+==================================+ -|| xCAT 2.13.3 |- RHEL 6.9 | |- rpower for OpenBMC(experimental)| -|| 2017/4/7 | | |- Add -C for rmdef to run nodeset | -|| | | | nodeset offline | -| `2.13.3 Release Notes `_ | | | | +| | | | | ++---------------------------------+---------------+-------------+----------------------------------+ +|| xCAT 2.13.3 |- RHEL 6.9 | |- OpenBMC support(experimental): | +|| 2017/4/14 | | | | +|| | | | rpower rcons | +| `2.13.3 Release Notes `_ | | | | | | | | | +---------------------------------+---------------+-------------+----------------------------------+ From 14629a92e83fb9eacaad21d0370ca60725547c87 Mon Sep 17 00:00:00 2001 From: ertaozh Date: Mon, 26 Jun 2017 05:02:59 -0400 Subject: [PATCH 005/203] Deal with conflict between master and 2.13 branch for 2.13.5 release --- .../testcase/installation/SN_setup_case | 4 ++-- .../reg_linux_diskfull_installation_flat | 4 ++-- .../reg_linux_diskfull_installation_hierarchy | 4 ++-- .../reg_linux_diskless_installation_flat | 4 ++-- .../reg_linux_diskless_installation_hierarchy | 4 ++-- .../reg_linux_statelite_installation_flat | 10 +++++++-- ...ux_statelite_installation_hierarchy_by_nfs | 7 +++++-- ...tatelite_installation_hierarchy_by_ramdisk | 7 +++++-- .../testcase/migration/redhat_migration | 21 +++++++++++++++---- .../testcase/migration/sles_migration | 19 ++++++++++++++--- 10 files changed, 61 insertions(+), 23 deletions(-) diff --git a/xCAT-test/autotest/testcase/installation/SN_setup_case b/xCAT-test/autotest/testcase/installation/SN_setup_case index ceefee2aa..4d0c6baa0 100644 --- a/xCAT-test/autotest/testcase/installation/SN_setup_case +++ b/xCAT-test/autotest/testcase/installation/SN_setup_case @@ -1,6 +1,6 @@ -start:SN_setup_case:stop:yes +start:SN_setup_case os:Linux -stop:yes +#stop:yes cmd:fdisk -l cmd:df -T cmd:XCAT_DATABASE=$$XCAT_DATABASE /opt/xcat/share/xcat/tools/autotest/testcase/installation/pre_deploy_sn __GETNODEATTR($$SN,os)__ __GETNODEATTR($$SN,arch)__ diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat index 5ca278086..be95f5d86 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_flat @@ -1,6 +1,6 @@ -start:reg_linux_diskfull_installation_flat:stop:yes +start:reg_linux_diskfull_installation_flat os:Linux -stop:yes +#stop:yes cmd:fdisk -l cmd:df -T cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy index 80bfe6962..a21b71002 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskfull_installation_hierarchy @@ -1,6 +1,6 @@ -start:reg_linux_diskfull_installation_hierarchy:stop:yes +start:reg_linux_diskfull_installation_hierarchy os:Linux -stop:yes +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat index e18b1842a..f2019566a 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_flat @@ -1,6 +1,6 @@ -start:reg_linux_diskless_installation_flat:stop:yes +start:reg_linux_diskless_installation_flat os:Linux -stop:yes +#stop:yes cmd:fdisk -l cmd:df -T cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy index 84e77b032..920c1d563 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy +++ b/xCAT-test/autotest/testcase/installation/reg_linux_diskless_installation_hierarchy @@ -1,6 +1,6 @@ -start:reg_linux_diskless_installation_hierarchy:stop:yes +start:reg_linux_diskless_installation_hierarchy os:Linux -stop:yes +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat index f96c03193..7cc906537 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_flat @@ -1,6 +1,6 @@ -start:reg_linux_statelite_installation_flat:stop:yes +start:reg_linux_statelite_installation_flat os:Linux -stop:yes +#stop:yes cmd:fdisk -l cmd:df -T @@ -75,6 +75,9 @@ cmd:xdsh $$CN mount check:rc==0 check:output=~/nodedata/$$CN on /.statelite/persistent check:output=~compute/rootimg on / type nfs +cmd:xdsh $$CN hostname +check:rc==0 +check:output=~$$CN: $$CN cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "echo "test"> /test.statelite" check:rc!=0 @@ -110,6 +113,9 @@ cmd:xdsh $$CN mount check:rc==0 check:output=~/nodedata/$$CN on /.statelite/persistent check:output=~rootfs on / type tmpfs +cmd:xdsh $$CN hostname +check:rc==0 +check:output=~$$CN: $$CN cmd:sleep 120 cmd:ping $$CN -c 3 check:rc==0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs index 4bddbf6e2..65ac3cf86 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_nfs @@ -1,6 +1,6 @@ -start:reg_linux_statelite_installation_hierarchy_by_nfs:stop:yes +start:reg_linux_statelite_installation_hierarchy_by_nfs os:Linux -stop:yes +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" @@ -95,6 +95,9 @@ cmd:xdsh $$CN mount check:rc==0 check:output=~/nodedata/$$CN on /.statelite/persistent check:output=~compute/rootimg on / type nfs +cmd:xdsh $$CN hostname +check:rc==0 +check:output=~$$CN: $$CN cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:xdsh $$CN "echo "test"> /test.statelite" check:rc!=0 diff --git a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk index beeaa5cb0..fd7d84f4e 100644 --- a/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk +++ b/xCAT-test/autotest/testcase/installation/reg_linux_statelite_installation_hierarchy_by_ramdisk @@ -1,6 +1,6 @@ -start:reg_linux_statelite_installation_hierarchy_by_ramdisk:stop:yes +start:reg_linux_statelite_installation_hierarchy_by_ramdisk os:Linux -stop:yes +#stop:yes cmd:xdsh $$SN fdisk -l cmd:xdsh $$SN df -T cmd:xdsh $$SN "echo "test"> /test.hierarchy" @@ -89,6 +89,9 @@ cmd:xdsh $$CN mount check:rc==0 check:output=~/nodedata/$$CN on /.statelite/persistent check:output=~rootfs on / type +cmd:xdsh $$CN hostname +check:rc==0 +check:output=~$$CN: $$CN cmd:xdsh $$CN "cat /var/log/xcat/xcat.log" cmd:rootimgdir=`lsdef -t osimage __GETNODEATTR($$CN,os)__-__GETNODEATTR($$CN,arch)__-statelite-compute|grep rootimgdir|awk -F'=' '{print $2}'`; if [ -d $rootimgdir.regbak ]; then rm -rf $rootimgdir; mv $rootimgdir.regbak $rootimgdir; fi check:rc==0 diff --git a/xCAT-test/autotest/testcase/migration/redhat_migration b/xCAT-test/autotest/testcase/migration/redhat_migration index 0cd7f859c..c2d43ff7b 100644 --- a/xCAT-test/autotest/testcase/migration/redhat_migration +++ b/xCAT-test/autotest/testcase/migration/redhat_migration @@ -2,7 +2,10 @@ start:redhat_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file -cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w @@ -96,14 +99,20 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end start:redhat_migration2 os:Linux description:update xCAT from $$MIGRATION2_VERSION to latest version, these two global parameter defined in config file -stop:yes - -cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +#stop:yes +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w @@ -197,5 +206,9 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end diff --git a/xCAT-test/autotest/testcase/migration/sles_migration b/xCAT-test/autotest/testcase/migration/sles_migration index a03bfc0d3..f20f56edb 100644 --- a/xCAT-test/autotest/testcase/migration/sles_migration +++ b/xCAT-test/autotest/testcase/migration/sles_migration @@ -1,8 +1,10 @@ start:sles_migration1 os:Linux description:update xCAT from $$MIGRATION1_VERSION to latest version, these two global parameter defined in config file - -cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w @@ -99,13 +101,20 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end start:sles_migration2 os:Linux description:update xCAT from $$MIGRATION22VERSION to latest version, these two global parameter defined in config file -cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;fi +cmd:if ping -c 1 $$SN > /dev/null;then rpower $$SN off > /dev/null;echo "poweroffsn">/tmp/poweroffsn;fi +check:rc==0 +cmd:if [[ "__GETNODEATTR($$SN,groups)__" =~ "service" ]];then chdef $$SN -m groups=service;echo "servicelabel" >/tmp/servicelabel;fi +check:rc==0 cmd:chdef -t node -o $$CN servicenode= monserver=$$MN nfsserver=$$MN tftpserver=$$MN xcatmaster=$$MN check:rc==0 cmd:rscan __GETNODEATTR($$CN,hcp)__ -w @@ -202,5 +211,9 @@ cmd:xdsh $$CN "noderm node0001" check:rc==0 cmd:latest_version_info=`lsxcatd -v`;xdsh $$CN "lsxcatd -v" | grep "$latest_version_info" check:rc==0 +cmd:if [[ -f /tmp/servicelabel ]];then chdef $$SN -p groups=service;rm -rf /tmp/servicelabel;fi +check:rc==0 +cmd:if [[ -f /tmp/poweroffsn ]];then rpower $$SN on > /dev/null;rm -rf /tmp/poweroffsn;fi +check:rc==0 end From 1185459b212995e36e4a61a3212aa648334ea7c5 Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Thu, 29 Jun 2017 17:36:36 +0800 Subject: [PATCH 006/203] Fix 3368, "noboot" is not working for mknb when multiple interfaces, and it is caused by something wrong in "get_nic_ip" (#3371) (#3372) --- perl-xCAT/xCAT/NetworkUtils.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 0c62fb7a0..d54bf253b 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -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/) { From 367e940833325d7c28a5e952ba8eb4ed7f459e88 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Wed, 9 Aug 2017 23:18:37 -0400 Subject: [PATCH 007/203] update for xCAT 2.13.6 release --- docs/source/overview/xcat2_release.rst | 60 ++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 2062b7c30..26bdd6b92 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -14,6 +14,66 @@ xCAT 2.13.x |xCAT |New OS |New |New Feature | |Version | |Hardware | | +=================================+===============+=============+==================================+ +|| xCAT 2.13.6 |- RHEL 7.4 | |-OpenBMC support(Alpha level code)| +|| 2017/8/10 | | | | +|| | | | rsetboot | +| `2.13.6 Release Notes `_ | | |-WSP EUH support | +| | | | | +| | | | Hardware discovery | +| | | | bmcsetup | +| | | |-nodeset performance enhancement | +| | | | (Phase 3) | +| | | | | +| | | | Dispatch request to the specified| +| | | | service nodes | +| | | |-Boston server verification | +| | | |-CORAL hardware/switch discovery | +| | | | process | +| | | | | +| | | | the DHCP dynamic range | +| | | | DHCP relay | +| | | |-network configuration interface | +| | | | | +| | | | niccustomscripts | +| | | | refine xCAT network scripts | +| | | | related document | +| | | |-xCAT MN migration steps | +| | | | verification | +| | | |-new xCAT prototype | +| | | | | +| | | | the framework for copycds | +| | | | the framework for deploying RH on| +| | | | x86 VMs | +| | | |-[xcat-deps] xcat-genesis-base | +| | | | package based on Fedora 26 ppc64 | ++---------------------------------+---------------+-------------+----------------------------------+ +|| xCAT 2.13.5 | | |-OpenBMC support(Alpha level code)| +|| 2017/6/30 | | | | +|| | | | rinv | +| `2.13.5 Release Notes `_ | | |-Enhancements to self testing | +| | | | tool xcat-test | +| | | |-Service node pool support for | +| | | | rhels7 ppc64le diskless | +| | | |-Mellanox cumulus switch ZTP based| +| | | | discovery and auto-configuration | +| | | |-Performance enhancements | +| | | | | +| | | | makedhcp, makedns | +| | | | nodeset | +| | | |-[xcat-deps] ipmitool-xcat package| +| | | | updated to version 1.8.18 for | +| | | | | +| | | | RHEL7.x | +| | | | SLES12.x | +| | | | Ubuntu14.04.x | +| | | |-[xcat-deps] conserver-xcat | +| | | | package updated to version 8.2.1 | +| | | | | ++---------------------------------+---------------+-------------+----------------------------------+ || xCAT 2.13.4 |- RHV 4.1 | |- OpenBMC support(experimental): | || 2017/5/19 | | | | || | | | rinv | From 0d13e6f121ca8996f5dba7da52caeaa327c4d279 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 10 Aug 2017 02:16:37 -0400 Subject: [PATCH 008/203] Activate the build 2.13.6 --- README.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/README.rst b/README.rst index c9250eb90..d45b6ea6e 100644 --- a/README.rst +++ b/README.rst @@ -8,7 +8,7 @@ Documentation xCAT documentation is available at: http://xcat-docs.readthedocs.io/en/latest/ -|docs_latest| |docs_2135| |docs_2134| |docs_2133| |docs_2132| |docs_2131| |docs_2130| |docs_212| +|docs_latest| |docs_2136| |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 `_ In particular the `GitHub `_ related subsection. +.. |docs_2136| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.6 + :alt: 2.13.6 documentation status + :scale: 100% + :target: http://xcat-docs.readthedocs.io/en/2.13.6/ + .. |docs_2135| image:: https://readthedocs.org/projects/xcat-docs/badge/?version=2.13.5 :alt: 2.13.5 documentation status :scale: 100% From 48264fed35ef324d32d507f846c154b32624b5eb Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 10 Aug 2017 03:07:59 -0400 Subject: [PATCH 009/203] update for release note update --- docs/source/overview/xcat2_release.rst | 46 ++++++++++++-------------- 1 file changed, 21 insertions(+), 25 deletions(-) diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 26bdd6b92..5a5557db1 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -14,38 +14,34 @@ xCAT 2.13.x |xCAT |New OS |New |New Feature | |Version | |Hardware | | +=================================+===============+=============+==================================+ -|| xCAT 2.13.6 |- RHEL 7.4 | |-OpenBMC support(Alpha level code)| -|| 2017/8/10 | | | | -|| | | | rsetboot | -| `2.13.6 Release Notes `_ | | |-WSP EUH support | -| | | | | -| | | | Hardware discovery | -| | | | bmcsetup | +|| xCAT 2.13.6 |- RHEL 7.4 |-Boston |-OpenBMC support(Alpha level code)| +|| 2017/8/10 | | server | | +|| | | | rsetboot net/hd/def | +| `2.13.6 Release Notes `_ | | | rspconfig retrieve OpenBCM ip/ | +| | | | netmask/gateway information | | | | |-nodeset performance enhancement | | | | | (Phase 3) | | | | | | | | | | Dispatch request to the specified| -| | | | service nodes | -| | | |-Boston server verification | -| | | |-CORAL hardware/switch discovery | -| | | | process | +| | | |service nodes with 'disjointdhcps'| +| | | | Enhance the output of nodeset in | +| | | |hierarchical cluster | | | | | | -| | | | the DHCP dynamic range | -| | | | DHCP relay | -| | | |-network configuration interface | +| | | |-network configuration interface: | +| | | | confignetwork is the only | +| | | |interface to configure network | +| | | |on SN/CN | | | | | | -| | | | niccustomscripts | -| | | | refine xCAT network scripts | -| | | | related document | -| | | |-xCAT MN migration steps | -| | | | verification | -| | | |-new xCAT prototype | +| | | |-For hardware discovery | +| | | | enhance bmcdiscover to use BMC | +| | | |MAC address to identify BMC with | +| | | |its host | +| | | | enhance "xcatprobe discovery" | +| | | |tool to do configuration check | +| | | |before starting hardware discovery| | | | | | -| | | | the framework for copycds | -| | | | the framework for deploying RH on| -| | | | x86 VMs | | | | |-[xcat-deps] xcat-genesis-base | | | | | package based on Fedora 26 ppc64 | +---------------------------------+---------------+-------------+----------------------------------+ From 7c37df4ba1e7f4236a879f721ec0713d0fe6a04f Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 10 Aug 2017 04:23:29 -0400 Subject: [PATCH 010/203] update the format --- docs/source/overview/xcat2_release.rst | 72 ++++++++++++++------------ 1 file changed, 39 insertions(+), 33 deletions(-) diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 5a5557db1..3eeee4299 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -14,60 +14,66 @@ xCAT 2.13.x |xCAT |New OS |New |New Feature | |Version | |Hardware | | +=================================+===============+=============+==================================+ -|| xCAT 2.13.6 |- RHEL 7.4 |-Boston |-OpenBMC support(Alpha level code)| +|| xCAT 2.13.6 |- RHEL 7.4 |-Boston |- OpenBMC support | || 2017/8/10 | | server | | || | | | rsetboot net/hd/def | | `2.13.6 Release Notes `_ | | | rspconfig retrieve OpenBCM ip/ | | | | | netmask/gateway information | -| | | |-nodeset performance enhancement | -| | | | (Phase 3) | +| | | |- nodeset performance enhancement | +| | | | (Phase 3) | | | | | | -| | | | Dispatch request to the specified| -| | | |service nodes with 'disjointdhcps'| -| | | | Enhance the output of nodeset in | -| | | |hierarchical cluster | +| | | | Dispatch request to the | +| | | | specified service nodes with | +| | | | 'disjointdhcps' | +| | | | Enhance the output of nodeset | +| | | | in hierarchical cluster | | | | | | -| | | |-network configuration interface: | -| | | | confignetwork is the only | -| | | |interface to configure network | -| | | |on SN/CN | +| | | |- network configuration interface:| | | | | | -| | | |-For hardware discovery | -| | | | enhance bmcdiscover to use BMC | -| | | |MAC address to identify BMC with | -| | | |its host | -| | | | enhance "xcatprobe discovery" | -| | | |tool to do configuration check | -| | | |before starting hardware discovery| +| | | | confignetwork is the only | +| | | | interface to configure network | +| | | | on SN/CN | | | | | | -| | | |-[xcat-deps] xcat-genesis-base | -| | | | package based on Fedora 26 ppc64 | +| | | |- For hardware discovery | +| | | | | +| | | | enhance bmcdiscover to use BMC | +| | | | MAC address to identify BMC with| +| | | | its host | +| | | | enhance "xcatprobe discovery" | +| | | | tool to do configuration check | +| | | | before starting hardware | +| | | | discovery | +| | | | | +| | | |- [xcat-deps] xcat-genesis-base | +| | | | package based on Fedora 26 ppc64| +---------------------------------+---------------+-------------+----------------------------------+ -|| xCAT 2.13.5 | | |-OpenBMC support(Alpha level code)| +|| xCAT 2.13.5 | | |- OpenBMC support | || 2017/6/30 | | | | || | | | rinv | | `2.13.5 Release Notes `_ | | |-Enhancements to self testing | -| | | | tool xcat-test | -| | | |-Service node pool support for | -| | | | rhels7 ppc64le diskless | -| | | |-Mellanox cumulus switch ZTP based| -| | | | discovery and auto-configuration | -| | | |-Performance enhancements | +| /XCAT_2.13.5_Release_Notes>`_ | | |- Enhancements to self testing | +| | | | tool xcat-test | +| | | |- Service node pool support for | +| | | | rhels7 ppc64le diskless | +| | | |- Mellanox cumulus switch ZTP | +| | | | based discovery and | +| | | | auto-configuration | +| | | |- Performance enhancements | | | | | | | | | | makedhcp, makedns | | | | | nodeset | -| | | |-[xcat-deps] ipmitool-xcat package| -| | | | updated to version 1.8.18 for | +| | | |- [xcat-deps] ipmitool-xcat | +| | | | package updated to version | +| | | | 1.8.18 for | | | | | | | | | | RHEL7.x | | | | | SLES12.x | | | | | Ubuntu14.04.x | -| | | |-[xcat-deps] conserver-xcat | -| | | | package updated to version 8.2.1 | +| | | |- [xcat-deps] conserver-xcat | +| | | | package updated to version 8.2.1| | | | | | +---------------------------------+---------------+-------------+----------------------------------+ || xCAT 2.13.4 |- RHV 4.1 | |- OpenBMC support(experimental): | From 1575a67437b5ca5dac5f6b40664e0fb79d6607f5 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 10 Aug 2017 04:33:00 -0400 Subject: [PATCH 011/203] update the format --- docs/source/overview/xcat2_release.rst | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index 3eeee4299..c6f7266b1 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -17,9 +17,10 @@ xCAT 2.13.x || xCAT 2.13.6 |- RHEL 7.4 |-Boston |- OpenBMC support | || 2017/8/10 | | server | | || | | | rsetboot net/hd/def | -| `2.13.6 Release Notes `_ | | | rspconfig retrieve OpenBCM ip/ | +| `2.13.6 Release Notes `_ | | | /delete/check | +| | | | rspconfig retrieve OpenBCM ip/ | | | | | netmask/gateway information | | | | |- nodeset performance enhancement | | | | | (Phase 3) | From 086f446da919bca6e370acff7243b1ca5493559f Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 10 Aug 2017 04:36:04 -0400 Subject: [PATCH 012/203] update the format --- docs/source/overview/xcat2_release.rst | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docs/source/overview/xcat2_release.rst b/docs/source/overview/xcat2_release.rst index c6f7266b1..7bec2cfde 100644 --- a/docs/source/overview/xcat2_release.rst +++ b/docs/source/overview/xcat2_release.rst @@ -20,6 +20,7 @@ xCAT 2.13.x | `2.13.6 Release Notes `_ | | | /delete/check | +| | | | | | | | | rspconfig retrieve OpenBCM ip/ | | | | | netmask/gateway information | | | | |- nodeset performance enhancement | @@ -27,7 +28,8 @@ xCAT 2.13.x | | | | | | | | | Dispatch request to the | | | | | specified service nodes with | -| | | | 'disjointdhcps' | +| | | | 'disjointdhcps' | +| | | | | | | | | Enhance the output of nodeset | | | | | in hierarchical cluster | | | | | | @@ -42,6 +44,7 @@ xCAT 2.13.x | | | | enhance bmcdiscover to use BMC | | | | | MAC address to identify BMC with| | | | | its host | +| | | | | | | | | enhance "xcatprobe discovery" | | | | | tool to do configuration check | | | | | before starting hardware | From 90223517b9e7f1b96dfb44f4680dec1ca5422046 Mon Sep 17 00:00:00 2001 From: "litingt@cn.ibm.com" Date: Thu, 10 Aug 2017 04:37:14 -0400 Subject: [PATCH 013/203] update for xCAT 2.13.6 release --- docs/source/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 270e99067..9d1b248b3 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -59,7 +59,7 @@ author = u'IBM Corporation' # The short X.Y version. version = '2' # The full version, including alpha/beta/rc tags. -release = '2.12' +release = '2.13.6' # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. From 294d59a307e77eacf918af4f0316e2988926d332 Mon Sep 17 00:00:00 2001 From: yangsong Date: Fri, 15 Sep 2017 16:56:02 +0800 Subject: [PATCH 014/203] merge master(commit:a183e3b8f241fb168b830dbe3f8f6f5b40fe1834) to 2.13 branch (#3929) It is for 2.13.7 RC1 --- Version | 2 +- build-ubunturepo | 2 +- builddep.sh | 2 +- docs/source/advanced/index.rst | 1 + docs/source/advanced/migration/index.rst | 7 + docs/source/advanced/migration/migration.rst | 189 ++++ .../manage_clusters/common/kvm/manage_vm.rst | 24 +- .../mtms/discovery_using_defined.rst | 6 +- .../references/man1/bmcdiscover.1.rst | 39 +- .../admin-guides/references/man1/rflash.1.rst | 36 +- .../references/man1/rsetboot.1.rst | 12 +- .../references/man1/rspconfig.1.rst | 8 +- .../references/man3/noderange.3.rst | 14 +- .../admin-guides/references/man5/nics.5.rst | 2 +- .../admin-guides/references/man5/site.5.rst | 12 + .../admin-guides/references/man5/xcatdb.5.rst | 21 + .../admin-guides/references/man7/group.7.rst | 4 +- .../admin-guides/references/man7/node.7.rst | 4 +- .../references/man7/osimage.7.rst | 2 +- makerpm | 2 + perl-xCAT/xCAT/CFMUtils.pm | 17 +- perl-xCAT/xCAT/MacMap.pm | 101 ++- perl-xCAT/xCAT/NetworkUtils.pm | 31 + perl-xCAT/xCAT/Schema.pm | 16 +- perl-xCAT/xCAT/Table.pm | 359 +++++++- perl-xCAT/xCAT/Usage.pm | 17 +- perl-xCAT/xCAT/Utils.pm | 10 +- xCAT-client/bin/rinstall | 7 - xCAT-client/pods/man1/bmcdiscover.1.pod | 29 +- xCAT-client/pods/man1/rflash.1.pod | 29 +- xCAT-client/pods/man1/rsetboot.1.pod | 8 +- xCAT-client/pods/man1/rspconfig.1.pod | 6 +- xCAT-client/pods/man3/noderange.3.pod | 11 +- xCAT-genesis-builder/buildrpm | 23 +- .../xCAT-genesis-builder.spec | 2 +- xCAT-genesis-scripts/bin/bmcsetup | 51 +- xCAT-genesis-scripts/bin/dodiscovery | 22 +- xCAT-genesis-scripts/bin/doxcat | 6 +- xCAT-probe/lib/perl/probe_utils.pm | 2 +- xCAT-probe/scripts/dbstats.py | 354 ++++++++ xCAT-probe/subcmds/clusterstatus | 224 ++++- xCAT-probe/subcmds/discovery | 75 +- xCAT-probe/subcmds/nodecheck | 6 +- xCAT-probe/subcmds/switch_macmap | 5 +- xCAT-probe/xCAT-probe.spec | 1 + xCAT-server/lib/perl/xCAT/Template.pm | 29 +- xCAT-server/lib/xcat/plugins/DBobjectdefs.pm | 90 +- xCAT-server/lib/xcat/plugins/aaadiscovery.pm | 15 - xCAT-server/lib/xcat/plugins/bmcconfig.pm | 8 +- xCAT-server/lib/xcat/plugins/bmcdiscover.pm | 120 ++- xCAT-server/lib/xcat/plugins/debian.pm | 6 +- xCAT-server/lib/xcat/plugins/destiny.pm | 3 +- xCAT-server/lib/xcat/plugins/grub2.pm | 2 +- xCAT-server/lib/xcat/plugins/ipmi.pm | 106 ++- xCAT-server/lib/xcat/plugins/kvm.pm | 21 +- xCAT-server/lib/xcat/plugins/networks.pm | 15 +- xCAT-server/lib/xcat/plugins/nodediscover.pm | 5 +- xCAT-server/lib/xcat/plugins/openbmc.pm | 370 +++++--- xCAT-server/lib/xcat/plugins/packimage.pm | 5 +- xCAT-server/lib/xcat/plugins/pdu.pm | 274 +++++- xCAT-server/lib/xcat/plugins/petitboot.pm | 2 +- xCAT-server/lib/xcat/plugins/rinstall.pm | 8 + xCAT-server/lib/xcat/plugins/sles.pm | 6 +- xCAT-server/lib/xcat/plugins/switch.pm | 2 +- .../lib/xcat/plugins/switchdiscover.pm | 38 +- xCAT-server/lib/xcat/plugins/updatenode.pm | 6 + xCAT-server/lib/xcat/plugins/xnba.pm | 2 +- xCAT-server/lib/xcat/plugins/zzzdiscovery.pm | 19 +- xCAT-server/sbin/xcatd | 90 +- xCAT-server/share/xcat/cons/openbmc | 12 +- .../install/rh/service.rhels7.ppc64le.pkglist | 4 + .../share/xcat/install/scripts/post.debian | 6 +- .../xcat/install/scripts/post.rhel5.s390x | 6 +- .../xcat/install/scripts/post.rhel6.s390x | 6 +- .../xcat/install/scripts/post.sles10.s390x | 6 +- .../xcat/install/scripts/post.sles11.s390x | 6 +- .../share/xcat/install/scripts/post.xcat | 8 +- .../share/xcat/mypostscript/mypostscript.tmpl | 19 + .../netboot/rh/service.rhels7.ppc64le.exlist | 35 + .../service.rhels7.ppc64le.otherpkgs.pkglist | 4 + .../netboot/rh/service.rhels7.ppc64le.pkglist | 48 + .../rh/service.rhels7.ppc64le.postinstall | 45 + .../netboot/rh/service.rhels7.x86_64.exlist | 35 + .../service.rhels7.x86_64.otherpkgs.pkglist | 4 + .../netboot/rh/service.rhels7.x86_64.pkglist | 47 + .../rh/service.rhels7.x86_64.postinstall | 45 + xCAT-server/share/xcat/scripts/configonie | 22 +- xCAT-server/share/xcat/scripts/xdcpmerge.sh | 4 +- .../bundle/hdctrl_openpower_ipmi.bundle | 1 + .../bundle/hdctrl_openpower_openbmc.bundle | 1 + .../autotest/bundle/rhels6.9_ppc64.bundle | 26 + .../autotest/bundle/rhels6.9_x86_64.bundle | 41 +- .../autotest/bundle/rhels7.3_ppc64.bundle | 34 + .../autotest/bundle/rhels7.3_ppc64le.bundle | 34 + .../autotest/bundle/rhels7.3_x86_64.bundle | 33 + .../autotest/bundle/rhels7.4_ppc64.bundle | 27 + .../autotest/bundle/rhels7.4_ppc64le.bundle | 44 +- .../autotest/bundle/rhels7.4_x86_64.bundle | 38 +- .../autotest/bundle/sles11.4_ppc64.bundle | 26 + .../autotest/bundle/sles11.4_x86_64.bundle | 32 +- .../autotest/bundle/sles12.2_ppc64le.bundle | 34 +- .../autotest/bundle/sles12.2_x86_64.bundle | 32 +- .../bundle/ubuntu14.04.4_ppc64le.bundle | 33 +- .../bundle/ubuntu14.04.4_x86_64.bundle | 32 +- .../bundle/ubuntu16.04.1_ppc64le.bundle | 33 +- .../bundle/ubuntu16.04.1_x86_64.bundle | 32 +- .../bundle/ubuntu16.04_ppc64le.bundle | 6 +- .../autotest/testcase/bmcdiscover/cases0 | 3 +- .../autotest/testcase/confignetwork/cases0 | 126 ++- .../testcase/discovery/bmc_discovery_only | 6 + .../testcase/discovery/discovery_test | 849 ++++++++++++++++++ .../discovery/mtm_based_node_discovery | 6 + .../discovery/switch_based_node_discovery | 6 + xCAT-test/autotest/testcase/genesis/cases0 | 11 + xCAT-test/autotest/testcase/genesis/test.sh | 79 ++ xCAT-test/autotest/testcase/infiniband/cases0 | 40 + .../rhel-infiniband-diskfull-install.sh | 183 ++++ .../rhel-infiniband-diskless-install.sh | 199 ++++ .../installation/customize_sleep_for_sn | 13 +- .../testcase/installation/pre_deploy_sn | 16 +- xCAT-test/autotest/testcase/makedhcp/cases0 | 6 +- .../autotest/testcase/makeknownhosts/cases0 | 6 +- xCAT-test/autotest/testcase/mkdef/cases1 | 12 +- xCAT-test/autotest/testcase/nodeset/cases0 | 95 ++ xCAT-test/autotest/testcase/passwd/case0 | 7 +- xCAT-test/autotest/testcase/pping/cases0 | 8 +- xCAT-test/autotest/testcase/ppping/cases0 | 69 +- xCAT-test/autotest/testcase/reventlog/cases0 | 4 +- xCAT-test/autotest/testcase/rspconfig/cases0 | 82 +- .../autotest/testcase/rspconfig/rspconfig.sh | 333 +++++-- ..._set_xcatmaster_in_sn_pool_tftp_mount_mode | 165 ++++ ...ter_in_sn_pool_tftp_mount_mode_checkresult | 49 + .../set_xcatmaster_in_sn_pool_tftp_mount_mode | 166 ++++ ...ter_in_sn_pool_tftp_mount_mode_checkresult | 49 + .../snpool/setup_sn_pool_tftp_mount_mode | 119 +++ xCAT-test/autotest/testcase/updatenode/cases3 | 5 +- xCAT-test/autotest/testcase/xcatconfig/case0 | 98 +- xCAT-test/autotest/testcase/xdcp/cases1 | 2 +- xCAT/postscripts/configeth | 5 +- xCAT/postscripts/confignetwork | 22 +- xCAT/postscripts/cumulusztp | 16 +- xCAT/postscripts/documulusdiscovery | 39 +- xCAT/postscripts/enablesnmp | 91 +- xCAT/postscripts/getcredentials.awk | 4 +- xCAT/postscripts/getmypostscript.cumulus | 1 + xCAT/postscripts/getpostscript.awk | 6 +- xCAT/postscripts/hardeths | 11 +- xCAT/postscripts/nicutils.sh | 69 +- xCAT/postscripts/servicenode | 17 +- xCAT/postscripts/syslog | 15 + xCAT/postscripts/xcatdsklspost | 4 +- xCATsn/xCATsn.spec | 6 + 152 files changed, 6173 insertions(+), 889 deletions(-) create mode 100644 docs/source/advanced/migration/index.rst create mode 100644 docs/source/advanced/migration/migration.rst create mode 100644 xCAT-probe/scripts/dbstats.py create mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.exlist create mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.otherpkgs.pkglist create mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.pkglist create mode 100755 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.postinstall create mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.exlist create mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.otherpkgs.pkglist create mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.pkglist create mode 100755 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.postinstall create mode 100644 xCAT-test/autotest/testcase/discovery/bmc_discovery_only create mode 100755 xCAT-test/autotest/testcase/discovery/discovery_test create mode 100644 xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery create mode 100644 xCAT-test/autotest/testcase/discovery/switch_based_node_discovery create mode 100755 xCAT-test/autotest/testcase/genesis/test.sh create mode 100644 xCAT-test/autotest/testcase/infiniband/cases0 create mode 100755 xCAT-test/autotest/testcase/infiniband/rhel-infiniband-diskfull-install.sh create mode 100755 xCAT-test/autotest/testcase/infiniband/rhel-infiniband-diskless-install.sh create mode 100644 xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode create mode 100644 xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult create mode 100644 xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode create mode 100644 xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult create mode 100644 xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode diff --git a/Version b/Version index 14239ef15..ea55a03fa 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -2.13.6 +2.13.7 diff --git a/build-ubunturepo b/build-ubunturepo index 65e44c88d..729067680 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -524,7 +524,7 @@ __EOF__ FILES_PATH="files" FRS="/var/www/${SERVER}/${FILES_PATH}" APT_DIR="${FRS}/xcat" - APT_REPO_DIR="${APT_DIR}/repos/apt" + APT_REPO_DIR="${APT_DIR}/repos/apt/devel" # Decide whether to upload the xcat-dep package or NOT (default is to NOT upload xcat-dep if [ "$UP" != "1" ]; then diff --git a/builddep.sh b/builddep.sh index 84ca78e40..1413dcca2 100755 --- a/builddep.sh +++ b/builddep.sh @@ -225,7 +225,7 @@ if [ "$OSNAME" == "AIX" ]; then else # Linux SYSGRP=root - YUM=yum + YUM=yum/devel FRSDIR='2.x_Linux' fi chgrp -R -h $SYSGRP * diff --git a/docs/source/advanced/index.rst b/docs/source/advanced/index.rst index 3a78e0ac9..8c84eb6ac 100755 --- a/docs/source/advanced/index.rst +++ b/docs/source/advanced/index.rst @@ -6,6 +6,7 @@ Advanced Topics chain/index.rst cluster_maintenance/index.rst + migration/index.rst confluent/index.rst docker/index.rst domain_name_resolution/index.rst diff --git a/docs/source/advanced/migration/index.rst b/docs/source/advanced/migration/index.rst new file mode 100644 index 000000000..7ceda4e45 --- /dev/null +++ b/docs/source/advanced/migration/index.rst @@ -0,0 +1,7 @@ +Migrate xCat Management node +============================ + +.. toctree:: + :maxdepth: 2 + + migration.rst diff --git a/docs/source/advanced/migration/migration.rst b/docs/source/advanced/migration/migration.rst new file mode 100644 index 000000000..c93902f58 --- /dev/null +++ b/docs/source/advanced/migration/migration.rst @@ -0,0 +1,189 @@ +xCAT Management Node Migration +============================== + +This document describes how to migrate xCAT Management node to a new node. The following example describes a typical scenario, this example is verified on redhat7.3. + +#. Initially, the first xcat management node is active, and the second node is passive. +#. Backup all useful xCAT data from xCAT Management node to back-up server at regular intervals. +#. When the first xCAT management node is broken, use backup to restore original xCAT data to the second node with the same host name and ip. + +Backup Old xCAT Management Node +------------------------------- + +Backup xCAT management node data to backup server: + +1.1 Backup xCAT important files and directories: + + #. Get ``installdir`` from ``site`` table, backup ``installdir`` directory, + in this case, back up ``install`` directory: :: + + lsdef -t site clustersite -i installdir + Object name: clustersite + installdir=/install + + #. Backup these two xCAT directories: :: + + ~/.xcat + /etc/xcat + + **Notes**: backing up ``~/.xcat`` is for all users who have xCAT client certs. + + #. If there are customized files and directories for ``otherpkgdir``, ``pkgdir``, ``pkglist`` or ``template`` in some `osimage` definitions, backup these files and directories. for example: :: + + lsdef -t osimage customized_rhels7.4-x86_64-install-compute -i otherpkgdir,pkgdir,pkglist,template + Object name: customized_rhels7.4-x86_64-install-compute + otherpkgdir=//post/otherpkgs/rhels7.4/x86_64 + pkgdir=//rhels7.4/x86_64 + pkglist=//compute.rhels7.pkglist + template=//compute.rhels7.tmpl + +1.2 Backup ssh related files: :: + + /etc/ssh + ~/.ssh + +1.3 Backup host files: :: + + /etc/resolv.conf + /etc/hosts + /etc/passwd + /etc/group + +1.4 Backup yum resource files: :: + + /etc/yum.repos.d + +1.5 Backup conserver conf files: :: + + /etc/conserver.cf + +1.6 Backup DNS related files: :: + + /etc/named + /etc/named.conf + /etc/named.iscdlv.key + /etc/named.root.key + /etc/rndc.key + /etc/sysconfig/named + /var/named + +1.7 Backup dhcp files: :: + + /etc/dhcp + /var/lib/dhcpd + /etc/sysconfig/dhcpd + /etc/sysconfig/dhcpd6 + +1.8 Backup apache: :: + + /etc/httpd + /var/www + +1.9 Backup tftp files: :: + + /tftpboot + +1.10 Backup NTP configure file: :: + + /etc/ntp.conf + +1.11 Backup database configure files (optional): + + * **[PostgreSQL]** :: + + /var/lib/pgsql/data/pg_hba.conf + /var/lib/pgsql/data/postgresql.conf + +1.12 Backup NFS (optional): :: + + /etc/exports + /var/lib/nfs + /etc/sysconfig/nfs + +1.13 (optional) + +Besides the files mentioned above, there may be some additional customization files and production files that need to be backup, depending on your local unique requirements. Here are some example files that can be considered: :: + + /.profile + /.rhosts + /etc/auto_master + /etc/auto/maps/auto.u + /etc/motd + /etc/security/limits + /etc/netscvc.conf + /etc/inetd.conf + /etc/security/passwd + /etc/security/group + /etc/services + /etc/inittab(andmore) + +1.14 Backup the xCAT database tables for the current configuration, using command: :: + + dumpxCATdb -p + +1.15 Save all installed xCAT RPM names into a file: :: + + rpm -qa|grep -i xCAT > xcat_rpm_names + +1.16 (Optional) Find customization made to files installed from packages, backup these files. For example :: + + rpm -q --verify -a conserver-xcat + rpm -q --verify -a xCAT-server + rpm -q --verify -a syslinux-xcat + rpm -q --verify -a xCAT-client + rpm -q --verify -a xCAT + + +Restore xCAT management node +---------------------------- + +2.1 Power off old xCAT management server before configuring new xCAT management server + +2.2 Configure new xCAT management server using the same ip and hostname as old xCAT management server. Configure the same additional network for hardware management network if needed, for example, bmc network or hmc network. xCAT management server setup refer to :doc:`Prepare the Management Node <../../guides/install-guides/yum/prepare_mgmt_node>` + +2.3 Overwrite files/directories methioned in above 1.2, 1.3, 1.4 from backup server to new xCAT management server + +2.4 Download xcat-core and xcat-dep tar ball, then install xCAT in new xCAT management server, refer to :doc:`install xCAT <../../guides/install-guides/yum/install>` + +2.5 Use ``rpm -qa|grep -i xCAT`` to list all xCAT RPMs in new xCAT management node, compare these RPMs base name with those in ``xcat_rpm_names`` from above 1.15. If some RPMs are missing, use ``yum install `` to install missing RPMs. + +2.6 If use ``MySQL``/``MariaDB``/``PostgreSQL``, migrate xCAT to use ``MySQL/MariaDB/PostgreSQL`` refer to :doc:`Configure a Database <../hierarchy/databases/index>` + +2.7 To restore the xCAT database + + a. Restore xCAT database from the ``/dbbackup/db`` directory without ``auditlog`` and ``eventlog``, enter: :: + + restorexCATdb -p /dbbackup/db + + b. Restore the xCAT database including ``auditlog`` and ``eventlog`` from the ``/dbbackup/db`` directory, enter: :: + + restorexCATdb -a -p /dbbackup/db + + c. (optinal) Overwrite files in above 1.11, restart ``PostgreSQL``: :: + + service postgresql restart + +2.8 Overwrite remaining files/directories methioned in above 1.1, 1.5, 1.6, 1.7, 1.8, 1.9, 1.10, 1.12; If needed, check if files exist based on above 1.13 and 1.16. + +2.9 Verify xCAT: :: + + tabdump site + +2.10 Restart ``named``, use ``nslookup`` to check ``DNS``: :: + + service named restart + nslookup + +2.11 Restart ``conserver``, use ``rcons`` to check console: :: + + service conserver restart + rcons + +2.12 Configure DHCP: :: + + makedhcp -n + makedhcp -a + +2.13 Restart ``httpd`` for REST API, for more information refer to :doc:`Rest API<../../../advanced/restapi/index>`: :: + + service httpd restart diff --git a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst index f383e065d..6aa25256c 100644 --- a/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst +++ b/docs/source/guides/admin-guides/manage_clusters/common/kvm/manage_vm.rst @@ -2,7 +2,7 @@ Manage Virtual Machine (VM) ============================ -Now the MowerKVM hypervisor "kvmhost1" is ready, this section introduces the VM management in xCAT, including examples on how to create, remove and clone VMs. +Now the PowerKVM hypervisor "kvmhost1" is ready, this section introduces the VM management in xCAT, including examples on how to create, remove and clone VMs. Create Virtual Machine ---------------------- @@ -82,7 +82,27 @@ After the VM object is created, several key attributes need to be specified with chtab node=vm1 vm.vidpassword=abc123 -10. Set **netboot** attribute +10. (optional)For assigning PCI devices to the VM, set **othersettings** value: :: + + chtab node=vm1 vm.othersettings="devpassthrough:0000:01:00.2" + + Or: :: + + chtab node=vm1 vm.othersettings="devpassthrough:pci_0000_01_00_2" + + Take assigning SR-IOV VFs to the VM as an example: + + * Use ``lspci`` to get VFs PCI from hypervisor: :: + + lspci|grep -i "Virtual Function" + 0000:01:00.1 Infiniband controller: Mellanox Technologies MT27700 Family [ConnectX-4 Virtual Function] + 0000:01:00.2 Infiniband controller: Mellanox Technologies MT27700 Family [ConnectX-4 Virtual Function] + + * Set the VFs PCI into ``vm`` table on MN: :: + + chtab node=vm1 vm.othersettings="devpassthrough:0000:01:00.1,0000:01:00.2" + +11. Set **netboot** attribute * **[x86_64]** :: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst index d69d5d706..f12aa1354 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst @@ -93,6 +93,9 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi serial=10112CA ip=10.1.2.1 +#. Define the compute nodes into xCAT: :: + + cat predefined.stanzas | mkdef -z #. Set the chain table to run the ``bmcsetup`` script, this will set the BMC IP to static. :: @@ -110,9 +113,6 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi chdef cn01 bmc=172.20.2.1 -#. Define the compute nodes into xCAT: :: - - cat predefined.stanzas | mkdef -z #. Add the compute node IP information to ``/etc/hosts``: :: diff --git a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst index 7173c39f5..6fde20bb8 100644 --- a/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst +++ b/docs/source/guides/admin-guides/references/man1/bmcdiscover.1.rst @@ -23,7 +23,7 @@ SYNOPSIS \ **bmcdiscover**\ [\ **-v | -**\ **-version**\ ] -\ **bmcdiscover**\ [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] \ **-**\ **-range**\ \ *ip_ranges*\ +\ **bmcdiscover**\ [\ **-**\ **-sn**\ \ *SN_nodename*\ ] [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] \ **-**\ **-range**\ \ *ip_ranges*\ \ **bmcdiscover**\ \ **-u**\ \ *bmc_user*\ \ **-p**\ \ *bmc_passwd*\ \ **-i**\ \ *bmc_ip*\ \ **-**\ **-check**\ @@ -56,6 +56,12 @@ OPTIONS +\ **-**\ **-sn**\ + + Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, bmcdiscover will be dispatched to the specified SNs. Then, the nodename of the service node that 'bmcdiscover' is running on will be set to the 'servicenode' attribute of the discovered BMC node. + + + \ **-s**\ Scan method (The only supported scan method at this time is \ **nmap**\ ) @@ -142,7 +148,7 @@ EXAMPLES Note: Input for IP range can be in the form: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254. -2. To get all BMSs in IP range "10.4.22-23.100-254", displayed in xCAT stanza format: +2. To get all BMCs in IP range "10.4.22-23.100-254", displayed in xCAT stanza format: .. code-block:: perl @@ -150,7 +156,30 @@ Note: Input for IP range can be in the form: scanme.nmap.org, microsoft.com/24, bmcdiscover -s nmap --range "10.4.22-23.100-254" -z -3. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console: +3. To discover BMCs through sn01: + + +.. code-block:: perl + + bmcdiscover --sn sn01 -s nmap --range "10.4.22-23.100-254" -z + + +Output is similar to: + + +.. code-block:: perl + + node-70e28414291b: + objtype=node + groups=all + bmc=10.4.22.101 + cons=openbmc + mgt=openbmc + servicenode=sn01 + conserver=sn01 + + +4. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console: .. code-block:: perl @@ -158,7 +187,7 @@ Note: Input for IP range can be in the form: scanme.nmap.org, microsoft.com/24, bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z -4. To check if the username or password is correct against the BMC: +5. To check if the username or password is correct against the BMC: .. code-block:: perl @@ -166,7 +195,7 @@ Note: Input for IP range can be in the form: scanme.nmap.org, microsoft.com/24, bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --check -5. Get BMC IP Address source, DHCP Address or static Address +6. Get BMC IP Address source, DHCP Address or static Address .. code-block:: perl diff --git a/docs/source/guides/admin-guides/references/man1/rflash.1.rst b/docs/source/guides/admin-guides/references/man1/rflash.1.rst index 84d176e49..12833968e 100644 --- a/docs/source/guides/admin-guides/references/man1/rflash.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rflash.1.rst @@ -50,14 +50,20 @@ OpenPOWER BMC specific (using IPMI): ==================================== -\ **rflash**\ \ *noderange*\ [\ *hpm_file_path*\ | \ **-d=**\ \ *data_directory*\ ] [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ] +\ **rflash**\ \ *noderange*\ [\ *hpm_file_path*\ | \ **-d**\ \ *data_directory*\ ] [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ] + +\ **rflash**\ \ *noderange*\ \ **-**\ **-recover**\ \ *bmc_file_path*\ OpenPOWER OpenBMC specific : ============================ -\ **rflash**\ \ *noderange*\ [\ *tar_file_path*\ | \ *image_id*\ ] [\ **-c | -**\ **-check**\ ] [\ **-a | -**\ **-activate**\ ] [\ **-l | -**\ **-list**\ ] [\ **-u | -**\ **-upload**\ ] [\ **-d | -**\ **-delete**\ ] +\ **rflash**\ \ *noderange*\ {[\ **-c | -**\ **-check**\ ] | [\ **-l | -**\ **-list**\ ]} + +\ **rflash**\ \ *noderange*\ \ *tar_file_path*\ {[\ **-c | -**\ **-check**\ ] | [\ **-a | -**\ **-activate**\ ] | [\ **-u | -**\ **-upload**\ ]} + +\ **rflash**\ \ *noderange*\ \ *image_id*\ {[\ **-a | -**\ **-activate**\ ] | [\ **-d | -**\ **-delete**\ ]} @@ -168,11 +174,11 @@ The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER n \ **-d**\ \ *data_directory*\ + PPC (without HMC, using Direct FSP Management) specific: + 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. - - -\ **-d=**\ \ *data_directory*\ + OpenPOWER BMC specific (using IPMI): 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. @@ -192,8 +198,14 @@ The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER n \ **-**\ **-recover**\ + PPC (with HMC) and PPC (without HMC, using Direct FSP Management) specific: + Used to recover the flash image in the permanent side of the chip to the temporary side for both managed systems and power subsystems. + OpenPOWER BMC specific (using IPMI): + + Used for IBM Power S822LC for Big Data systems only. Used to recover the BMC with a BMC image downloaded from FixCentral. + \ **-**\ **-retry=**\ \ *count*\ @@ -204,7 +216,7 @@ The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER n \ **-a|-**\ **-activate**\ - Activate update image. Image id must be specified. + Activate update image. Image id or update file must be specified. @@ -318,7 +330,17 @@ The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER n .. code-block:: perl - rflash briggs01 -d=/root/supermicro/OP825 + rflash briggs01 -d /root/supermicro/OP825 + + + + +7. To update the firmware on the OpenBMC machine, specify the firmare update file to upload and activate: + + + .. code-block:: perl + + rflash p9euh02 -a /tmp/witherspoon.pnor.squashfs.tar diff --git a/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst b/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst index 73f96eaf1..da5c3876e 100644 --- a/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rsetboot.1.rst @@ -11,7 +11,7 @@ SYNOPSIS ******** -\ **rsetboot**\ \ *noderange*\ {\ **hd | net | cd | default | stat**\ } [\ **-u**\ ] [\ **-p**\ ] +\ **rsetboot**\ \ *noderange*\ [\ **hd | net | cd | default | stat**\ ] [\ **-u**\ ] [\ **-p**\ ] \ **rsetboot**\ [\ **-h | -**\ **-help | -v | -**\ **-version**\ ] @@ -21,7 +21,7 @@ DESCRIPTION *********** -\ **rsetboot**\ sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via rpower(1)|rpower.1), the nodes will return to using the default boot device specified in the BIOS. Currently this command is only supported for IPMI nodes. +\ **rsetboot**\ sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via rpower(1)|rpower.1), the nodes will return to using the default boot device specified in the BIOS. ******* @@ -101,6 +101,14 @@ EXAMPLES rsetboot node[14-56],node[70-203] stat + Or: + + + .. code-block:: perl + + rsetboot node[14-56],node[70-203] + + 3. diff --git a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst index c2a4d365c..038709fe0 100644 --- a/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rspconfig.1.rst @@ -47,7 +47,7 @@ OpenBMC specific: ================= -\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | vlan | sshcfg**\ } +\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | hostname | vlan | sshcfg**\ } MPA specific: @@ -394,6 +394,12 @@ OPTIONS +\ **hostname**\ + + Get or set hostname on the service processor. + + + \ **vlan**\ Get or set vlan ID. For get vlan ID, if vlan is not enabled, 'BMC VLAN disabled' will be outputed. For set vlan ID, the valid value are [1-4096]. diff --git a/docs/source/guides/admin-guides/references/man3/noderange.3.rst b/docs/source/guides/admin-guides/references/man3/noderange.3.rst index 2505ae4ae..c172e5218 100644 --- a/docs/source/guides/admin-guides/references/man3/noderange.3.rst +++ b/docs/source/guides/admin-guides/references/man3/noderange.3.rst @@ -59,7 +59,11 @@ Name conveniently specify a list of nodes. The result is that the command will be applied to a range of nodes, often in parallel. -To avoid shell expansion, \ **noderange**\ should better be quoted with single quotes('') or double quotes(""). +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: @@ -359,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**\ **************** diff --git a/docs/source/guides/admin-guides/references/man5/nics.5.rst b/docs/source/guides/admin-guides/references/man5/nics.5.rst index cf4aab58c..208523103 100644 --- a/docs/source/guides/admin-guides/references/man5/nics.5.rst +++ b/docs/source/guides/admin-guides/references/man5/nics.5.rst @@ -129,7 +129,7 @@ nics Attributes: \ **nicsadapter**\ Comma-separated list of extra parameters that will be used for each NIC configuration. - !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. + !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face diff --git a/docs/source/guides/admin-guides/references/man5/site.5.rst b/docs/source/guides/admin-guides/references/man5/site.5.rst index 7fb2bf6cc..94259601d 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -390,6 +390,18 @@ site Attributes: hierarchicalattrs: Table attributes(e.g. postscripts, postbootscripts) that will be included hierarchically. Attribute values for all the node's groups will be applied to the node in the groups' order except the repeat one. + dbtracelevel: The trace level for the database access log. To activate this setting, please. + restart xcatd or send HUP signal to the 'xcatd: DB Access' process, Like: . + ps -ef | grep 'xcatd: DB Access' | grep -v grep | awk '{print $2}' | xargs kill -HUP + Currrent support values: + 0: disable the trace log for db + 1: trace the calls of database subroutines + 2: Besides the log from level 1, trace the event to build the cache for the table + 3: Besides the log from level 2, trace the event with cache hit + 4: Besides the log from level 3, trace the SQL statement for the db access + With this configuration, xcat will send the log to syslog very frequently, some of the + log may be lost if imjournal is enabled by rsyslog. + Please see https://github.com/xcat2/xcat-core/issues/3910 for the detail. ----------------------- VIRTUALIZATION ATTRIBUTES diff --git a/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst b/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst index e2cb86603..b4a9ba93e 100644 --- a/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst +++ b/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst @@ -157,6 +157,27 @@ Before you panic, let me explain each column: See http://www.perl.com/doc/manual/html/pod/perlre.html for information on perl regular expressions. +Regular Expression Helper Functions +============================ + +xCAT provides several functions that can simplify regular expressions. + +\ **a2idx(character) **\ + Turns a single character into a 1-indexed index. ‘a’ maps to 1 and ‘z’ maps to 26. + +\ **a2zidx(character) **\ + Turns a single character into a 0-indexed index. ‘a’ maps to 0 and ‘z’ maps to 25. + +\ **dim2idx(value, [count, value...]) **\ + Converts dimensions (such as row, column, chassis, etc) into an index. If each rack has 18 nodes, use dim2idx(racknum, 18, nodenum). Additional dimensions should be added at the beginning. All values are 1-indexed. + +\ **skip(index, skiplist) **\ + Return an index with certain values skipped. The skip list uses the format start[:count][,start[:count]...] + +\ **ipadd(octet1, octet2, octet3, octet4, toadd, skipstart, skipend) **\ + Add to an IP address. Generally only necessary when you cross octets. Optionally skip addresses at the start and end of octets (like .0 or .255). Technically those are valid IP addresses, but sometimes software makes poor assumptions about which broadcast and gateway addresses. + + Easy Regular Expressions ======================== diff --git a/docs/source/guides/admin-guides/references/man7/group.7.rst b/docs/source/guides/admin-guides/references/man7/group.7.rst index 9a67dd224..a79e56ee8 100644 --- a/docs/source/guides/admin-guides/references/man7/group.7.rst +++ b/docs/source/guides/admin-guides/references/man7/group.7.rst @@ -41,7 +41,7 @@ group Attributes: \ **addkcmdline**\ (bootparams.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(" ") @@ -669,7 +669,7 @@ group Attributes: \ **nicsadapter**\ (nics.nicsadapter) Comma-separated list of extra parameters that will be used for each NIC configuration. - !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. + !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face diff --git a/docs/source/guides/admin-guides/references/man7/node.7.rst b/docs/source/guides/admin-guides/references/man7/node.7.rst index 0ab71ac4d..fbf9ada59 100644 --- a/docs/source/guides/admin-guides/references/man7/node.7.rst +++ b/docs/source/guides/admin-guides/references/man7/node.7.rst @@ -41,7 +41,7 @@ node Attributes: \ **addkcmdline**\ (bootparams.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(" ") @@ -669,7 +669,7 @@ node Attributes: \ **nicsadapter**\ (nics.nicsadapter) Comma-separated list of extra parameters that will be used for each NIC configuration. - !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. + !,!, for example, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face diff --git a/docs/source/guides/admin-guides/references/man7/osimage.7.rst b/docs/source/guides/admin-guides/references/man7/osimage.7.rst index c74014cf6..b4310d976 100644 --- a/docs/source/guides/admin-guides/references/man7/osimage.7.rst +++ b/docs/source/guides/admin-guides/references/man7/osimage.7.rst @@ -41,7 +41,7 @@ osimage Attributes: \ **addkcmdline**\ (linuximage.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. diff --git a/makerpm b/makerpm index 4fc2bab20..b093e116d 100755 --- a/makerpm +++ b/makerpm @@ -145,6 +145,8 @@ function makexcat { cp xcat.conf $RPMROOT/SOURCES cp xcat.conf.apach24 $RPMROOT/SOURCES cp xCATSN $RPMROOT/SOURCES + cp -a ../xCAT/etc/rsyslog.d $RPMROOT/ + cp -a ../xCAT/etc/logrotate.d $RPMROOT/ cd - >/dev/null elif [ "$RPMNAME" = "xCAT-buildkit" ]; then ARCH="noarch" diff --git a/perl-xCAT/xCAT/CFMUtils.pm b/perl-xCAT/xCAT/CFMUtils.pm index e2563cfa4..d6a36c659 100644 --- a/perl-xCAT/xCAT/CFMUtils.pm +++ b/perl-xCAT/xCAT/CFMUtils.pm @@ -184,7 +184,7 @@ sub updateUserInfo { # update the merge file my $mergefile = $cfmdir . "/" . $file . ".merge"; - my @diff = xCAT::CFMUtils->arrayops("D", \@newrecords, \@oldrecords); + my @diff = xCAT::CFMUtils->arrayops("D", \@newrecords, \@oldrecords, 1); # output the diff to merge files my $fp; @@ -865,6 +865,7 @@ sub trim { $flag - "U"/"I"/"D" \@array1 - reference to an arrary \@array2 - reference to an arrary + $odered - flag to keep pervious order Returns: @union/@intersection/@difference Globals: @@ -878,7 +879,7 @@ sub trim { #----------------------------------------------------------------------------- sub arrayops { - my ($class, $ops, $array1, $array2) = @_; + my ($class, $ops, $array1, $array2, $ordered) = @_; my @union = (); my @intersection = (); @@ -886,21 +887,23 @@ sub arrayops { my %count = (); foreach my $element (@$array1, @$array2) { - $count{$element}++ + $count{$element}++; + push @union, $element unless ( $count{$element} > 1 ); } - foreach my $element (keys %count) { - push @union, $element; + unless( defined($ordered) and $ordered ) { + @union = keys %count; + } + + foreach my $element (@union) { push @{ $count{$element} > 1 ? \@intersection : \@difference }, $element; } - if ($ops eq "U") { return @union; } if ($ops eq "I") { return @intersection; } if ($ops eq "D") { return @difference; } - #return (\@union, \@intersection, \@difference); } diff --git a/perl-xCAT/xCAT/MacMap.pm b/perl-xCAT/xCAT/MacMap.pm index 426cf1619..103ef87d4 100644 --- a/perl-xCAT/xCAT/MacMap.pm +++ b/perl-xCAT/xCAT/MacMap.pm @@ -225,7 +225,7 @@ sub rvlan { my $switchestab = xCAT::Table->new('switches', -create => 0); my @switchesents; if ($switchestab) { - foreach (values %{ $switchestab->getNodesAttribs($switches, [qw(switch snmpversion username password privacy auth)]) }) { + foreach (values %{ $switchestab->getNodesAttribs($switches, [qw(switch snmpversion username password privacy auth switchtype)]) }) { push @switchesents, @$_; } } @@ -309,7 +309,7 @@ sub dump_mac_info { } } my $switchestab = xCAT::Table->new('switches', -create => 0); - my @switchesents = $switchestab->getAllNodeAttribs([qw(switch snmpversion username password privacy auth)]); + my @switchesents = $switchestab->getAllNodeAttribs([qw(switch snmpversion username password privacy auth switchtype)]); $self->fill_switchparms(community => $community, switchesents => \@switchesents); my $switchtab = xCAT::Table->new('switch', -create => 0); my @entries = (); @@ -337,7 +337,12 @@ sub dump_mac_info { if ($self->{show_verbose_info}) { xCAT::MsgUtils->message("I", { data => ["$switch: Attempting to refresh switch information..."] }, $self->{callback}); } + my $probestart = time; $self->refresh_switch(undef, $community, $switch); + my $probestop = time; + my $probeduration = $probestop - $probestart; + xCAT::MsgUtils->message("S", "xcatprobe refresh_switch $switch ElapsedTime:$probeduration sec"); + if ($self->{show_verbose_info}) { xCAT::MsgUtils->message("I", { data => ["$switch: Finished refreshing switch information."] }, $self->{callback}); } @@ -403,7 +408,13 @@ sub find_mac { #If requesting a cache only check or the cache is a mere 20 seconds old #don't bother querying switches if ($cachedonly or ($self->{timestamp} > (time() - 20))) { return undef; } + + my $runstart = time; $self->refresh_table($discover_switch); #not cached or stale cache, refresh + my $runstop = time; + my $diffduration = $runstop - $runstart; + xCAT::MsgUtils->message("S", "refresh_table ElapsedTime:$diffduration sec"); + if ($self->{mactable}->{ lc($mac) }) { return $self->{mactable}->{ lc($mac) }; } @@ -419,6 +430,7 @@ sub fill_switchparms { foreach (@switchentries) { my $curswitch = $_->{switch}; $self->{switchparmhash}->{$curswitch} = $_; + $self->{switchparmhash}->{$curswitch}->{switchtype}=$_->{switchtype}; if ($_->{snmpversion}) { if ($_->{snmpversion} =~ /3/) { #clean up to accept things like v3 or ver3 or 3, whatever. $self->{switchparmhash}->{$curswitch}->{snmpversion} = 3; @@ -444,7 +456,7 @@ sub refresh_table { $self->{mactable} = {}; $self->{switchtab} = xCAT::Table->new('switch', -create => 1); $self->{switchestab} = xCAT::Table->new('switches', -create => 1); - my @switchentries = $self->{switchestab}->getAllNodeAttribs([qw(switch snmpversion username password privacy auth)]); + my @switchentries = $self->{switchestab}->getAllNodeAttribs([qw(switch snmpversion username password privacy auth switchtype)]); my $community = "public"; #$self->{sitetab} = xCAT::Table->new('site'); @@ -477,6 +489,9 @@ sub refresh_table { unless (defined $_->{password}) { #if no password set, inherit the community $self->{switchparmhash}->{$curswitch}->{password} = $community; } + if (defined $_->{switchtype}){ + $self->{switchparmhash}->{$curswitch}->{switchtype} =$_->{switchtype}; + } } my %checked_pairs; my @entries = $self->{switchtab}->getAllNodeAttribs([ 'node', 'port', 'switch' ]); @@ -497,7 +512,7 @@ sub refresh_table { my $ntype = $typehash->{$entry->{node}}->[0]->{nodetype}; if ( (($discover_switch) and ( $ntype ne "switch")) or ( !($discover_switch) and ( $ntype eq "switch")) ){ - xCAT::MsgUtils->message("S", "refresh_table: skip $entry->{node} and $entry->{switch}"); + xCAT::MsgUtils->message("S", "refresh_table: skip $entry->{node} and $entry->{switch}, $discover_switch , $ntype\n"); next; } if (defined($entry->{switch}) and $entry->{switch} ne "" and defined($entry->{port}) and $entry->{port} ne "") { @@ -534,7 +549,11 @@ sub refresh_table { if ($cpid == 0) { close($child); + my $runstart = time; $self->refresh_switch($parent, $community, $entry->{switch}); + my $runstop = time; + my $diffduration = $runstop - $runstart; + xCAT::MsgUtils->message("S", "refresh_switch $entry->{switch} ElapsedTime:$diffduration sec"); exit(0); } close($parent); @@ -615,6 +634,9 @@ sub walkoid { return $retmap; } + + + sub getsnmpsession { #gets an snmp v3 session appropriate for a switch using the switches table for guidance on the hows @@ -688,7 +710,54 @@ sub refresh_switch { my $community = shift; my $switch = shift; - #if ($error) { die $error; } + unless($self->{collect_mac_info}) + { + if($self->{switchparmhash}->{$switch}->{switchtype} eq 'onie'){ + #for cumulus switch, the MAC table can be retrieved with ssh + #which is much faster than snmp + my $mymac; + my $myport; + + my @res=xCAT::Utils->runcmd("ssh -o StrictHostKeyChecking=no -o PasswordAuthentication=no $switch 'bridge fdb show|grep -i -v permanent|tr A-Z a-z 2>/dev/null' 2>/dev/null",-1); + unless (@res) { + xCAT::MsgUtils->message("S", "Failed to get mac table with ssh to $switch, fall back to snmp! To obtain mac table with ssh, please make sure the passwordless root ssh to $switch is available"); + }else{ + foreach (@res){ + if($_ =~ m/^([0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}:[0-9a-z]{2}) dev swp([0-9]+) .*/){ + $mymac=$1; + $myport=$2; + $myport=sprintf("%d",$myport); + + #try all the possible port number formats + #e.g, "5","swp5","05","swp05" + unless(exists $self->{switches}->{$switch}->{$myport}){ + if(exists $self->{switches}->{$switch}->{"swp".$myport}){ + $myport="swp".$myport; + }else{ + $myport=sprintf("%02d",$myport); + unless(exists $self->{switches}->{$switch}->{$myport}){ + if(exists $self->{switches}->{$switch}->{"swp".$myport}){ + $myport="swp".$myport; + }else{ + $myport=""; + } + } + } + } + + if($myport){ + if($output){ + printf $output "$mymac|%s\n", $self->{switches}->{$switch}->{$myport}; + } + } + } + + } + return; + } + } + } + my $session = $self->getsnmpsession('community' => $community, 'switch' => $switch); unless ($session) { xCAT::MsgUtils->message("S", "Failed to communicate with $switch"); @@ -734,6 +803,9 @@ sub refresh_switch { xCAT::MsgUtils->message("I", "MTU information is not availabe for this switch $switch"); } + # get port state + my $mactostate = walkoid($session, '.1.3.6.1.2.1.17.7.1.2.2.1.3', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); + #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 @@ -762,6 +834,10 @@ sub refresh_switch { $self->{nodeinfo}->{ $self->{switches}->{$switch}->{$portname} }->{vlans}->{$portname} = $trunktovlanmap->{$portid}; } } + #still needs output if there are no switchport defined on the nodes + if (not defined $portname) { + $vlans_to_check{'NA'} = 1; + } } } else { $vlans_to_check{'NA'} = 1; @@ -784,9 +860,11 @@ sub refresh_switch { my $bridgetoifmap = walkoid($session, '.1.3.6.1.2.1.17.1.4.1.2', ciscowarn => $iscisco, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); # Good for all switches if (not ref $bridgetoifmap or !keys %{$bridgetoifmap}) { xCAT::MsgUtils->message("S", "Error communicating with " . $session->{DestHost} . ": failed to get a valid response to BRIDGE-MIB request"); + if ($self->{collect_mac_info}) { + $self->{macinfo}->{$switch}->{ErrorStr} = "Failed to get a valid response to BRIDGE-MIB request"; + } return; } - # my $mactoindexmap = walkoid($session,'.1.3.6.1.2.1.17.4.3.1.2'); my $mactoindexmap = walkoid($session, '.1.3.6.1.2.1.17.7.1.2.2.1.2', silentfail => 1, verbose => $self->{show_verbose_info}, switch => $switch, callback => $self->{callback}); unless (defined($mactoindexmap)) { #if no qbridge defined, try bridge mib, probably cisco @@ -795,9 +873,11 @@ sub refresh_switch { } #Ok, time to process the data if (not ref $mactoindexmap or !keys %{$mactoindexmap}) { xCAT::MsgUtils->message("S", "Error communicating with " . $session->{DestHost} . ": Unable to get MAC entries via either BRIDGE or Q-BRIDE MIB"); + if ($self->{collect_mac_info}) { + $self->{macinfo}->{$switch}->{ErrorStr} = "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 = (); @@ -807,8 +887,11 @@ sub refresh_switch { 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; + # Skip "permanent" ports + if (!defined($mactostate->{$_}) || $mactostate->{$_} != 4) { + push @{ $index_to_mac{$index} }, $macstring; + push @{ $index_to_vlan{$index} }, $vlan; + } } foreach my $boid (keys %$bridgetoifmap) { my $port_index = $boid; diff --git a/perl-xCAT/xCAT/NetworkUtils.pm b/perl-xCAT/xCAT/NetworkUtils.pm index 9b65054a2..cb01ca93e 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -2778,4 +2778,35 @@ sub gen_net_boot_params return $net_params; } +#-------------------------------------------------------------------------------- +=head3 send_tcp_msg + establish a tcp socket to the specified IP address and port, then send the specifid message via the socket + Arguments: + $destip : the destination IP address + $destport: the destination TCP port + $msg : the message to send + Returns: + 0 on success, 1 on fail +=cut +#-------------------------------------------------------------------------------- +sub send_tcp_msg { + my $self=shift; + my $destip=shift; + my $destport=shift; + my $msg=shift; + + my $sock = new IO::Socket::INET( + PeerAddr => $destip, + PeerPort => $destport, + Timeout => '1', + Proto => 'tcp' + ); + if ($sock) { + print $sock $msg; + close($sock); + return 0; + }else{ + return 1; + } +} 1; diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 2dfdb7076..f4f9965cc 100755 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -226,7 +226,7 @@ qq{ link,ro - The file is readonly, and will be placed in tmpfs on the booted no 'vncport' => 'Tracks the current VNC display port (currently not meant to be set', 'textconsole' => 'Tracks the Psuedo-TTY that maps to the serial port or console of a VM', 'powerstate' => "This flag is used by xCAT to track the last known power state of the VM.", -'othersettings' => "This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:\"vcpupin:'0-15,^8'\",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0',the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running B on the host.", +'othersettings' => "This allows specifying a semicolon delimited list of key->value pairs to include in a vmx file of VMware or KVM. For partitioning on normal power machines, this option is used to specify the hugepage and/or bsr information, the value is like:'hugepage:1,bsr=2'. For KVM cpu pinning, this option is used to specify the physical cpu set on the host, the value is like:\"vcpupin:'0-15,^8'\",Its syntax is a comma separated list and a special markup using '-' and '^' (ex. '0-4', '0-3,^2') can also be allowed, the '-' denotes the range and the '^' denotes exclusive. For KVM memory binding, the value is like:'membind:0', restrict a guest to allocate memory from the specified set of NUMA nodes. For PCI passthrough, the value is like:'devpassthrough:pci_0001_01_00_0,pci_0000_03_00_0', the value for PCI device format also can be like:'devpassthrough:0001:01:00.1', the PCI devices are assigned to a virtual machine, and the virtual machine can use this I/O exclusively, the devices list are a list of PCI device names delimited with comma, the PCI device names can be obtained by running B on the host.", 'guestostype' => "This allows administrator to specify an identifier for OS to pass through to virtualization stack. Normally this should be ignored as xCAT will translate from nodetype.os rather than requiring this field be used\n", 'beacon' => "This flag is used by xCAT to track the state of the identify LED with respect to the VM.", 'datacenter' => "Optionally specify a datacenter for the VM to exist in (only applicable to VMWare)", @@ -1243,7 +1243,19 @@ passed as argument rather than by table value', " Qualified Domain Name). Otherwise, the original behavior will be performed.\n\n" . " hierarchicalattrs: Table attributes(e.g. postscripts, postbootscripts) that will be\n" . " included hierarchically. Attribute values for all the node's groups\n" . -" will be applied to the node in the groups' order except the repeat one.\n\n" . +" will be applied to the node in the groups' order except the repeat one.\n" . +" dbtracelevel: The trace level for the database access log. To activate this setting, please. \n". +" restart xcatd or send HUP signal to the 'xcatd: DB Access' process, Like: .\n". +" ps -ef | grep 'xcatd: DB Access' | grep -v grep | awk '{print \$2}' | xargs kill -HUP \n". +" Currrent support values: \n" . +" 0: disable the trace log for db \n" . +" 1: trace the calls of database subroutines \n" . +" 2: Besides the log from level 1, trace the event to build the cache for the table \n" . +" 3: Besides the log from level 2, trace the event with cache hit \n" . +" 4: Besides the log from level 3, trace the SQL statement for the db access \n" . +" With this configuration, xcat will send the log to syslog very frequently, some of the \n". +" log may be lost if imjournal is enabled by rsyslog. \n". +" Please see https://github.com/xcat2/xcat-core/issues/3910 for the detail.\n\n" . " -----------------------\n" . "VIRTUALIZATION ATTRIBUTES\n" . " -----------------------\n" . diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index 508de47c7..b61786685 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -71,6 +71,9 @@ require xCAT::Schema; require xCAT::NodeRange; use Text::Balanced qw(extract_bracketed); require xCAT::NotifHandler; +use Time::HiRes qw/time/; +use JSON; + #The process id of the database worker # -1 db process has not been started, access db in direct access mode. @@ -82,7 +85,19 @@ my $dbsockpath = "/var/run/xcat/dbworker.sock." . $$; my $exitdbthread; my $dbobjsforhandle; my $intendedpid; +my $dbtracelevel; +my %elapsed; +use constant BUILD_CACHE_TYPE => "build_cache"; +use constant CACHE_HIT_TYPE => "cache_hit"; +use constant START_TYPE => "start"; +use constant END_TYPE => "end"; +use constant START_SQL_TYPE => "start_sql"; +use constant END_SQL_TYPE => "end_sql"; +use constant INFO_TYPE => "info"; + +my %trace_level_mapping = (START_TYPE() => 1, END_TYPE() => 1, BUILD_CACHE_TYPE() => 2, + CACHE_HIT_TYPE() => 3, START_SQL_TYPE() => 4, END_SQL_TYPE() => 4, INFO_TYPE() => 5); sub dbc_call { my $self = shift; @@ -155,6 +170,99 @@ sub dbc_submit { } } + +#-------------------------------------------------------------------------------- + +=head3 _trace_log + + Private helper function to write log message in json format + + Arguments: + $type: the type of the log content. + $msg: the message content + Returns: + none + + Error: + none + +=cut + +#-------------------------------------------------------------------------------- +sub _trace_log +{ + my ($type, $msg) = @_; + if( $type eq START_TYPE || $type eq START_SQL_TYPE) { + $elapsed{$trace_level_mapping{$type}} = time(); + } + my %hash = ("type" => $type, "msg" => $msg); + if($type eq END_TYPE || $type eq END_SQL_TYPE) { + if (!$elapsed{$trace_level_mapping{$type}}) { + return; + } + $hash{"elapsed"} = sprintf("%.5fs", time() - $elapsed{$trace_level_mapping{$type}}); + } + xCAT::MsgUtils->message("S", "[DB Trace]: ".encode_json(\%hash)); +} + + +#-------------------------------------------------------------------------------- + +=head3 trace_db + + Add log entries to trace db acccess + + Arguments: + $type: the type of the log content. If it is "start", "start_sq"l, "end", "end_sql", + a timer will be used to help calculate the elapsed time. Note, "start" and "end" + or "start_sql" and "end_sql" must be used in pairs. + $addon: the addon message. + Returns: + none + + Error: + none + + Example: + $self->trace_db("start"); # timer started. + ...... + $self->trace_db("end"); # print elapsed time. + + $self->trace_db("start_sql"); # timer started. + ...... # statement to run the sql + $self->trace_db("end_sql"); # print elapsed time. + +=cut + +#-------------------------------------------------------------------------------- +sub trace_db { + my $self = shift; + my ($type, $addon) = @_; + if (!$dbtracelevel) { + return; + } + if($dbworkerpid > 0) { + return; + } + $type = INFO_TYPE if (!$type); + if (!exists($trace_level_mapping{$type})) { + xCAT::MsgUtils->message("S", "Unsupported db trace type $type"); + return; + } + if (($trace_level_mapping{$type} == 1) && (caller(2))[3] ne "xCAT::Table::handle_dbc_request") { + # ignore internal calls + return; + } + + if ($trace_level_mapping{$type} <= $dbtracelevel) { + my $msg; + $msg->{"table"} = $self->{tabname}; + $msg->{"method"} = (caller(1))[3]; + $msg->{"addon"} = $addon if $addon; + _trace_log($type, $msg); + } +} + sub shut_dbworker { $dbworkerpid = -1; #For now, just turn off usage of the db worker #This was created as the monitoring framework shutdown code otherwise seems to have a race condition @@ -188,6 +296,7 @@ sub init_dbworker { } unless ($dbworkerpid) { $intendedpid = $$; + $dbtracelevel = xCAT::TableUtils->get_site_attribute("dbtracelevel"); $SIG{CHLD} = sub { while (waitpid(-1, WNOHANG) > 0) { } }; #avoid zombies from notification framework #This process is the database worker, it's job is to manage database queries to reduce required handles and to permit cross-process caching $0 = "xcatd: DB Access"; @@ -199,6 +308,13 @@ sub init_dbworker { $SIG{ALRM} = sub { exit 0; }; alarm(10); }; + $SIG{HUP} = sub { + $dbtracelevel = xCAT::TableUtils->get_site_attribute("dbtracelevel"); + xCAT::MsgUtils->message("S", "dbtracelevel has been reloaded, current value is $dbtracelevel"); + foreach my $item ( keys %elapsed) { + $elapsed{$item} = undef; + } + }; unlink($dbsockpath); umask(0077); $dbworkersocket = IO::Socket::UNIX->new(Local => $dbsockpath, Type => SOCK_STREAM, Listen => 8192); @@ -1453,8 +1569,10 @@ sub addAttribs $qstring = $qstring . "?,"; } $qstring =~ s/,$/)/; + $self->trace_db(START_SQL_TYPE, $qstring); my $sth = $self->{dbh}->prepare($qstring); $sth->execute(@bind); + $self->trace_db(END_SQL_TYPE); #$self->{dbh}->commit; @@ -1604,6 +1722,7 @@ sub setAttribs if ($dbworkerpid > 0) { return dbc_call($self, 'setAttribs', @_); } + $self->trace_db(START_TYPE); my $pKeypairs = shift; my %keypairs = (); if ($pKeypairs != undef) { %keypairs = %{$pKeypairs}; } @@ -1646,8 +1765,10 @@ sub setAttribs $qstring =~ s/ AND \z//; #print "this is qstring1: $qstring\n"; + $self->trace_db(START_SQL_TYPE, $qstring); $query = $self->{dbh}->prepare($qstring); $query->execute(@qargs); + $self->trace_db(END_SQL_TYPE); #get the first row $data = $query->fetchrow_arrayref(); @@ -1720,13 +1841,17 @@ sub setAttribs } } $cmd =~ s/ AND \z//; + $self->trace_db(START_SQL_TYPE, $qstring); my $sth = $self->{dbh}->prepare($cmd); unless ($sth) { + $self->trace_db(END_TYPE, "LINE ".__LINE__.": Error attempting requested DB operation"); return (undef, "Error attempting requested DB operation"); } my $err = $sth->execute(@bind); + $self->trace_db(END_SQL_TYPE); if (not defined($err)) { + $self->trace_db(END_TYPE, "LINE ".__LINE__.": ".$sth->errstr); return (undef, $sth->errstr); } $sth->finish; @@ -1781,10 +1906,13 @@ sub setAttribs $qstring = $qstring . "?,"; } $qstring =~ s/,$/)/; + $self->trace_db(START_SQL_TYPE, $qstring); my $sth = $self->{dbh}->prepare($qstring); my $err = $sth->execute(@bind); + $self->trace_db(END_SQL_TYPE, $qstring); if (not defined($err)) { + $self->trace_db(END_TYPE, "LINE ".__LINE__.": ". $sth->errstr); return (undef, $sth->errstr); } $sth->finish; @@ -1803,6 +1931,7 @@ sub setAttribs xCAT::NotifHandler->notify($action, $self->{tabname}, \@notif_data, \%new_notif_data); } + $self->trace_db(END_TYPE); return 0; } @@ -1850,6 +1979,7 @@ sub setAttribsWhere if ($dbworkerpid > 0) { return dbc_call($self, 'setAttribsWhere', @_); } + $self->trace_db(START_TYPE); my $where_clause = shift; my $elems = shift; my $cols = ""; @@ -1864,8 +1994,10 @@ sub setAttribsWhere } my $qstring = "SELECT * FROM " . $self->{tabname} . " WHERE " . $where_clause; my @qargs = (); + $self->trace_db(START_SQL_TYPE, $qstring); my $query = $self->{dbh}->prepare($qstring); $query->execute(@qargs); + $self->trace_db(END_SQL_TYPE); #get the first row my $data = $query->fetchrow_arrayref(); @@ -1903,10 +2035,13 @@ sub setAttribsWhere } chop($cols); my $cmd = "UPDATE " . $self->{tabname} . " set $cols where " . $where_clause; + $self->trace_db(START_SQL_TYPE, $qstring); my $sth = $self->{dbh}->prepare($cmd); my $err = $sth->execute(@bind); + $self->trace_db(END_SQL_TYPE); if (not defined($err)) { + $self->trace_db(END_TYPE, "LINE ".__LINE__.": ".$sth->errstr); return (undef, $sth->errstr); } @@ -1923,6 +2058,7 @@ sub setAttribsWhere \@notif_data, \%new_notif_data); } $sth->finish; + $self->trace_db(END_TYPE); return 0; } @@ -1968,6 +2104,7 @@ sub setNodesAttribs { if ($dbworkerpid > 0) { return dbc_call($self, 'setNodesAttribs', @_); } + $self->trace_db(START_TYPE); my $nodelist = shift; my $keyset = shift; my %cols = (); @@ -2025,6 +2162,7 @@ sub setNodesAttribs { } $self->{dbh}->commit; #commit pending transactions $self->{dbh}->{AutoCommit} = $oldac; #restore autocommit semantics + $self->trace_db(END_TYPE); return; } @@ -2066,8 +2204,10 @@ sub setNodesAttribs { $qstring = "SELECT * FROM " . $self->{tabname} . " WHERE $dnodekey in ("; $qstring .= '?, ' x scalar(@currnodes); $qstring =~ s/, $/)/; + $self->trace_db(START_SQL_TYPE, $qstring); my $query = $self->{dbh}->prepare($qstring); $query->execute(@currnodes); + $self->trace_db(END_SQL_TYPE); my $rec; while ($rec = $query->fetchrow_hashref()) { $updatenodes{ $rec->{$nodekey} } = 1; @@ -2093,7 +2233,7 @@ sub setNodesAttribs { $bindhooks =~ s/, $//; $columns =~ s/, $//; my $instring = "INSERT INTO " . $self->{tabname} . " ($columns) VALUES ($bindhooks)"; - + $self->trace_db(START_SQL_TYPE, $instring); #print $instring; $insertsth = $self->{dbh}->prepare($instring); } @@ -2105,7 +2245,9 @@ sub setNodesAttribs { foreach my $col (@orderedcols) { push @args, $hashrec->{$node}->{$col}; } + $insertsth->execute(@args); + $self->trace_db(END_SQL_TYPE); } if (not $upsth and keys %updatenodes) { #prepare an insert statement since one will be needed my $upstring = "UPDATE " . $self->{tabname} . " set "; @@ -2127,7 +2269,9 @@ sub setNodesAttribs { push @args, $hashrec->{$node}->{$col}; } push @args, $node; + $self->trace_db(START_SQL_TYPE, $upstring); $upsth->execute(@args); + $self->trace_db(END_SQL_TYPE); } } @currnodes = splice(@$nodelist, 0, $nodesatatime); @@ -2135,6 +2279,7 @@ sub setNodesAttribs { $self->{dbh}->commit; #commit pending transactions $self->{dbh}->{AutoCommit} = $oldac; #restore autocommit semantics $self->_refresh_cache(); #cache is invalid, refresh + $self->trace_db(END_TYPE); } #-------------------------------------------------------------------------- @@ -2170,6 +2315,7 @@ sub getNodesAttribs { if ($dbworkerpid > 0) { return dbc_call($self, 'getNodesAttribs', @_); } + $self->trace_db(START_TYPE); my $nodelist = shift; unless ($nodelist) { $nodelist = []; } #common to be invoked with undef seemingly my %options = (); @@ -2216,6 +2362,7 @@ sub getNodesAttribs { if ($self->{tabname} ne 'nodelist') { $self->{nodelist}->{_use_cache} = 0; } + $self->trace_db(END_TYPE); return $rethash; } @@ -2293,6 +2440,7 @@ sub _build_cache { #PRIVATE FUNCTION, PLEASE DON'T CALL DIRECTLY unless (grep /^$nodekey$/, @$attriblist) { push @$attriblist, $nodekey; } + $self->trace_db(BUILD_CACHE_TYPE); my @tabcache = $self->getAllAttribs(@$attriblist); $self->{_tablecache} = \@tabcache; $self->{_nodecache} = {}; @@ -2316,7 +2464,153 @@ sub mknum { return $number; } +#-------------------------------------------------------------------------------- + +=head3 a2idx + Description: + Turns a character into a 1-indexed index + Arguments: + character: The character to convert + Returns: + The index + Example: + a2zidx('a') returns 1 + a2zidx('b') returns 2 +=cut + +#-------------------------------------------------------------------------------- +sub a2idx { + return ord(lc(shift)) - 96; +} + +#-------------------------------------------------------------------------------- + +=head3 a2zidx + Description: + Turns a character into a 0-indexed index + Arguments: + character: The character to convert + Returns: + The index + Example: + a2zidx('a') returns 0 + a2zidx('b') returns 1 +=cut + +#-------------------------------------------------------------------------------- +sub a2zidx { + return ord(lc(shift)) - 97; +} + +#-------------------------------------------------------------------------------- + +=head3 dim2idx + Description: + Converts dimensions into an index + Arguments: + dim_value: the value of the current dimension + dim_total: the total number of elements in that dimension + Returns: + The index + Example: + A cluster has 4 rows + A row has 10 racks + A rack has 8 chassis + A chassis has 8 nodes + + Row 2, rack 3, chassis 4, node 5 + dim2idx(2, 10, 3, 8, 4, 8, 5) returns 797 + + Note the highest dimension is not needed and all values are 1-indexed +=cut + +#-------------------------------------------------------------------------------- +sub dim2idx { + my $val = 0; # value to return + my $fn = 0; # math function to apply, 0 is add, 1 is multiply + while (defined(my $element = shift)) { + $val += $element - 1 if !$fn; + $val *= $element if $fn; + $fn = 1 - $fn; + } + return $val + 1; +} + +#-------------------------------------------------------------------------------- + +=head3 skip + Description: + Return an index with certain values skipped + Arguments: + index: The initial index + skips: Index values to skip + format start[:count][,start[:count]...] + Returns: + The updated index + Example: + skip(10, '3') returns 9 + skip(10, '3:2') returns 8 + skip(10, '3:2,6') returns 7 +=cut + +#-------------------------------------------------------------------------------- +sub skip { + my $idx = my $val = shift; + my $skips = shift; + foreach my $element (split /,/, $skips) { + my ($start, $count) = split /:/, $element; + $count = 1 if ! defined($count); + if ($idx >= $start) { + if ($idx < $start + $count) {return -1;} + $val-= $count; + } else { + last; + } + } + return $val; +} + +#-------------------------------------------------------------------------------- + +=head3 ipadd + Description: + Add to an IP address. Useful when you cross octets. + Optionally skip addresses at the start and end of octets (like .0 or .255). + Technically those are valid IP addresses, but sometimes software makes + poor assumptions about which broadcast and gateway addresses. + Arguments: + b1: Starting IP address first octet + b2: Starting IP address second octet + b3: Starting IP address third octet + b4: Starting IP address fourth octet + toadd: Value to add to the starting address + skipstart: Number of addresses to skip at the start of the last octet + skipend: Number of addresses to skip at the end of the last octet + Returns: + The new IP address + Example: + ipadd(10, 10, 10, 10, 0, 0, 0) returns 10.10.10.10 + ipadd(10, 10, 10, 10, 10, 0, 0) returns 10.10.10.20 + ipadd(10, 10, 10, 10, 245, 0, 0) returns 10.10.10.255 + ipadd(10, 10, 10, 10, 246, 0, 0) returns 10.10.11.0 +=cut + +#-------------------------------------------------------------------------------- +sub ipadd { + use integer; + my ($b1, $b2, $b3, $b4, $toadd, $skipstart, $skipend) = @_; + my $offset = ($b4 >= $skipstart) ? $b4 - $skipstart : 0; + $b3 += ($offset + $toadd) / (256-$skipstart-$skipend); + $b4 = ($offset + $toadd) % (256-$skipstart-$skipend) + $skipstart; + return join('.', $b1, $b2, $b3, $b4); +} + $evalcpt->share('&mknum'); +$evalcpt->share('&a2idx'); +$evalcpt->share('&a2zidx'); +$evalcpt->share('&dim2idx'); +$evalcpt->share('&skip'); +$evalcpt->share('&ipadd'); $evalcpt->permit('require'); #-------------------------------------------------------------------------- @@ -2443,6 +2737,7 @@ sub getNodeAttribs #db worker scope return dbc_call($self, 'getNodeAttribs', @_); } + $self->trace_db(START_TYPE); if (!defined($self->{dbh})) { xCAT::MsgUtils->message("S", "xcatd: DBI is missing, Please check the db access process."); @@ -2521,6 +2816,7 @@ sub getNodeAttribs } } } + $self->trace_db(END_TYPE); return wantarray ? @data : $data[0]; } @@ -2862,7 +3158,6 @@ sub getNodeAttribs_nosub_returnany } } } - return @results; } @@ -2901,6 +3196,7 @@ sub getAllEntries if ($dbworkerpid > 0) { return dbc_call($self, 'getAllEntries', @_); } + $self->trace_db(START_TYPE); if (!defined($self->{dbh})) { xCAT::MsgUtils->message("S", "xcatd: DBI is missing, Please check the db access process."); @@ -2915,12 +3211,15 @@ sub getAllEntries my $disable = &delimitcol("disable"); if ($allentries) { # get all lines $query = $self->{dbh}->prepare('SELECT * FROM ' . $self->{tabname}); + $self->trace_db(START_SQL_TYPE, 'SELECT * FROM ' . $self->{tabname}); } else { # get only enabled lines my $qstring = 'SELECT * FROM ' . $self->{tabname} . " WHERE " . $disable . " is NULL or " . $disable . " in ('0','no','NO','No','nO')"; $query = $self->{dbh}->prepare($qstring); + $self->trace_db(START_SQL_TYPE, $qstring); } $query->execute(); + $self->trace_db(END_SQL_TYPE); while (my $data = $query->fetchrow_hashref()) { foreach (keys %$data) @@ -2933,6 +3232,7 @@ sub getAllEntries push @rets, $data; } $query->finish(); + $self->trace_db(END_TYPE); return \@rets; } @@ -2995,6 +3295,7 @@ sub getAllAttribsWhere if ($dbworkerpid > 0) { return dbc_call($self, 'getAllAttribsWhere', @_); } + $self->trace_db(START_TYPE); my $clause = shift; my $whereclause; my @attribs = @_; @@ -3011,8 +3312,10 @@ sub getAllAttribsWhere # delimit the disable column based on the DB my $disable = &delimitcol("disable"); $query2 = 'SELECT * FROM ' . $self->{tabname} . ' WHERE (' . $whereclause . ") and ($disable is NULL or $disable in ('0','no','NO','No','nO'))"; + $self->trace_db(START_SQL_TYPE, $query2); $query = $self->{dbh}->prepare($query2); $query->execute(); + $self->trace_db(END_SQL_TYPE); while (my $data = $query->fetchrow_hashref()) { my %newrow = (); @@ -3040,6 +3343,7 @@ sub getAllAttribsWhere } } $query->finish(); + $self->trace_db(END_TYPE); return @results; } @@ -3078,6 +3382,7 @@ sub getAllNodeAttribs if ($dbworkerpid > 0) { return dbc_call($self, 'getAllNodeAttribs', @_); } + $self->trace_db(START_TYPE); my $attribq = shift; my $hashretstyle = shift; my %options = @_; @@ -3098,8 +3403,10 @@ sub getAllNodeAttribs my $qstring = 'SELECT ' . $dnodekey . ' FROM ' . $self->{tabname} . " WHERE " . $disable . " is NULL or " . $disable . " in ('0','no','NO','No','nO')"; + $self->trace_db(START_SQL_TYPE, $qstring); $query = $self->{dbh}->prepare($qstring); $query->execute(); + $self->trace_db(END_SQL_TYPE); xCAT::NodeRange::retain_cache(1); unless ($options{prefetchcache}) { @@ -3171,6 +3478,7 @@ sub getAllNodeAttribs $self->{_use_cache} = 0; $self->{nodelist}->{_use_cache} = 0; $query->finish(); + $self->trace_db(END_TYPE); if ($hashretstyle) { return $rethash; } else { @@ -3212,9 +3520,10 @@ sub getAllAttribs if ($dbworkerpid > 0) { return dbc_call($self, 'getAllAttribs', @_); } - + $self->trace_db(START_TYPE); if (!defined($self->{dbh})) { xCAT::MsgUtils->message("S", "xcatd: DBI is missing, Please check the db access process."); + $self->trace_db(END_TYPE, "LINE ".__LINE__.": DBI is missing"); return undef; } @@ -3244,8 +3553,10 @@ sub getAllAttribs } if (@results) { + $self->trace_db(END_TYPE); return @results; #return wantarray ? @results : $results[0]; } + $self->trace_db(END_TYPE); return undef; } @@ -3254,10 +3565,12 @@ sub getAllAttribs my $query; my $qstring = "SELECT * FROM " . $self->{tabname} . " WHERE " . $disable . " is NULL or " . $disable . " in ('0','no','NO','No','nO')"; + $self->trace_db(START_SQL_TYPE, $qstring); $query = $self->{dbh}->prepare($qstring); #print $query; $query->execute(); + $self->trace_db(END_SQL_TYPE, $qstring); while (my $data = $query->fetchrow_hashref()) { my %newrow = (); @@ -3274,6 +3587,7 @@ sub getAllAttribs } } $query->finish(); + $self->trace_db(END_TYPE); return @results; } @@ -3317,6 +3631,7 @@ sub delEntries if ($dbworkerpid > 0) { return dbc_call($self, 'delEntries', @_); } + $self->trace_db(START_TYPE); my $keyref = shift; my @all_keyparis; my %keypairs; @@ -3361,10 +3676,10 @@ sub delEntries $qstring =~ s/\(\)//; $qstring =~ s/ OR \z//; - + $self->trace_db(START_SQL_TYPE, $qstring); my $query = $self->{dbh}->prepare($qstring); $query->execute(@qargs); - + $self->trace_db(END_SQL_TYPE); #prepare the notification data #put the column names at the very front push(@notif_data, $query->{NAME}); @@ -3399,8 +3714,10 @@ sub delEntries } $delstring =~ s/\(\)//; $delstring =~ s/ OR \z//; + $self->trace_db(START_SQL_TYPE, $delstring); my $stmt = $self->{dbh}->prepare($delstring); $stmt->execute(@stargs); + $self->trace_db(END_SQL_TYPE); $stmt->finish; $self->_refresh_cache(); #cache is invalid, refresh @@ -3411,7 +3728,7 @@ sub delEntries } @pieces = splice(@all_keyparis, 0, $record_num); } - + $self->trace_db(END_TYPE); } #-------------------------------------------------------------------------- @@ -3450,6 +3767,7 @@ sub getAttribs if ($dbworkerpid > 0) { return dbc_call($self, 'getAttribs', @_); } + $self->trace_db(START_TYPE); #my $key = shift; #my $keyval = shift; @@ -3510,8 +3828,11 @@ sub getAttribs } if (@results) { + $self->trace_db(END_TYPE); + $self->trace_db(CACHE_HIT_TYPE); return wantarray ? @results : $results[0]; } + $self->trace_db(END_TYPE); return undef; } @@ -3544,11 +3865,14 @@ sub getAttribs $statement .= "(" . $disable . " is NULL or " . $disable . " in ('0','no','NO','No','nO'))"; #print "This is my statement: $statement \n"; + $self->trace_db(START_SQL_TYPE, $statement); my $query = $self->{dbh}->prepare($statement); unless (defined $query) { + $self->trace_db(END_TYPE, "LINE ".__LINE__.": undef"); return undef; } $query->execute(@exeargs); + $self->trace_db(END_SQL_TYPE); my $data; while ($data = $query->fetchrow_hashref()) { @@ -3569,8 +3893,10 @@ sub getAttribs $query->finish(); if (@return) { + $self->trace_db(END_TYPE); return wantarray ? @return : $return[0]; } + $self->trace_db(END_TYPE); return undef; } @@ -3610,10 +3936,13 @@ sub getTable if ($dbworkerpid > 0) { return dbc_call($self, 'getTable', @_); } + $self->trace_db(START_TYPE); my @return; my $statement = 'SELECT * FROM ' . $self->{tabname}; + $self->trace_db(START_SQL_TYPE, $statement); my $query = $self->{dbh}->prepare($statement); $query->execute(); + $self->trace_db(END_SQL_TYPE); my $data; while ($data = $query->fetchrow_hashref()) { @@ -3631,8 +3960,10 @@ sub getTable $query->finish(); if (@return) { + $self->trace_db(END_TYPE); return @return; } + $self->trace_db(END_TYPE); return undef; } @@ -4089,6 +4420,7 @@ sub writeAllEntries if ($dbworkerpid > 0) { return dbc_call($self, 'writeAllEntries', @_); } + $self->trace_db(START_TYPE); my $filename = shift; my $fh; my $rc = 0; @@ -4097,6 +4429,7 @@ sub writeAllEntries unless (open($fh, " > $filename")) { my $msg = "Unable to open $filename for write \n."; `logger -p local4.err -t xcat $msg`; + $self->trace_db(END_TYPE, "LINE ".__LINE__.": ".$msg); return 1; } my $query; @@ -4112,9 +4445,11 @@ sub writeAllEntries # delimit the disable column based on the DB my $disable = &delimitcol("disable"); + $self->trace_db(START_SQL_TYPE, 'SELECT * FROM ' . $self->{tabname}); $query = $self->{dbh}->prepare('SELECT * FROM ' . $self->{tabname}); $query->execute(); + $self->trace_db(END_SQL_TYPE); while (my $data = $query->fetchrow_hashref()) { foreach (keys %$data) @@ -4128,6 +4463,7 @@ sub writeAllEntries } $query->finish(); CORE::close($fh); + $self->trace_db(END_TYPE); return $rc; } @@ -4170,6 +4506,7 @@ sub writeAllAttribsWhere if ($dbworkerpid > 0) { return dbc_call($self, 'writeAllAttribsWhere', @_); } + $self->trace_db(START_TYPE); my $clause = shift; my $filename = shift; my $whereclause; @@ -4184,6 +4521,7 @@ sub writeAllAttribsWhere unless (open($fh, " > $filename")) { my $msg = "Unable to open $filename for write \n."; `logger -p local4.err -t xcat $msg`; + $self->trace_db(END_TYPE, "LINE ".__LINE__.": ".$msg); return 1; } my $header; @@ -4201,8 +4539,10 @@ sub writeAllAttribsWhere # delimit the disable column based on the DB my $disable = &delimitcol("disable"); $query2 = 'SELECT * FROM ' . $self->{tabname} . ' WHERE (' . $whereclause . ") and ($disable is NULL or $disable in ('0','no','NO','No','nO'))"; + $self->trace_db(START_SQL_TYPE, $query2); $query = $self->{dbh}->prepare($query2); $query->execute(); + $self->trace_db(END_SQL_TYPE); while (my $data = $query->fetchrow_hashref()) { foreach (keys %$data) { @@ -4216,6 +4556,7 @@ sub writeAllAttribsWhere } $query->finish(); CORE::close($fh); + $self->trace_db(END_TYPE); return $rc; } @@ -4291,6 +4632,7 @@ sub getMAXMINEntries if ($dbworkerpid > 0) { return dbc_call($self, 'getMAXMINEntries', @_); } + $self->trace_db(START_TYPE); my $attr = shift; my $rets; my $query; @@ -4304,9 +4646,11 @@ sub getMAXMINEntries } else { $qstring = "SELECT MAX($attr) FROM " . $self->{tabname} . " WHERE " . $disable . " is NULL or " . $disable . " in ('0','no','NO','No','nO')"; } + $self->trace_db(START_SQL_TYPE, $qstring); $query = $self->{dbh}->prepare($qstring); $query->execute(); + $self->trace_db(END_SQL_TYPE); while (my $data = $query->fetchrow_hashref()) { foreach (keys %$data) @@ -4328,9 +4672,11 @@ sub getMAXMINEntries } else { $qstring = "SELECT MIN($attr) FROM " . $self->{tabname} . " WHERE " . $disable . " is NULL or " . $disable . " in ('0','no','NO','No','nO')"; } + $self->trace_db(START_SQL_TYPE, $qstring); $query = $self->{dbh}->prepare($qstring); $query->execute(); + $self->trace_db(END_SQL_TYPE); while (my $data = $query->fetchrow_hashref()) { foreach (keys %$data) @@ -4344,6 +4690,7 @@ sub getMAXMINEntries last; # better be only one value for min } } + $self->trace_db(END_TYPE); return $rets; } 1; diff --git a/perl-xCAT/xCAT/Usage.pm b/perl-xCAT/xCAT/Usage.pm index dd40450e3..efa72327e 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -85,7 +85,9 @@ my %usage = ( OpenPOWER (OpenBMC) specific: rvitals noderange [temp|voltage|wattage|fanspeed|power|altitude|all] MIC specific: - rvitals noderange {thermal|all}", + rvitals noderange {thermal|all} + pdu specific: + rvitals noderange ", "reventlog" => "Usage: reventlog [all [-s]|clear| [-s]] [-V|--verbose] reventlog [-h|--help|-v|--version]", @@ -143,7 +145,7 @@ my %usage = ( rspconfig [garp=] rspconfig [userid= username= password=] OpenBMC specific: - rspconfig [ip|netmask|gateway|vlan] + rspconfig [ip|netmask|gateway|hostname|vlan] iDataplex specific: rspconfig [thermprofile] rspconfig [thermprofile=] @@ -342,10 +344,13 @@ my %usage = ( rflash -p [--activate {disruptive|deferred}] [-d ] rflash [--commit | --recover] [-V|--verbose] rflash [--bpa_acdl] - PPC64LE (using IPMI Management) specific: - rflash [-c|--check] [--retry=] [-V] [|-d=] - PPC64LE (using OpenBMC Management) specific: - rflash [-c|--check] [-l|--list] [-a|--activate] [-u|--upload] [-d|--delete] [|]", + OpenPOWER BMC specific (using IPMI): + rflash [|-d ] [-c|--check] [--retry=] [-V] + rflash --recover + OpenPOWER OpenBMC specific: + rflash {[-c|--check] | [-l|--list]} + rflash {[-c|--check] | [-a|--activate] | [-u|--upload]} + rflash {[-a|--activate] | [-d|--delete]}", "mkhwconn" => "Usage: mkhwconn [-h|--help] diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 937a36473..e44a184ee 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -19,6 +19,7 @@ use lib "$::XCATROOT/lib/perl"; # needing it to avoid reprocessing of user tables ( ExtTab.pm) for each command call use POSIX qw(ceil); use File::Path; +#use Data::Dumper; use Socket; use strict; use Symbol; @@ -42,7 +43,6 @@ require xCAT::InstUtils; #require xCAT::NetworkUtils; require xCAT::Schema; -#require Data::Dumper; require xCAT::NodeRange; require xCAT::Version; require DBI; @@ -575,6 +575,13 @@ sub isLinux sub Version { my $version = shift; + + #force reload the xCAT::Version in case the perl-xcat is upgraded but xcatd is not restarted + if($INC{'xCAT/Version.pm'}){ + delete $INC{'xCAT/Version.pm'}; + } + + require xCAT::Version; $version = xCAT::Version->Version(); return $version; } @@ -4903,4 +4910,5 @@ sub acquire_lock_imageop { return (0,$lock); } + 1; diff --git a/xCAT-client/bin/rinstall b/xCAT-client/bin/rinstall index 90cc60e12..2d68b3f37 100755 --- a/xCAT-client/bin/rinstall +++ b/xCAT-client/bin/rinstall @@ -21,7 +21,6 @@ use Getopt::Long; use xCAT::MsgUtils; use xCAT::Utils; use xCAT::Client; -use xCAT::NodeRange; use Cwd; use strict; @@ -72,12 +71,6 @@ if(grep m/^-c|--console$/,@ARGV){ } 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)) { diff --git a/xCAT-client/pods/man1/bmcdiscover.1.pod b/xCAT-client/pods/man1/bmcdiscover.1.pod index 2e967fab5..fc9ddfe5a 100644 --- a/xCAT-client/pods/man1/bmcdiscover.1.pod +++ b/xCAT-client/pods/man1/bmcdiscover.1.pod @@ -8,7 +8,7 @@ B [B<-?>|B<-h>|B<--help>] B [B<-v>|B<--version>] -B [B<-s> I] [B<-u> I] [B<-p> I] [B<-z>] [B<-w>] B<--range> I +B [B<--sn> I] [B<-s> I] [B<-u> I] [B<-p> I] [B<-z>] [B<-w>] B<--range> I B B<-u> I B<-p> I B<-i> I B<--check> @@ -33,6 +33,10 @@ Note: The scan method currently support is B. Specify one or more IP ranges acceptable to nmap. IP range can be hostnames, IP addresses, networks, etc. A single IP address (10.1.2.3) or an IP range (10.1.2.0/24) can be specified. If the range is very large, the B command may take a long time to return. +=item B<--sn> + +Specify one or more service nodes on which bmcdiscover will run. In hierarchical cluster, the MN may not be able to access the BMC of CN directly, but SN can. With this option, bmcdiscover will be dispatched to the specified SNs. Then, the nodename of the service node that 'bmcdiscover' is running on will be set to the 'servicenode' attribute of the discovered BMC node. + =item B<-s> Scan method (The only supported scan method at this time is B) @@ -90,19 +94,34 @@ Display version information Note: Input for IP range can be in the form: scanme.nmap.org, microsoft.com/24, 192.168.0.1; 10.0.0-255.1-254. -2. To get all BMSs in IP range "10.4.22-23.100-254", displayed in xCAT stanza format: +2. To get all BMCs in IP range "10.4.22-23.100-254", displayed in xCAT stanza format: bmcdiscover -s nmap --range "10.4.22-23.100-254" -z -3. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console: +3. To discover BMCs through sn01: + + bmcdiscover --sn sn01 -s nmap --range "10.4.22-23.100-254" -z + +Output is similar to: + + node-70e28414291b: + objtype=node + groups=all + bmc=10.4.22.101 + cons=openbmc + mgt=openbmc + servicenode=sn01 + conserver=sn01 + +4. Discover the BMCs and write the discovered-node definitions into the xCAT database and write out the stanza foramt to the console: bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z -4. To check if the username or password is correct against the BMC: +5. To check if the username or password is correct against the BMC: bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --check -5. Get BMC IP Address source, DHCP Address or static Address +6. Get BMC IP Address source, DHCP Address or static Address bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --ipsource diff --git a/xCAT-client/pods/man1/rflash.1.pod b/xCAT-client/pods/man1/rflash.1.pod index 70c964d15..ee2b29da1 100644 --- a/xCAT-client/pods/man1/rflash.1.pod +++ b/xCAT-client/pods/man1/rflash.1.pod @@ -24,11 +24,17 @@ B I I =head2 OpenPOWER BMC specific (using IPMI): -B I [I | B<-d=>I] [B<-c>|B<--check>] [B<--retry=>I] [B<-V>] +B I [I | B<-d> I] [B<-c>|B<--check>] [B<--retry=>I] [B<-V>] + +B I B<--recover> I =head2 OpenPOWER OpenBMC specific : -B I [I | I] [B<-c>|B<--check>] [B<-a>|B<--activate>] [B<-l>|B<--list>] [B<-u>|B<--upload>] [B<-d>|B<--delete>] +B I {[B<-c>|B<--check>] | [B<-l>|B<--list>]} + +B I I {[B<-c>|B<--check>] | [B<-a>|B<--activate>] | [B<-u>|B<--upload>]} + +B I I {[B<-a>|B<--activate>] | [B<-d>|B<--delete>]} =head1 B @@ -111,9 +117,11 @@ Specifies the directory where the packages are located. =item B<-d> I +PPC (without HMC, using Direct FSP Management) specific: + 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 +OpenPOWER BMC specific (using IPMI): Used for IBM Power S822LC for Big Data systems only. Specifies the directory where the B utility and at least one of BMC or PNOR update files are located. The utility and update files can be downloaded from FixCentral. @@ -127,15 +135,21 @@ Used to commit the flash image in the temporary side of the chip to the permanen =item B<--recover> +PPC (with HMC) and PPC (without HMC, using Direct FSP Management) specific: + Used to recover the flash image in the permanent side of the chip to the temporary side for both managed systems and power subsystems. +OpenPOWER BMC specific (using IPMI): + +Used for IBM Power S822LC for Big Data systems only. Used to recover the BMC with a BMC image downloaded from FixCentral. + =item B<--retry=>I 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. +Activate update image. Image id or update file must be specified. =item B<-l|--list> @@ -201,7 +215,12 @@ Print verbose message to rflash log file (/var/log/xcat/rflash/fs3.log) when upd =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 + rflash briggs01 -d /root/supermicro/OP825 + +=item 7. +To update the firmware on the OpenBMC machine, specify the firmare update file to upload and activate: + + rflash p9euh02 -a /tmp/witherspoon.pnor.squashfs.tar =back diff --git a/xCAT-client/pods/man1/rsetboot.1.pod b/xCAT-client/pods/man1/rsetboot.1.pod index c9e6b1fd6..75a2e9ef7 100644 --- a/xCAT-client/pods/man1/rsetboot.1.pod +++ b/xCAT-client/pods/man1/rsetboot.1.pod @@ -5,14 +5,14 @@ B - Sets the boot device to be used for BMC-based servers for the next =head1 SYNOPSIS -B I {B|B|B|B|B} [B<-u>] [B<-p>] +B I [B|B|B|B|B] [B<-u>] [B<-p>] B [B<-h>|B<--help>|B<-v>|B<--version>] =head1 DESCRIPTION -B sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via L), the nodes will return to using the default boot device specified in the BIOS. Currently this command is only supported for IPMI nodes. +B sets the boot media and boot mode that should be used on the next boot of the specified nodes. After the nodes are booted with the specified device and boot mode (e.g. via L), the nodes will return to using the default boot device specified in the BIOS. =head1 OPTIONS @@ -64,6 +64,10 @@ Display the next-boot value for nodes 14-56 and 70-203: rsetboot node[14-56],node[70-203] stat +Or: + + rsetboot node[14-56],node[70-203] + =item 3. Restore the next-boot value for these nodes back to their default set in the BIOS: diff --git a/xCAT-client/pods/man1/rspconfig.1.pod b/xCAT-client/pods/man1/rspconfig.1.pod index 972aa649b..3f88d1152 100644 --- a/xCAT-client/pods/man1/rspconfig.1.pod +++ b/xCAT-client/pods/man1/rspconfig.1.pod @@ -24,7 +24,7 @@ B I B=I