From 502e952f1e251621bef05ca9daa3d9d1cd18a7e2 Mon Sep 17 00:00:00 2001 From: yangsong Date: Fri, 15 Sep 2017 17:16:57 +0800 Subject: [PATCH] Revert "merge master(commit:a183e3b8f241fb168b830dbe3f8f6f5b40fe1834) to 2.13 branch" (#3934) * Revert "Revert "Disable the ssh prompt when connecting the openbmc console (#3815) (#3932)" (#3933)" This reverts commit 63c541428f61314555789aac473a317c85748ebd. * Revert "Disable the ssh prompt when connecting the openbmc console (#3815) (#3932)" This reverts commit 02cf849c23d1de311b3431ee266e5a638a660f19. * Revert "merge master(commit:a183e3b8f241fb168b830dbe3f8f6f5b40fe1834) to 2.13 branch (#3929)" This reverts commit 294d59a307e77eacf918af4f0316e2988926d332. --- 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 | 278 +----- 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 | 96 +- 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, 890 insertions(+), 6174 deletions(-) delete mode 100644 docs/source/advanced/migration/index.rst delete mode 100644 docs/source/advanced/migration/migration.rst delete mode 100644 xCAT-probe/scripts/dbstats.py delete mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.exlist delete mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.otherpkgs.pkglist delete mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.pkglist delete mode 100755 xCAT-server/share/xcat/netboot/rh/service.rhels7.ppc64le.postinstall delete mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.exlist delete mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.otherpkgs.pkglist delete mode 100644 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.pkglist delete mode 100755 xCAT-server/share/xcat/netboot/rh/service.rhels7.x86_64.postinstall delete mode 100644 xCAT-test/autotest/testcase/discovery/bmc_discovery_only delete mode 100755 xCAT-test/autotest/testcase/discovery/discovery_test delete mode 100644 xCAT-test/autotest/testcase/discovery/mtm_based_node_discovery delete mode 100644 xCAT-test/autotest/testcase/discovery/switch_based_node_discovery delete mode 100755 xCAT-test/autotest/testcase/genesis/test.sh delete mode 100644 xCAT-test/autotest/testcase/infiniband/cases0 delete mode 100755 xCAT-test/autotest/testcase/infiniband/rhel-infiniband-diskfull-install.sh delete mode 100755 xCAT-test/autotest/testcase/infiniband/rhel-infiniband-diskless-install.sh delete mode 100644 xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode delete mode 100644 xCAT-test/autotest/testcase/snpool/not_set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult delete mode 100644 xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode delete mode 100644 xCAT-test/autotest/testcase/snpool/set_xcatmaster_in_sn_pool_tftp_mount_mode_checkresult delete mode 100644 xCAT-test/autotest/testcase/snpool/setup_sn_pool_tftp_mount_mode diff --git a/Version b/Version index ea55a03fa..14239ef15 100644 --- a/Version +++ b/Version @@ -1 +1 @@ -2.13.7 +2.13.6 diff --git a/build-ubunturepo b/build-ubunturepo index 729067680..65e44c88d 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/devel" + APT_REPO_DIR="${APT_DIR}/repos/apt" # Decide whether to upload the xcat-dep package or NOT (default is to NOT upload xcat-dep if [ "$UP" != "1" ]; then diff --git a/builddep.sh b/builddep.sh index 1413dcca2..84ca78e40 100755 --- a/builddep.sh +++ b/builddep.sh @@ -225,7 +225,7 @@ if [ "$OSNAME" == "AIX" ]; then else # Linux SYSGRP=root - YUM=yum/devel + YUM=yum FRSDIR='2.x_Linux' fi chgrp -R -h $SYSGRP * diff --git a/docs/source/advanced/index.rst b/docs/source/advanced/index.rst index 8c84eb6ac..3a78e0ac9 100755 --- a/docs/source/advanced/index.rst +++ b/docs/source/advanced/index.rst @@ -6,7 +6,6 @@ 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 deleted file mode 100644 index 7ceda4e45..000000000 --- a/docs/source/advanced/migration/index.rst +++ /dev/null @@ -1,7 +0,0 @@ -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 deleted file mode 100644 index c93902f58..000000000 --- a/docs/source/advanced/migration/migration.rst +++ /dev/null @@ -1,189 +0,0 @@ -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 6aa25256c..f383e065d 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 PowerKVM hypervisor "kvmhost1" is ready, this section introduces the VM management in xCAT, including examples on how to create, remove and clone VMs. +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. Create Virtual Machine ---------------------- @@ -82,27 +82,7 @@ After the VM object is created, several key attributes need to be specified with chtab node=vm1 vm.vidpassword=abc123 -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 +10. 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 f12aa1354..d69d5d706 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_defined.rst @@ -93,9 +93,6 @@ 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. :: @@ -113,6 +110,9 @@ 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 6fde20bb8..7173c39f5 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**\ [\ **-**\ **-sn**\ \ *SN_nodename*\ ] [\ **-s**\ \ *scan_method*\ ] [\ **-u**\ \ *bmc_user*\ ] [\ **-p**\ \ *bmc_passwd*\ ] [\ **-z**\ ] [\ **-w**\ ] \ **-**\ **-range**\ \ *ip_ranges*\ +\ **bmcdiscover**\ [\ **-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,12 +56,6 @@ 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**\ ) @@ -148,7 +142,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 BMCs in IP range "10.4.22-23.100-254", displayed in xCAT stanza format: +2. To get all BMSs in IP range "10.4.22-23.100-254", displayed in xCAT stanza format: .. code-block:: perl @@ -156,30 +150,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" -z -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: +3. 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 @@ -187,7 +158,7 @@ Output is similar to: bmcdiscover -s nmap --range "10.4.22-23.100-254" -w -z -5. To check if the username or password is correct against the BMC: +4. To check if the username or password is correct against the BMC: .. code-block:: perl @@ -195,7 +166,7 @@ Output is similar to: bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --check -6. Get BMC IP Address source, DHCP Address or static Address +5. 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 12833968e..84d176e49 100644 --- a/docs/source/guides/admin-guides/references/man1/rflash.1.rst +++ b/docs/source/guides/admin-guides/references/man1/rflash.1.rst @@ -50,20 +50,14 @@ OpenPOWER BMC specific (using IPMI): ==================================== -\ **rflash**\ \ *noderange*\ [\ *hpm_file_path*\ | \ **-d**\ \ *data_directory*\ ] [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ] - -\ **rflash**\ \ *noderange*\ \ **-**\ **-recover**\ \ *bmc_file_path*\ +\ **rflash**\ \ *noderange*\ [\ *hpm_file_path*\ | \ **-d=**\ \ *data_directory*\ ] [\ **-c | -**\ **-check**\ ] [\ **-**\ **-retry=**\ \ *count*\ ] [\ **-V**\ ] OpenPOWER OpenBMC specific : ============================ -\ **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**\ ]} +\ **rflash**\ \ *noderange*\ [\ *tar_file_path*\ | \ *image_id*\ ] [\ **-c | -**\ **-check**\ ] [\ **-a | -**\ **-activate**\ ] [\ **-l | -**\ **-list**\ ] [\ **-u | -**\ **-upload**\ ] [\ **-d | -**\ **-delete**\ ] @@ -174,11 +168,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. - OpenPOWER BMC specific (using IPMI): + + +\ **-d=**\ \ *data_directory*\ Used for IBM Power S822LC for Big Data systems only. Specifies the directory where the \ **pUpdate**\ utility and at least one of BMC or PNOR update files are located. The utility and update files can be downloaded from FixCentral. @@ -198,14 +192,8 @@ 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*\ @@ -216,7 +204,7 @@ The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER n \ **-a|-**\ **-activate**\ - Activate update image. Image id or update file must be specified. + Activate update image. Image id must be specified. @@ -330,17 +318,7 @@ The command will update firmware for OpenPOWER OpenBMC when given an OpenPOWER n .. code-block:: perl - 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 + rflash briggs01 -d=/root/supermicro/OP825 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 da5c3876e..73f96eaf1 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. +\ **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. ******* @@ -101,14 +101,6 @@ 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 038709fe0..c2a4d365c 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 | hostname | vlan | sshcfg**\ } +\ **rspconfig**\ \ *noderange*\ {\ **ip | netmask | gateway | vlan | sshcfg**\ } MPA specific: @@ -394,12 +394,6 @@ 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 c172e5218..2505ae4ae 100644 --- a/docs/source/guides/admin-guides/references/man3/noderange.3.rst +++ b/docs/source/guides/admin-guides/references/man3/noderange.3.rst @@ -59,11 +59,7 @@ Name conveniently specify a list of nodes. The result is that the command will be applied to a range of nodes, often in parallel. -If you invoke xCAT \ **noderange**\ from a shell you may need to quote the -\ **noderange**\ if the shell would otherwise treat the punctuation marks in -the \ **noderange**\ as control operators. The affected punctuation marks may -include Asterisk (\`*'), Left Square Bracket (\`[') , Right Square Bracket -(\`]'), Circumflex Accent (\`^'), and Overline (\`~'). +To avoid shell expansion, \ **noderange**\ should better be quoted with single quotes('') or double quotes(""). \ **noderange**\ is a comma-separated list. Each token (text between commas) in the list can be any of the forms listed below: @@ -363,14 +359,6 @@ 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 208523103..cf4aab58c 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, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face + !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. 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 94259601d..7fb2bf6cc 100644 --- a/docs/source/guides/admin-guides/references/man5/site.5.rst +++ b/docs/source/guides/admin-guides/references/man5/site.5.rst @@ -390,18 +390,6 @@ 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 b4a9ba93e..e2cb86603 100644 --- a/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst +++ b/docs/source/guides/admin-guides/references/man5/xcatdb.5.rst @@ -157,27 +157,6 @@ 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 a79e56ee8..9a67dd224 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 kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" ") + 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::" @@ -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, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face + !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. 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 fbf9ada59..0ab71ac4d 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 kernel options for os provision process(no prefix) or the provisioned os(with prefix "R::"). The options should be delimited with spaces(" ") + 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::" @@ -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, enP3p3s0f1!mac=98:be:94:59:fa:cd linkstate=DOWN,enP3p3s0f2!mac=98:be:94:59:fa:ce candidatename=enP3p3s0f2/enx98be9459face + !|,!|, for example, eth0!MTU=1500|MTU=1460,ib0!MTU=65520 CONNECTED_MODE=yes. 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 b4310d976..c74014cf6 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 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. + 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. diff --git a/makerpm b/makerpm index b093e116d..4fc2bab20 100755 --- a/makerpm +++ b/makerpm @@ -145,8 +145,6 @@ 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 d6a36c659..e2563cfa4 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, 1); + my @diff = xCAT::CFMUtils->arrayops("D", \@newrecords, \@oldrecords); # output the diff to merge files my $fp; @@ -865,7 +865,6 @@ 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: @@ -879,7 +878,7 @@ sub trim { #----------------------------------------------------------------------------- sub arrayops { - my ($class, $ops, $array1, $array2, $ordered) = @_; + my ($class, $ops, $array1, $array2) = @_; my @union = (); my @intersection = (); @@ -887,23 +886,21 @@ sub arrayops { my %count = (); foreach my $element (@$array1, @$array2) { - $count{$element}++; - push @union, $element unless ( $count{$element} > 1 ); + $count{$element}++ } - unless( defined($ordered) and $ordered ) { - @union = keys %count; - } - - foreach my $element (@union) { + foreach my $element (keys %count) { + push @union, $element; 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 103ef87d4..426cf1619 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 switchtype)]) }) { + foreach (values %{ $switchestab->getNodesAttribs($switches, [qw(switch snmpversion username password privacy auth)]) }) { 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 switchtype)]); + my @switchesents = $switchestab->getAllNodeAttribs([qw(switch snmpversion username password privacy auth)]); $self->fill_switchparms(community => $community, switchesents => \@switchesents); my $switchtab = xCAT::Table->new('switch', -create => 0); my @entries = (); @@ -337,12 +337,7 @@ 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}); } @@ -408,13 +403,7 @@ 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) }; } @@ -430,7 +419,6 @@ 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; @@ -456,7 +444,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 switchtype)]); + my @switchentries = $self->{switchestab}->getAllNodeAttribs([qw(switch snmpversion username password privacy auth)]); my $community = "public"; #$self->{sitetab} = xCAT::Table->new('site'); @@ -489,9 +477,6 @@ 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' ]); @@ -512,7 +497,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}, $discover_switch , $ntype\n"); + xCAT::MsgUtils->message("S", "refresh_table: skip $entry->{node} and $entry->{switch}"); next; } if (defined($entry->{switch}) and $entry->{switch} ne "" and defined($entry->{port}) and $entry->{port} ne "") { @@ -549,11 +534,7 @@ 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); @@ -634,9 +615,6 @@ sub walkoid { return $retmap; } - - - sub getsnmpsession { #gets an snmp v3 session appropriate for a switch using the switches table for guidance on the hows @@ -710,54 +688,7 @@ sub refresh_switch { my $community = shift; my $switch = shift; - 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; - } - } - } - + #if ($error) { die $error; } my $session = $self->getsnmpsession('community' => $community, 'switch' => $switch); unless ($session) { xCAT::MsgUtils->message("S", "Failed to communicate with $switch"); @@ -803,9 +734,6 @@ 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 @@ -834,10 +762,6 @@ 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; @@ -860,11 +784,9 @@ 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 @@ -873,11 +795,9 @@ 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 = (); @@ -887,11 +807,8 @@ sub refresh_switch { my $vlan = @tmp[0]; my @mac = @tmp[ -6 .. -1 ]; my $macstring = sprintf("%02x:%02x:%02x:%02x:%02x:%02x", @mac); - # Skip "permanent" ports - if (!defined($mactostate->{$_}) || $mactostate->{$_} != 4) { - push @{ $index_to_mac{$index} }, $macstring; - push @{ $index_to_vlan{$index} }, $vlan; - } + 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 cb01ca93e..9b65054a2 100755 --- a/perl-xCAT/xCAT/NetworkUtils.pm +++ b/perl-xCAT/xCAT/NetworkUtils.pm @@ -2778,35 +2778,4 @@ 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 f4f9965cc..2dfdb7076 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 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.", +'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.", '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,19 +1243,7 @@ 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" . -" 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" . +" will be applied to the node in the groups' order except the repeat one.\n\n" . " -----------------------\n" . "VIRTUALIZATION ATTRIBUTES\n" . " -----------------------\n" . diff --git a/perl-xCAT/xCAT/Table.pm b/perl-xCAT/xCAT/Table.pm index b61786685..508de47c7 100644 --- a/perl-xCAT/xCAT/Table.pm +++ b/perl-xCAT/xCAT/Table.pm @@ -71,9 +71,6 @@ 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. @@ -85,19 +82,7 @@ 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; @@ -170,99 +155,6 @@ 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 @@ -296,7 +188,6 @@ 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"; @@ -308,13 +199,6 @@ 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); @@ -1569,10 +1453,8 @@ 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; @@ -1722,7 +1604,6 @@ 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}; } @@ -1765,10 +1646,8 @@ 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(); @@ -1841,17 +1720,13 @@ 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; @@ -1906,13 +1781,10 @@ 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; @@ -1931,7 +1803,6 @@ sub setAttribs xCAT::NotifHandler->notify($action, $self->{tabname}, \@notif_data, \%new_notif_data); } - $self->trace_db(END_TYPE); return 0; } @@ -1979,7 +1850,6 @@ sub setAttribsWhere if ($dbworkerpid > 0) { return dbc_call($self, 'setAttribsWhere', @_); } - $self->trace_db(START_TYPE); my $where_clause = shift; my $elems = shift; my $cols = ""; @@ -1994,10 +1864,8 @@ 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(); @@ -2035,13 +1903,10 @@ 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); } @@ -2058,7 +1923,6 @@ sub setAttribsWhere \@notif_data, \%new_notif_data); } $sth->finish; - $self->trace_db(END_TYPE); return 0; } @@ -2104,7 +1968,6 @@ sub setNodesAttribs { if ($dbworkerpid > 0) { return dbc_call($self, 'setNodesAttribs', @_); } - $self->trace_db(START_TYPE); my $nodelist = shift; my $keyset = shift; my %cols = (); @@ -2162,7 +2025,6 @@ sub setNodesAttribs { } $self->{dbh}->commit; #commit pending transactions $self->{dbh}->{AutoCommit} = $oldac; #restore autocommit semantics - $self->trace_db(END_TYPE); return; } @@ -2204,10 +2066,8 @@ 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; @@ -2233,7 +2093,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); } @@ -2245,9 +2105,7 @@ 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 "; @@ -2269,9 +2127,7 @@ 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); @@ -2279,7 +2135,6 @@ 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); } #-------------------------------------------------------------------------- @@ -2315,7 +2170,6 @@ 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 = (); @@ -2362,7 +2216,6 @@ sub getNodesAttribs { if ($self->{tabname} ne 'nodelist') { $self->{nodelist}->{_use_cache} = 0; } - $self->trace_db(END_TYPE); return $rethash; } @@ -2440,7 +2293,6 @@ 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} = {}; @@ -2464,153 +2316,7 @@ 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'); #-------------------------------------------------------------------------- @@ -2737,7 +2443,6 @@ 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."); @@ -2816,7 +2521,6 @@ sub getNodeAttribs } } } - $self->trace_db(END_TYPE); return wantarray ? @data : $data[0]; } @@ -3158,6 +2862,7 @@ sub getNodeAttribs_nosub_returnany } } } + return @results; } @@ -3196,7 +2901,6 @@ 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."); @@ -3211,15 +2915,12 @@ 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) @@ -3232,7 +2933,6 @@ sub getAllEntries push @rets, $data; } $query->finish(); - $self->trace_db(END_TYPE); return \@rets; } @@ -3295,7 +2995,6 @@ sub getAllAttribsWhere if ($dbworkerpid > 0) { return dbc_call($self, 'getAllAttribsWhere', @_); } - $self->trace_db(START_TYPE); my $clause = shift; my $whereclause; my @attribs = @_; @@ -3312,10 +3011,8 @@ 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 = (); @@ -3343,7 +3040,6 @@ sub getAllAttribsWhere } } $query->finish(); - $self->trace_db(END_TYPE); return @results; } @@ -3382,7 +3078,6 @@ sub getAllNodeAttribs if ($dbworkerpid > 0) { return dbc_call($self, 'getAllNodeAttribs', @_); } - $self->trace_db(START_TYPE); my $attribq = shift; my $hashretstyle = shift; my %options = @_; @@ -3403,10 +3098,8 @@ 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}) { @@ -3478,7 +3171,6 @@ sub getAllNodeAttribs $self->{_use_cache} = 0; $self->{nodelist}->{_use_cache} = 0; $query->finish(); - $self->trace_db(END_TYPE); if ($hashretstyle) { return $rethash; } else { @@ -3520,10 +3212,9 @@ 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; } @@ -3553,10 +3244,8 @@ sub getAllAttribs } if (@results) { - $self->trace_db(END_TYPE); return @results; #return wantarray ? @results : $results[0]; } - $self->trace_db(END_TYPE); return undef; } @@ -3565,12 +3254,10 @@ 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 = (); @@ -3587,7 +3274,6 @@ sub getAllAttribs } } $query->finish(); - $self->trace_db(END_TYPE); return @results; } @@ -3631,7 +3317,6 @@ sub delEntries if ($dbworkerpid > 0) { return dbc_call($self, 'delEntries', @_); } - $self->trace_db(START_TYPE); my $keyref = shift; my @all_keyparis; my %keypairs; @@ -3676,10 +3361,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}); @@ -3714,10 +3399,8 @@ 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 @@ -3728,7 +3411,7 @@ sub delEntries } @pieces = splice(@all_keyparis, 0, $record_num); } - $self->trace_db(END_TYPE); + } #-------------------------------------------------------------------------- @@ -3767,7 +3450,6 @@ sub getAttribs if ($dbworkerpid > 0) { return dbc_call($self, 'getAttribs', @_); } - $self->trace_db(START_TYPE); #my $key = shift; #my $keyval = shift; @@ -3828,11 +3510,8 @@ 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; } @@ -3865,14 +3544,11 @@ 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()) { @@ -3893,10 +3569,8 @@ sub getAttribs $query->finish(); if (@return) { - $self->trace_db(END_TYPE); return wantarray ? @return : $return[0]; } - $self->trace_db(END_TYPE); return undef; } @@ -3936,13 +3610,10 @@ 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()) { @@ -3960,10 +3631,8 @@ sub getTable $query->finish(); if (@return) { - $self->trace_db(END_TYPE); return @return; } - $self->trace_db(END_TYPE); return undef; } @@ -4420,7 +4089,6 @@ sub writeAllEntries if ($dbworkerpid > 0) { return dbc_call($self, 'writeAllEntries', @_); } - $self->trace_db(START_TYPE); my $filename = shift; my $fh; my $rc = 0; @@ -4429,7 +4097,6 @@ 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; @@ -4445,11 +4112,9 @@ 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) @@ -4463,7 +4128,6 @@ sub writeAllEntries } $query->finish(); CORE::close($fh); - $self->trace_db(END_TYPE); return $rc; } @@ -4506,7 +4170,6 @@ sub writeAllAttribsWhere if ($dbworkerpid > 0) { return dbc_call($self, 'writeAllAttribsWhere', @_); } - $self->trace_db(START_TYPE); my $clause = shift; my $filename = shift; my $whereclause; @@ -4521,7 +4184,6 @@ 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; @@ -4539,10 +4201,8 @@ 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) { @@ -4556,7 +4216,6 @@ sub writeAllAttribsWhere } $query->finish(); CORE::close($fh); - $self->trace_db(END_TYPE); return $rc; } @@ -4632,7 +4291,6 @@ sub getMAXMINEntries if ($dbworkerpid > 0) { return dbc_call($self, 'getMAXMINEntries', @_); } - $self->trace_db(START_TYPE); my $attr = shift; my $rets; my $query; @@ -4646,11 +4304,9 @@ 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) @@ -4672,11 +4328,9 @@ 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) @@ -4690,7 +4344,6 @@ 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 efa72327e..dd40450e3 100755 --- a/perl-xCAT/xCAT/Usage.pm +++ b/perl-xCAT/xCAT/Usage.pm @@ -85,9 +85,7 @@ my %usage = ( OpenPOWER (OpenBMC) specific: rvitals noderange [temp|voltage|wattage|fanspeed|power|altitude|all] MIC specific: - rvitals noderange {thermal|all} - pdu specific: - rvitals noderange ", + rvitals noderange {thermal|all}", "reventlog" => "Usage: reventlog [all [-s]|clear| [-s]] [-V|--verbose] reventlog [-h|--help|-v|--version]", @@ -145,7 +143,7 @@ my %usage = ( rspconfig [garp=] rspconfig [userid= username= password=] OpenBMC specific: - rspconfig [ip|netmask|gateway|hostname|vlan] + rspconfig [ip|netmask|gateway|vlan] iDataplex specific: rspconfig [thermprofile] rspconfig [thermprofile=] @@ -344,13 +342,10 @@ my %usage = ( rflash -p [--activate {disruptive|deferred}] [-d ] rflash [--commit | --recover] [-V|--verbose] rflash [--bpa_acdl] - 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]}", + 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] [|]", "mkhwconn" => "Usage: mkhwconn [-h|--help] diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index e44a184ee..937a36473 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -19,7 +19,6 @@ 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; @@ -43,6 +42,7 @@ require xCAT::InstUtils; #require xCAT::NetworkUtils; require xCAT::Schema; +#require Data::Dumper; require xCAT::NodeRange; require xCAT::Version; require DBI; @@ -575,13 +575,6 @@ 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; } @@ -4910,5 +4903,4 @@ sub acquire_lock_imageop { return (0,$lock); } - 1; diff --git a/xCAT-client/bin/rinstall b/xCAT-client/bin/rinstall index 2d68b3f37..90cc60e12 100755 --- a/xCAT-client/bin/rinstall +++ b/xCAT-client/bin/rinstall @@ -21,6 +21,7 @@ use Getopt::Long; use xCAT::MsgUtils; use xCAT::Utils; use xCAT::Client; +use xCAT::NodeRange; use Cwd; use strict; @@ -71,6 +72,12 @@ 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 fc9ddfe5a..2e967fab5 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<--sn> I] [B<-s> I] [B<-u> I] [B<-p> I] [B<-z>] [B<-w>] B<--range> I +B [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,10 +33,6 @@ 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) @@ -94,34 +90,19 @@ 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 BMCs in IP range "10.4.22-23.100-254", displayed in xCAT stanza format: +2. To get all BMSs 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. 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: +3. 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 -5. To check if the username or password is correct against the BMC: +4. To check if the username or password is correct against the BMC: bmcdiscover -i 10.4.23.254 -u USERID -p PASSW0RD --check -6. Get BMC IP Address source, DHCP Address or static Address +5. 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 ee2b29da1..70c964d15 100644 --- a/xCAT-client/pods/man1/rflash.1.pod +++ b/xCAT-client/pods/man1/rflash.1.pod @@ -24,17 +24,11 @@ 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 B<--recover> I +B I [I | B<-d=>I] [B<-c>|B<--check>] [B<--retry=>I] [B<-V>] =head2 OpenPOWER OpenBMC specific : -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>]} +B I [I | I] [B<-c>|B<--check>] [B<-a>|B<--activate>] [B<-l>|B<--list>] [B<-u>|B<--upload>] [B<-d>|B<--delete>] =head1 B @@ -117,11 +111,9 @@ 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. -OpenPOWER BMC specific (using IPMI): +=item B<-d=>I 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. @@ -135,21 +127,15 @@ 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 or update file must be specified. +Activate update image. Image id must be specified. =item B<-l|--list> @@ -215,12 +201,7 @@ 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 - -=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 + rflash briggs01 -d=/root/supermicro/OP825 =back diff --git a/xCAT-client/pods/man1/rsetboot.1.pod b/xCAT-client/pods/man1/rsetboot.1.pod index 75a2e9ef7..c9e6b1fd6 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. +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. =head1 OPTIONS @@ -64,10 +64,6 @@ 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 3f88d1152..972aa649b 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