From c64a25a52879365229c2b656827279b8870c072c Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Sat, 16 Dec 2017 22:36:10 -0500 Subject: [PATCH 01/21] Add section for OpenBMC rflash in admin-guide, link this section to CORAL reference section --- .../ppc64le/management/advanced/index.rst | 2 +- .../management/advanced/rflash/index.rst | 10 ++++ .../advanced/{rflash.rst => rflash/ipmi.rst} | 6 +- .../advanced/rflash/openbmc/index.rst | 8 +++ .../advanced/rflash/openbmc/manually.rst | 10 ++++ .../rflash/openbmc/openbmc_common.rst} | 57 ++++++++++++------- .../advanced/rflash/openbmc/unattended.rst | 10 ++++ .../coral/cluster_mgmt/firmware/index.rst | 2 +- .../cluster_mgmt/firmware/openbmc/index.rst | 8 +++ .../firmware/openbmc/manually.rst | 10 ++++ .../firmware/openbmc/unattended.rst | 10 ++++ 11 files changed, 105 insertions(+), 28 deletions(-) create mode 100644 docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/index.rst rename docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/{rflash.rst => rflash/ipmi.rst} (69%) create mode 100644 docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst create mode 100644 docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/manually.rst rename docs/source/{references/coral/cluster_mgmt/firmware/openbmc.rst => guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst} (68%) create mode 100644 docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/unattended.rst create mode 100644 docs/source/references/coral/cluster_mgmt/firmware/openbmc/index.rst create mode 100644 docs/source/references/coral/cluster_mgmt/firmware/openbmc/manually.rst create mode 100644 docs/source/references/coral/cluster_mgmt/firmware/openbmc/unattended.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst index fd165f112..6070b8be6 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/index.rst @@ -6,5 +6,5 @@ Advanced Operations rinv.rst rvitals.rst - rflash.rst + rflash/index.rst rspconfig.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/index.rst new file mode 100644 index 000000000..dce79f855 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/index.rst @@ -0,0 +1,10 @@ +``rflash`` - Remote Firmware Flashing +===================================== + +See :doc:`rflash manpage ` for more information. + +.. toctree:: + :maxdepth: 2 + + ipmi.rst + openbmc/index.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/ipmi.rst similarity index 69% rename from docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash.rst rename to docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/ipmi.rst index 4bb1d2d07..0e0234ac6 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/ipmi.rst @@ -1,7 +1,5 @@ -``rflash`` - Remote Firmware Flashing -===================================== - -See :doc:`rflash manpage ` for more information. +IPMI Firmware Update +==================== The ``rflash`` command is provided to assist the system administrator in updating firmware. diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst new file mode 100644 index 000000000..4f841ef1a --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst @@ -0,0 +1,8 @@ +OpenBMC Firmware Update +======================= + +.. toctree:: + :maxdepth: 2 + + unattended.rst + manually.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/manually.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/manually.rst new file mode 100644 index 000000000..2806230e2 --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/manually.rst @@ -0,0 +1,10 @@ +Manual Firmware Flash +===================== + +.. include:: ./openbmc_common.rst + :start-after: BEGIN_flashing_OpenBMC_Servers + :end-before: END_flashing_OpenBMC_Servers + +.. include:: ./openbmc_common.rst + :start-after: BEGIN_Validation_OpenBMC_firmware + :end-before: END_Validation_OpenBMC_firmware diff --git a/docs/source/references/coral/cluster_mgmt/firmware/openbmc.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst similarity index 68% rename from docs/source/references/coral/cluster_mgmt/firmware/openbmc.rst rename to docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst index 49caae6bf..980fc8d83 100644 --- a/docs/source/references/coral/cluster_mgmt/firmware/openbmc.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst @@ -1,18 +1,27 @@ -OpenBMC Firmware Update -======================= +.. BEGIN_unattended_OpenBMC_flashing -The process of updating firmware on the OpenBMC managed servers is documented below. +Unattended flash of OpenBMC managed BMC means that xCAT will attempt to: -The sequence of events that must happen is the following: +#. Upload and active BMC, PNOR or both depending on which files are provided. +#. Reboot the necessary components (BMC and/or HOST) to activate the firmware levels - * Power off the Host - * Update and Activate PNOR - * Update and Activate BMC - * Reboot the BMC (applies BMC) - * Power on the Host (applies PNOR) +Use the following command to flash the firmware unattended: :: -**Note:** xCAT is working on streamlining this process to reduce the flexibility of the above steps at the convenience of the Administrator to handle the necessary reboots. See `Issue #4245 `_ + rpower -d /path/to/directory +If there are errors encountered during the flash process, take a look at the manual steps to continue flashing the BMC. + +.. END_unattended_OpenBMC_flashing + +.. BEGIN_flashing_OpenBMC_Servers + +The sequence of events that must happen to flash OpenBMC firmware is the following: + +#. Power off the Host +#. Upload and Activate BMC +#. Reboot the BMC (applies BMC) +#. Upload and Activate PNOR +#. Power on the Host (applies PNOR) Power off Host @@ -22,18 +31,7 @@ Use the rpower command to power off the host: :: rpower off -Update and Activate PNOR Firmware ---------------------------------- - -Use the rflash command to upload and activate the PNOR firmware: :: - - rflash -a /path/to/witherspoon.pnor.squashfs.tar - -If running ``rflash`` in Hierarchy, the firmware files must be accessible on the Service Nodes. - -**Note:** The ``-a`` option does an upload and activate in one step, after firmware is activated, use the ``rflash -l`` to view. The ``rflash`` command shows ``(*)`` as the active firmware and ``(+)`` on the firmware that requires reboot to become effective. - -Update and Activate BMC Firmware +Upload and Activate BMC Firmware -------------------------------- Use the rflash command to upload and activate the PNOR firmware: :: @@ -55,6 +53,16 @@ The BMC will take 2-5 minutes to reboot, check the status using: ``rpower -a /path/to/witherspoon.pnor.squashfs.tar + +If running ``rflash`` in Hierarchy, the firmware files must be accessible on the Service Nodes. + +**Note:** The ``-a`` option does an upload and activate in one step, after firmware is activated, use the ``rflash -l`` to view. The ``rflash`` command shows ``(*)`` as the active firmware and ``(+)`` on the firmware that requires reboot to become effective. Power on Host ------------- @@ -63,6 +71,9 @@ User the ``rpower`` command to power on the Host: :: rpower on +.. END_flashing_OpenBMC_Servers + +.. BEGIN_Validation_OpenBMC_firmware Validation ---------- @@ -77,3 +88,5 @@ Use one of the following commands to validate firmware levels are in sync: rflash -l | grep "\*" | xcoll + +.. END_Validation_OpenBMC_firmware diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/unattended.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/unattended.rst new file mode 100644 index 000000000..b4608367b --- /dev/null +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/unattended.rst @@ -0,0 +1,10 @@ +Unattended Firmware Flash +========================= + +.. include:: ./openbmc_common.rst + :start-after: BEGIN_unattended_OpenBMC_flashing + :end-before: END_unattended_OpenBMC_flashing + +.. include:: ./openbmc_common.rst + :start-after: BEGIN_Validation_OpenBMC_firmware + :end-before: END_Validation_OpenBMC_firmware diff --git a/docs/source/references/coral/cluster_mgmt/firmware/index.rst b/docs/source/references/coral/cluster_mgmt/firmware/index.rst index 1d105d896..08b0828bb 100644 --- a/docs/source/references/coral/cluster_mgmt/firmware/index.rst +++ b/docs/source/references/coral/cluster_mgmt/firmware/index.rst @@ -5,4 +5,4 @@ Power9 Firmware Update :maxdepth: 2 ipmi.rst - openbmc.rst + openbmc/index.rst diff --git a/docs/source/references/coral/cluster_mgmt/firmware/openbmc/index.rst b/docs/source/references/coral/cluster_mgmt/firmware/openbmc/index.rst new file mode 100644 index 000000000..4f841ef1a --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/firmware/openbmc/index.rst @@ -0,0 +1,8 @@ +OpenBMC Firmware Update +======================= + +.. toctree:: + :maxdepth: 2 + + unattended.rst + manually.rst diff --git a/docs/source/references/coral/cluster_mgmt/firmware/openbmc/manually.rst b/docs/source/references/coral/cluster_mgmt/firmware/openbmc/manually.rst new file mode 100644 index 000000000..1f3c88160 --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/firmware/openbmc/manually.rst @@ -0,0 +1,10 @@ +Manual Firmware Flash +===================== + +.. include:: ../../../../../guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst + :start-after: BEGIN_flashing_OpenBMC_Servers + :end-before: END_flashing_OpenBMC_Servers + +.. include:: ../../../../../guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst + :start-after: BEGIN_Validation_OpenBMC_firmware + :end-before: END_Validation_OpenBMC_firmware diff --git a/docs/source/references/coral/cluster_mgmt/firmware/openbmc/unattended.rst b/docs/source/references/coral/cluster_mgmt/firmware/openbmc/unattended.rst new file mode 100644 index 000000000..21e8d9915 --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/firmware/openbmc/unattended.rst @@ -0,0 +1,10 @@ +Unattended Firmware Flash +========================= + +.. include:: ../../../../../guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst + :start-after: BEGIN_unattended_OpenBMC_flashing + :end-before: END_unattended_OpenBMC_flashing + +.. include:: ../../../../../guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst + :start-after: BEGIN_Validation_OpenBMC_firmware + :end-before: END_Validation_OpenBMC_firmware From 8ed0cece2dcadc2ebbf52d048a5cc1786e0f8dd9 Mon Sep 17 00:00:00 2001 From: bybai Date: Thu, 8 Mar 2018 02:06:27 -0500 Subject: [PATCH 02/21] enhance rflash unattended doc --- .../management/advanced/rflash/openbmc/index.rst | 2 +- .../advanced/rflash/openbmc/openbmc_common.rst | 12 +++++++++--- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst index 4f841ef1a..804913d6d 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/index.rst @@ -4,5 +4,5 @@ OpenBMC Firmware Update .. toctree:: :maxdepth: 2 - unattended.rst manually.rst + unattended.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst index 980fc8d83..6ad105759 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst @@ -2,12 +2,18 @@ Unattended flash of OpenBMC managed BMC means that xCAT will attempt to: -#. Upload and active BMC, PNOR or both depending on which files are provided. -#. Reboot the necessary components (BMC and/or HOST) to activate the firmware levels +#. Upload both BMC and PNOR +#. Activate both BMC and PNOR +#. If BMC state is ready, reboot BMC to apply BMC, or else, ``rflash`` will exit +#. If PNOR state is ready, and use ``--no-host-reboot`` option, ``rflash`` will not reboot HOST +#. If PNOR state is ready, and do not use ``--no-host-reboot`` option, ``rflash`` will reboot HOST to apply PNOR Use the following command to flash the firmware unattended: :: - rpower -d /path/to/directory + rflash -d /path/to/directory +Use the following command to flash the firmware unattended and not reboot HOST: :: + + rflash -d /path/to/directory --no-host-reboot If there are errors encountered during the flash process, take a look at the manual steps to continue flashing the BMC. From fe60fe04db881b9d94772e0fae21dbf51ecc710e Mon Sep 17 00:00:00 2001 From: GONG Jie Date: Thu, 8 Mar 2018 17:24:27 +0800 Subject: [PATCH 03/21] Add libnl3 to ib.rhels7.ppc64le.pkglist --- xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist | 1 + 1 file changed, 1 insertion(+) diff --git a/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist b/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist index a7de3c96b..3b4b98fbc 100644 --- a/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist +++ b/xCAT-server/share/xcat/ib/netboot/rh/ib.rhels7.ppc64le.pkglist @@ -6,6 +6,7 @@ tcsh gcc-gfortran lsof libnl +libnl3 libxml2-python python-devel redhat-rpm-config From 88925f99a8dd7d688a23ef5eaea183a74564e415 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 8 Mar 2018 15:12:36 -0500 Subject: [PATCH 04/21] Reverse installing xCAT-openbmc-py by default so we can require python dependencies --- xCAT-openbmc-py/xCAT-openbmc-py.spec | 3 +++ xCAT/xCAT.spec | 4 ---- xCATsn/xCATsn.spec | 4 ---- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/xCAT-openbmc-py/xCAT-openbmc-py.spec b/xCAT-openbmc-py/xCAT-openbmc-py.spec index c6e81a069..acfe6fdb5 100644 --- a/xCAT-openbmc-py/xCAT-openbmc-py.spec +++ b/xCAT-openbmc-py/xCAT-openbmc-py.spec @@ -18,6 +18,9 @@ AutoReqProv: no BuildArch: noarch Requires: xCAT-server +Requires: python-gevent >= 1.2.2-2 +Requires: python-greenlet >= 0.4.13-2 +Requires: python2-docopt python-requests python-paramiko python-scp %description xCAT-openbmc-py provides openbmc related functions. diff --git a/xCAT/xCAT.spec b/xCAT/xCAT.spec index 2f9c6d0eb..476b42109 100644 --- a/xCAT/xCAT.spec +++ b/xCAT/xCAT.spec @@ -91,10 +91,6 @@ Requires: ipmitool-xcat >= 1.8.17-1 %ifarch ppc ppc64 ppc64le Requires: ipmitool-xcat >= 1.8.17-1 %endif -%ifarch ppc64le -# only OpenBMC support -Requires: xCAT-openbmc-py -%endif %endif %if %notpcm diff --git a/xCATsn/xCATsn.spec b/xCATsn/xCATsn.spec index d2bdf7749..f8c3531f2 100644 --- a/xCATsn/xCATsn.spec +++ b/xCATsn/xCATsn.spec @@ -73,10 +73,6 @@ Requires: ipmitool-xcat >= 1.8.17-1 %ifarch ppc ppc64 ppc64le Requires: ipmitool-xcat >= 1.8.17-1 %endif -%ifarch ppc64le -# only OpenBMC support -Requires: xCAT-openbmc-py -%endif %endif %if %notpcm From eaf6b0eeb84cb238486f4bc670b8b39285d2803d Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 8 Mar 2018 16:39:39 -0500 Subject: [PATCH 05/21] Adding documentation for installing xCAT-openbmc-py --- .../references/coral/cluster_mgmt/index.rst | 1 + .../coral/cluster_mgmt/scalability/index.rst | 7 ++++ .../cluster_mgmt/scalability/python/index.rst | 12 ++++++ .../scalability/python/install/disable.rst | 14 +++++++ .../scalability/python/install/index.rst | 12 ++++++ .../scalability/python/install/pip.rst | 22 ++++++++++ .../scalability/python/install/rpm.rst | 42 +++++++++++++++++++ .../scalability/python/performance.rst | 33 +++++++++++++++ 8 files changed, 143 insertions(+) create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/index.rst create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/python/index.rst create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/python/install/disable.rst create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/python/install/pip.rst create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/python/performance.rst diff --git a/docs/source/references/coral/cluster_mgmt/index.rst b/docs/source/references/coral/cluster_mgmt/index.rst index 20b2bbcb8..acc9b2ea4 100644 --- a/docs/source/references/coral/cluster_mgmt/index.rst +++ b/docs/source/references/coral/cluster_mgmt/index.rst @@ -4,4 +4,5 @@ Cluster Management .. toctree:: :maxdepth: 2 + scalability/index.rst firmware/index.rst diff --git a/docs/source/references/coral/cluster_mgmt/scalability/index.rst b/docs/source/references/coral/cluster_mgmt/scalability/index.rst new file mode 100644 index 000000000..17c8d5edc --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/scalability/index.rst @@ -0,0 +1,7 @@ +Scalability +=========== + +.. toctree:: + :maxdepth: 2 + + python/index.rst diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/index.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/index.rst new file mode 100644 index 000000000..8a5cdf551 --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/index.rst @@ -0,0 +1,12 @@ +Python framework +================ + +When testing the scale up of xCAT commands against OpenBMC REST API, it was evident that the Perl framework of xCAT did not scale well and was not sending commands to the BMCs in a true parallel fashion. + +The team investigated the possibility of using Python framework + +.. toctree:: + :maxdepth: 2 + + performance.rst + install/index.rst diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/disable.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/disable.rst new file mode 100644 index 000000000..40c54c64b --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/disable.rst @@ -0,0 +1,14 @@ +Disable Python Framework +======================== + +By default, if ``xCAT-openbmc-py`` is installed and Python files are there, xCAT will default to running the Python framework. + +A site table attribute is created to allow the ability to control between Python and Perl. + +* To disable all Python code and revert to the Perl implementation: :: + + chdef -t site clustersite openbmcperl=ALL + +* To disable single commands, specify a command separated lists: :: + + chdef -t site clustersite openbmcperl="rpower,rbeacon" diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst new file mode 100644 index 000000000..ec1f19ce7 --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/index.rst @@ -0,0 +1,12 @@ +Installation +============ + +A new RPM is created that contains the Python code: ``xCAT-openbmc-py``. The Python code requires additonal Python libraries that may not be available as an operating system provided package. The following will help resolve the dependencies. + + +.. toctree:: + :maxdepth: 2 + + rpm.rst + pip.rst + disable.rst diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/pip.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/pip.rst new file mode 100644 index 000000000..344b7e7c4 --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/pip.rst @@ -0,0 +1,22 @@ +Using pip +========= + +A alternative method for installing the Python dependencies is using ``pip``. + +#. Download ``pip`` using one of the following methods: + + #. ``pip`` is provided in the EPEL repo as: ``python2-pip`` + + #. Follow the instructions to install from here: https://pip.pypa.io/en/stable/installing/ + +#. Use ``pip`` to install the following Python libraries: :: + + pip install gevent docopt requests paramiko scp + + +#. Install ``xCAT-openbmc-py`` using ``rpm`` with ``--nodeps``: :: + + cd xcat-core + rpm -ihv xCAT-openbmc-py*.rpm --nodeps + + diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst new file mode 100644 index 000000000..32efaaa19 --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/install/rpm.rst @@ -0,0 +1,42 @@ +Using RPM (recommended) +======================= + +**Support is only for RHEL 7.5 for Power LE (Power 9)** + +The following repositories should be configured on your Management Node (and Service Nodes). + + * RHEL 7.5 OS Repository + * RHEL 7.5 Extras Repository + * RHEL 7 EPEL Repo (https://fedoraproject.org/wiki/EPEL) + * Fedora28 Repo (for ``gevent``, ``greenlet``) + +#. Configure the MN/SN to the RHEL 7.5 OS Repo + +#. Configure the MN/SN to the RHEL 7.5 Extras Repo + +#. Configure the MN/SN to the EPEL Repo (https://fedoraproject.org/wiki/EPEL) + +#. Create a local Fedora28 Repo and Configure the MN/SN to the FC28 Repo + + Here's an example to configure the Fedora 28 repo at ``/install/repos/fc28`` + + #. Make the target repo directory on the MN: :: + + mkdir -p /install/repos/fc28/ppc64le/Packages + + #. Download the rpms from the Internet: :: + + cd /install/repos/fc28/ppc64le/Packages + wget https://www.rpmfind.net/linux/fedora-secondary/development/rawhide/Everything/ppc64le/os/Packages/p/python2-gevent-1.2.2-2.fc28.ppc64le.rpm + wget https://www.rpmfind.net/linux/fedora-secondary/development/rawhide/Everything/ppc64le/os/Packages/p/python2-greenlet-0.4.13-2.fc28.ppc64le.rpm + + #. Create a yum repo in that directory: :: + + cd /install/repos/fc28/ppc64le/ + createrepo . + +#. Install ``xCAT-openbmc-py`` using ``yum``: :: + + yum install xCAT-openbmc-py + + **Note**: The install will fail if the dependencies cannot be met. diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/performance.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/performance.rst new file mode 100644 index 000000000..43460961b --- /dev/null +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/performance.rst @@ -0,0 +1,33 @@ +Performance +=========== + +Supported Commands +------------------ + +The following commands are currently supported: + ++----------------+-----------+-------------+----------------------------------+ +|Command |Support |Release |Notes | ++================+===========+=============+==================================+ +| rpower | Yes | 2.13.11 | | ++----------------+-----------+-------------+----------------------------------+ +| rinv | Yes | 2.13.11 | | ++----------------+-----------+-------------+----------------------------------+ +| rbeacon | Yes | 2.13.11 | | ++----------------+-----------+-------------+----------------------------------+ +| rspconfig | No | | | ++----------------+-----------+-------------+----------------------------------+ +| rsetboot | Yes | 2.13.11 | | ++----------------+-----------+-------------+----------------------------------+ +| rvitals | Yes | 2.13.11 | | ++----------------+-----------+-------------+----------------------------------+ +| rflash | No | | | ++----------------+-----------+-------------+----------------------------------+ +| reventlog | No | | | ++----------------+-----------+-------------+----------------------------------+ + + +Data +---- + +TBD From 6da5a510100351aa61fe19db1da95109b0c41560 Mon Sep 17 00:00:00 2001 From: bybai Date: Thu, 8 Mar 2018 21:36:55 -0500 Subject: [PATCH 06/21] enhance rflash doc --- .../advanced/rflash/openbmc/openbmc_common.rst | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst index 6ad105759..50404a5a8 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/advanced/rflash/openbmc/openbmc_common.rst @@ -1,17 +1,19 @@ .. BEGIN_unattended_OpenBMC_flashing -Unattended flash of OpenBMC managed BMC means that xCAT will attempt to: +Unattended flash of OpenBMC firmware will do the following events: -#. Upload both BMC and PNOR -#. Activate both BMC and PNOR -#. If BMC state is ready, reboot BMC to apply BMC, or else, ``rflash`` will exit -#. If PNOR state is ready, and use ``--no-host-reboot`` option, ``rflash`` will not reboot HOST -#. If PNOR state is ready, and do not use ``--no-host-reboot`` option, ``rflash`` will reboot HOST to apply PNOR +#. Upload both BMC firmware file and PNOR firmware file +#. Activate both BMC firmware and PNOR firmware +#. If BMC firmware becomes activate, reboot BMC to apply new BMC firmware, or else, ``rflash`` will exit +#. If BMC itself state is ``NotReady``, ``rflash`` will exit +#. If BMC itself state is ``Ready``, and use ``--no-host-reboot`` option, ``rflash`` will not reboot the compute node +#. If BMC itself state is ``Ready``, and do not use ``--no-host-reboot`` option, ``rflash`` will reboot the compute node to apply PNOR firmware Use the following command to flash the firmware unattended: :: rflash -d /path/to/directory -Use the following command to flash the firmware unattended and not reboot HOST: :: + +Use the following command to flash the firmware unattended and not reboot the compute node: :: rflash -d /path/to/directory --no-host-reboot @@ -46,7 +48,7 @@ Use the rflash command to upload and activate the PNOR firmware: :: If running ``rflash`` in Hierarchy, the firmware files must be accessible on the Service Nodes. -**Note:** The ``-a`` option does an upload and activate in one step, after firmware is activated, use the ``rflash -l`` to view. The ``rflash`` command shows ``(*)`` as the active firmware and ``(+)`` on the firmware that requires reboot to become effective. +**Note:** If a .tar file is provided, the ``-a`` option does an upload and activate in one step. If an ID is provided, the ``-a`` option just does activate the specified firmware. After firmware is activated, use the ``rflash -l`` to view. The ``rflash`` command shows ``(*)`` as the active firmware and ``(+)`` on the firmware that requires reboot to become effective. Reboot the BMC -------------- From a03e17dadfa2562c46fbc5d93bd0e38310d08f2e Mon Sep 17 00:00:00 2001 From: chenglch Date: Fri, 9 Mar 2018 10:30:41 +0800 Subject: [PATCH 07/21] Fix indent problem for the comment lines For the usability issue, add more spaces to avoid of some errors when deleting the `#`. --- xCAT-server/lib/perl/xCAT/Goconserver.pm | 34 ++++++++++++------------ 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/Goconserver.pm b/xCAT-server/lib/perl/xCAT/Goconserver.pm index a28d398e0..172e1010e 100644 --- a/xCAT-server/lib/perl/xCAT/Goconserver.pm +++ b/xCAT-server/lib/perl/xCAT/Goconserver.pm @@ -596,23 +596,23 @@ sub build_conf { " reconnect_interval: 10 # retry interval in second if console could not be connected\n". " logger: # multiple logger targets could be specified\n". " file: # file logger, valid fields: name,logdir. Accept array in yaml format\n". - " - name: default # the identity name customized by user\n". - " logdir: ".CONSOLE_LOG_DIR." # default log directory of xcat\n". - " # - name: goconserver \n". - " # logdir: /var/log/goconserver/nodes \n". - " # tcp: # valied fields: name, host, port, timeout, ssl_key_file, ssl_cert_file, ssl_ca_cert_file, ssl_insecure\n". - " # - name: logstash \n". - " # host: 127.0.0.1 \n". - " # port: 9653 \n". - " # timeout: 3 # default 3 second\n". - " # - name: filebeat \n". - " # host: \n". - " # port: \n". - " # udp: # valid fiedls: name, host, port, timeout\n". - " # - name: rsyslog \n". - " # host: \n". - " # port: \n". - " # timeout: # default 3 second\n"; + " - name: default # the identity name customized by user\n". + " logdir: ".CONSOLE_LOG_DIR." # default log directory of xcat\n". + " #- name: goconserver \n". + " # logdir: /var/log/goconserver/nodes \n". + " #tcp: # valied fields: name, host, port, timeout, ssl_key_file, ssl_cert_file, ssl_ca_cert_file, ssl_insecure\n". + " #- name: logstash \n". + " # host: 127.0.0.1 \n". + " # port: 9653 \n". + " # timeout: 3 # default 3 second\n". + " #- name: filebeat \n". + " # host: \n". + " # port: \n". + " #udp: # valid fiedls: name, host, port, timeout\n". + " #- name: rsyslog \n". + " # host: 127.0.0.1 \n". + " # port: 512 \n". + " # timeout: 3 # default 3 second\n"; my $file; my $ret = open ($file, '>', '/etc/goconserver/server.conf'); From 0f08fb31a0d49d21029878078d936ad4806ceeda Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Thu, 8 Mar 2018 21:49:00 -0500 Subject: [PATCH 08/21] Install first, then performance section --- .../references/coral/cluster_mgmt/scalability/python/index.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/index.rst b/docs/source/references/coral/cluster_mgmt/scalability/python/index.rst index 8a5cdf551..40197bc6e 100644 --- a/docs/source/references/coral/cluster_mgmt/scalability/python/index.rst +++ b/docs/source/references/coral/cluster_mgmt/scalability/python/index.rst @@ -8,5 +8,5 @@ The team investigated the possibility of using Python framework .. toctree:: :maxdepth: 2 - performance.rst install/index.rst + performance.rst From 11f469792b3f0ad5891df70bf2dd45f9870803c2 Mon Sep 17 00:00:00 2001 From: hu-weihua Date: Fri, 9 Mar 2018 00:33:49 -0500 Subject: [PATCH 09/21] Modify all fullwidth colon in test case --- xCAT-test/autotest/testcase/mkdef/cases0 | 18 +++++++++--------- xCAT-test/autotest/testcase/rmdef/cases0 | 2 +- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/xCAT-test/autotest/testcase/mkdef/cases0 b/xCAT-test/autotest/testcase/mkdef/cases0 index 38bfacf91..547992ffd 100644 --- a/xCAT-test/autotest/testcase/mkdef/cases0 +++ b/xCAT-test/autotest/testcase/mkdef/cases0 @@ -187,7 +187,7 @@ os:linux description:create a node with cec template once cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test -check:rc==0 +check:rc==0 check:output=~1 object definitions have been created or modified cmd:lsdef auto_test_cec_node_1 check:output=~Object name\: auto\_test\_cec\_node\_1 @@ -214,7 +214,7 @@ cmd:lsdef --template auto_test_invalid_template check:rc==1 check:output=~Error\: Could not find auto\_test\_invalid\_template in xCAT templates cmd:mkdef -t node -o auto_test_node --template auto_test_invalid_template -check:rc==1 +check:rc==1 check:output=~Error\: Could not find the template object named \'auto\_test\_invalid\_template\' of type \'node\' end @@ -224,11 +224,11 @@ description:create a node with a node template, using cec template to create nod cmd:result=`lsdef | grep auto_test_cec_node_1`; if [[ $result =~ "auto_test_cec_node_1" ]]; then echo $result; noderm auto_test_cec_node_1; fi cmd:result=`lsdef | grep auto_test_cec_node_2`; if [[ $result =~ "auto_test_cec_node_2" ]]; then echo $result; noderm auto_test_cec_node_2; fi cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test groups=test_template -check:rc==0 +check:rc==0 check:output=~1 object definitions have been created or modified check:output=~created cmd:mkdef -t node -o auto_test_cec_node_2 --template auto_test_cec_node_1 serial=test2 mtm=test2 hcp=test2 -check:rc==0 +check:rc==0 check:output=~1 object definitions have been created or modified cmd:lsdef auto_test_cec_node_2 check:output=~Object name\: auto\_test\_cec\_node\_2 @@ -263,7 +263,7 @@ cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mt check:rc==1 check:output=~Error\: The attribute \"hcp\" must be specified! cmd:mkdef -t node -o auto_test_cec_node_1 --template cec-template serial=test mtm=test hcp=test -check:rc==0 +check:rc==0 check:output=~1 object definitions have been created or modified cmd:lsdef auto_test_cec_node_1 check:output=~Object name\: auto\_test\_cec\_node\_1 @@ -287,10 +287,10 @@ description:create node named cec-template with cec template at beginning, the n cmd:result=`lsdef | grep cec-template`; if [[ $result =~ "cec-template" ]]; then echo $result; noderm cec-template; fi cmd:result=`lsdef | grep auto_test_cec_node`; if [[ $result =~ "auto_test_cec_node" ]]; then echo $result; noderm auto_test_cec_node; fi cmd:mkdef -t node -o cec-template --template cec-template serial=test mtm=test hcp=test groups=test_template_priority -check:rc==0 +check:rc==0 check:output=~1 object definitions have been created or modified cmd:mkdef -t node -o auto_test_cec_node --template cec-template serial=test2 mtm=test2 hcp=test2 -check:rc==0 +check:rc==0 check:output=~1 object definitions have been created or modified cmd:lsdef auto_test_cec_node check:output=~Object name\: auto\_test\_cec\_node @@ -306,9 +306,9 @@ check:output=~hcp\=test2 check:output=~mtm\=test2 check:output=~serial\=test2 cmd:noderm cec-template -check:rc==0 +check:rc==0 cmd:noderm auto_test_cec_node -check:rc==0 +check:rc==0 end start:mkdef_template_diskless_osimage_rootimgdir diff --git a/xCAT-test/autotest/testcase/rmdef/cases0 b/xCAT-test/autotest/testcase/rmdef/cases0 index 50bbe14e9..5133ae8aa 100644 --- a/xCAT-test/autotest/testcase/rmdef/cases0 +++ b/xCAT-test/autotest/testcase/rmdef/cases0 @@ -134,7 +134,7 @@ os:linux description:try to delete a template, then error messages appear cmd:result=`lsdef | grep switch-template`; if [[ $result =~ "switch-template" ]]; then echo $result; noderm switch-template; fi cmd:rmdef switch-template -check:rc==1 +check:rc==1 check:output=~Error\: Could not find an object named \'switch-template\' of type \'node\' check:output=~No objects have been removed from the xCAT database. end From 55af8ca8c4c8a1ae1b86db0f217cc88483a86c98 Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Fri, 9 Mar 2018 13:27:35 +0800 Subject: [PATCH 10/21] remove the dependency, Load SOAP module dynamically --- perl-xCAT/xCAT/vboxService.pm | 2 +- xCAT-server/lib/xcat/plugins/vbox.pm | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/perl-xCAT/xCAT/vboxService.pm b/perl-xCAT/xCAT/vboxService.pm index 2f7b7130e..27f658ab9 100644 --- a/perl-xCAT/xCAT/vboxService.pm +++ b/perl-xCAT/xCAT/vboxService.pm @@ -813,7 +813,7 @@ my %methods = ( }, # end IConsole_getPowerButtonHandled ); # end my %methods -use SOAP::Lite; # vbox.pm requires SOAP::Lite before requiring vboxService.pm, so we can check for SOAP::Lite dynamically +#use SOAP::Lite; # vbox.pm requires SOAP::Lite before requiring vboxService.pm, so we can check for SOAP::Lite dynamically use Exporter; use Carp (); diff --git a/xCAT-server/lib/xcat/plugins/vbox.pm b/xCAT-server/lib/xcat/plugins/vbox.pm index 3ed06b262..be6578034 100644 --- a/xCAT-server/lib/xcat/plugins/vbox.pm +++ b/xCAT-server/lib/xcat/plugins/vbox.pm @@ -105,7 +105,7 @@ sub process_request my $soapsupport = eval { require SOAP::Lite; }; unless ($soapsupport) { #Still no SOAP::Lite module - $callback->({ error => "SOAP::Lite perl module missing, unable to fulfill Virtual Box plugin requirements", errorcode => [42] }); + $callback->({ error => "SOAP::Lite perl module missing. Install perl-SOAP-Lite before running commands on Virtual Box nodes.", errorcode => [42] }); return []; } require xCAT::vboxService; From f685d458b432bb2cfc604eb0cc3b621b9b93676d Mon Sep 17 00:00:00 2001 From: chenglch Date: Tue, 6 Mar 2018 14:58:20 +0800 Subject: [PATCH 11/21] Add doc to enable goconserver by default Add the steps in documentation to enable goconserver by default. --- .../advanced/goconserver/configuration.rst | 119 ++++++++++++++++++ docs/source/advanced/goconserver/index.rst | 14 +++ .../advanced/goconserver/quickstart.rst | 20 +++ docs/source/advanced/goconserver/rest.rst | 5 + docs/source/advanced/index.rst | 1 + .../ppc64le/management/basic/rcons.rst | 42 +++++-- 6 files changed, 191 insertions(+), 10 deletions(-) create mode 100644 docs/source/advanced/goconserver/configuration.rst create mode 100644 docs/source/advanced/goconserver/index.rst create mode 100644 docs/source/advanced/goconserver/quickstart.rst create mode 100644 docs/source/advanced/goconserver/rest.rst diff --git a/docs/source/advanced/goconserver/configuration.rst b/docs/source/advanced/goconserver/configuration.rst new file mode 100644 index 000000000..5f6a50d61 --- /dev/null +++ b/docs/source/advanced/goconserver/configuration.rst @@ -0,0 +1,119 @@ +Configuration +============= + +Location +-------- + +The configuration file for ``goconserver`` is located at ``/etc/goconserver/server.conf``. +When the configuration is changed, reload using: ``systemctl restart goconserver.service``. +An example for the configuration could be found from +`Example Conf `_. + +Tag For xCAT +------------ + +xCAT generates a configuration file that includes a identifier on the first +line. For example: :: + + #generated by xcat Version 2.13.10 (git commit 7fcd37ffb7cec37c021ab47d4baec151af547ac0, built Thu Jan 25 07:15:36 EST 2018) + +``makegocons`` checks for this token and will not make changes to the +configuration file if it exists. This gives the user the ability to customize +the configuration based on their specific site configuration. + + +Multiple Output Plugins +----------------------- + +``goconserver`` support console redirection to multiple targets with ``file``, +``tcp`` and ``udp`` logger plugins. The entry could be found like below: :: + + console: + # the console session port for client(congo) to connect. + port: 12430 + + logger: + # for file logger + file: + # multiple file loggers could be specified + # valid fields: name, logdir + - name: default + logdir: /var/log/goconserver/nodes/ + - name: xCAT + logdir: /var/log/consoles + + tcp: + - name: logstash + host: briggs01 + port: 9653 + ssl_key_file: /etc/xcat/cert/server-cred.pem + ssl_cert_file: /etc/xcat/cert/server-cred.pem + ssl_ca_cert_file: /etc/xcat/cert/ca.pem + + - name: rsyslog + host: sn02 + port: 9653 + + udp: + - name: filebeat + host: 192.168.1.5 + port: 512 + +With the configuration above, the console log files for each node would be written in +both ``/var/log/goconserver/nodes/.log`` and ``/var/log/consoles/.log``. +In addition, console log content will be redirected into remote services +specified in the tcp and udp sections. + +Verification +------------ + +To check if ``goconserver`` works correctly, see the log file ``/var/log/goconserver/server.log``. + + #. Check if TCP logger has been activated. + + When starting ``goconserver``, if the log message is like below, it + means the TCP configuration has been activated. :: + + {"file":"github.com/xcat2/goconserver/console/logger/tcp.go (122)","level":"info","msg":"Starting TCP publisher: logstash","time":"2018-03-02T21:15:35-05:00"} + {"file":"github.com/xcat2/goconserver/console/logger/tcp.go (122)","level":"info","msg":"Starting TCP publisher: sn02","time":"2018-03-02T21:15:35-05:00"} + + #. Debug when encounter error about TCP logger + + If the remote service is not started or the network is unreachable, the + log message would be like below. :: + + {"file":"github.com/xcat2/goconserver/console/logger/tcp.go (127)","level":"error","msg":"TCP publisher logstash: dial tcp 10.6.27.1:9653: getsockopt: connection refused","time":"2018-03-07T21:12:58-05:00"} + + Check the service status and the network configuration including the + ``selinux`` and ``iptable rules``. When the remote service works + correctly, TCP or UDP logger of ``goconserver`` would recover automatically. + +Reconnect Interval +------------------ + +If console node is defined with ``ondemand=false``, when the console connection +could not be established, ``goconserver`` would reconnect automatically. The +interval time could be specified at :: + + console: + # retry interval in second if console could not be connected. + reconnect_interval: 10 + +Performance Tuning +------------------ + +Adjust the worker numbers to leverage multi-core processor performance based on +the site configuration. :: + + global: + # the max cpu cores for workload + worker: 4 + +Debug +----- + +The log level for ``goconserver`` is defined in ``/etc/goconserver/server.conf`` :: + + global: + # debug, info, warn, error, fatal, panic + log_level: info diff --git a/docs/source/advanced/goconserver/index.rst b/docs/source/advanced/goconserver/index.rst new file mode 100644 index 000000000..39f3ff2cc --- /dev/null +++ b/docs/source/advanced/goconserver/index.rst @@ -0,0 +1,14 @@ +Go Conserver +============ + +``goconserver`` is a conserver replacement written in `Go `_ +programming language. For more information, see https://github.com/xcat2/goconserver/ + +.. toctree:: + + :maxdepth: 2 + + quickstart.rst + configuration.rst + rest.rst + diff --git a/docs/source/advanced/goconserver/quickstart.rst b/docs/source/advanced/goconserver/quickstart.rst new file mode 100644 index 000000000..96559668b --- /dev/null +++ b/docs/source/advanced/goconserver/quickstart.rst @@ -0,0 +1,20 @@ +Quickstart +========== + +To enable ``goconserver``, execute the following steps: + +#. Install the ``goconserver`` RPM: :: + + yum install goconserver + + +#. If upgrading xCAT running ``conserver``, stop it first: :: + + systemctl stop conserver.service + + +#. Start ``goconserver`` and create the console configuration files with a single command :: + + makegocons + + The new console logs will start logging to ``/var/log/consoles/.log`` \ No newline at end of file diff --git a/docs/source/advanced/goconserver/rest.rst b/docs/source/advanced/goconserver/rest.rst new file mode 100644 index 000000000..81c112786 --- /dev/null +++ b/docs/source/advanced/goconserver/rest.rst @@ -0,0 +1,5 @@ +REST API +======== + +``goconserver`` provides REST API interface to manage the node sessions. For +detail, see `REST `_. diff --git a/docs/source/advanced/index.rst b/docs/source/advanced/index.rst index 820e899d8..b2c45af78 100755 --- a/docs/source/advanced/index.rst +++ b/docs/source/advanced/index.rst @@ -8,6 +8,7 @@ Advanced Topics cluster_maintenance/index.rst migration/index.rst confluent/index.rst + goconserver/index.rst docker/index.rst domain_name_resolution/index.rst gpu/index.rst diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst index 396880103..1addf7997 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/management/basic/rcons.rst @@ -28,7 +28,37 @@ Troubleshooting General ``````` -The xCAT ``rcons`` command relies on conserver (http://www.conserver.com/). The ``conserver`` package should have been installed with xCAT as it's part of the xCAT dependency package. If you are having problems seeing the console, try the following. +``xCAT`` has been integrated with 3 kinds of console server service, they are + + - `conserver `_ + - `goconserver `_ + - `confluent `_ + +``rcons`` command relies on one of them. The ``conserver`` and ``goconserver`` +packages should have been installed with xCAT as they are part of the xCAT +dependency packages. If you hope to try ``confluent``, +see `confluent `_. + +For systemd based systems, ``goconserver`` is used by default. If you are +having problems seeing the console, try the following. + + #. Make sure ``goconserver`` is configured by running ``makegocons``. + + #. Check if ``goconserver`` is up and running :: + + systemctl status goconserver.service + + #. If ``goconserver`` is not running, start the service using: :: + + systemctl start goconserver.service + + #. Try ``makegocons -q []`` to verify if the node has been registered. + + #. Invoke the console again: ``rcons `` + +More details for goconserver, see `goconserver documentation `_. + +**[Deprecated]** If ``conserver`` is used, try the following. #. Make sure ``conserver`` is configured by running ``makeconservercf``. @@ -42,12 +72,4 @@ The xCAT ``rcons`` command relies on conserver (http://www.conserver.com/). The [sysvinit] service conserver start [systemd] systemctl start conserver.service - #. After this, try invoking the console again: ``rcons `` - - -OpenBMC Specific -```````````````` - - #. For OpenBMC managed servers, the root user must be able to ssh passwordless to the BMC for the ``rcons`` function to work. - - Copy the ``/root/.ssh/id_rsa.pub`` public key to the BMC's ``~/.ssh/authorized_keys`` file. + #. Invoke the console again: ``rcons `` From 5efb6e70caf650e8490106d8b47753e94a417c18 Mon Sep 17 00:00:00 2001 From: chenglch Date: Fri, 9 Mar 2018 14:48:09 +0800 Subject: [PATCH 12/21] Use makegocons instead of makeconservercf during discovery and provision --- .../compute_node/changing_hostname_ip.rst | 8 ++++---- .../mgmt_node/changing_hostname_ip.rst | 8 ++++---- .../admin-guides/manage_clusters/common/kvm/manage_vm.rst | 2 +- .../ppc64le/discovery/mtms/discovery_using_defined.rst | 2 +- .../ppc64le/discovery/mtms/discovery_using_dhcp.rst | 4 ++-- .../manage_clusters/ppc64le/discovery/pbmc_discovery.rst | 2 +- .../ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst | 2 +- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst index 10b7a69c1..7dac634fd 100644 --- a/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst +++ b/docs/source/advanced/cluster_maintenance/compute_node/changing_hostname_ip.rst @@ -18,9 +18,9 @@ Remove Old Provision Environment makedhcp -d -#. Remove the nodes from the conserver configuration :: +#. Remove the nodes from the goconserver configuration :: - makeconservercf -d + makegocons -d Change Definition ----------------- @@ -76,6 +76,6 @@ Update The Provision Environment makedhcp -a -#. Configure the new names in conserver :: +#. Configure the new names in goconserver :: - makeconservercf + makegocons diff --git a/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst b/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst index 72282f3fb..5dbccfa64 100644 --- a/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst +++ b/docs/source/advanced/cluster_maintenance/mgmt_node/changing_hostname_ip.rst @@ -190,9 +190,9 @@ Then update the following in xCAT: "1.4","new_MN_name",,,,,,"trusted",,`` -* Setup up conserver with new credentials :: +* Setup up goconserver with new credentials :: - makeconservercf + makegocons External DNS Server Changed --------------------------- @@ -262,9 +262,9 @@ If it exists, then use the return name and do the following: makedhcp -a - - Add the MN to conserver :: + - Add the MN to goconserver :: - makeconservercf + makegocons Update the genesis packages --------------------------- 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 849f080f3..16d6012d9 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 @@ -161,7 +161,7 @@ When the VM has been created and powered on, choose one of the following methods * Use **rcons/wcons** on xCAT management node to open text console: :: chdef vm1 cons=kvm - makeconservercf vm1 + makegocons vm1 rcons vm1 * Connect to virtual machine through vnc console 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 9ea41fc17..1eb2d3d68 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 @@ -126,7 +126,7 @@ The BMC IP address is obtained by the open range dhcp server and the plan in thi Configure the conserver for the **discovered** node to watch the discovery process using ``rcons``:: - makeconservercf node-8247-22l-10112ca + makegocons node-8247-22l-10112ca In another terminal window, open the remote console: :: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst index 5b22af650..b5e083ef7 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/mtms/discovery_using_dhcp.rst @@ -99,9 +99,9 @@ The BMC IP address is obtained by the open range dhcp server and the plan is to #. **[Optional]** Monitor the node discovery process using rcons - Configure the conserver for the **predefined** node to watch the discovery process using ``rcons``:: + Configure the goconserver for the **predefined** node to watch the discovery process using ``rcons``:: - makeconservercf cn01 + makegocons cn01 In another terminal window, open the remote console: :: diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst index d2ad59575..d6c02db08 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery.rst @@ -34,5 +34,5 @@ To start discovery process, just need to power on the PBMC node remotely with th **[Optional]** If you'd like to monitor the discovery process, you can use:: chdef Server-8247-22L-SN10112CA cons=ipmi - makeconservercf + makegocons rcons Server-8247-22L-SN10112CA diff --git a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst index 3b3245171..bea12d592 100644 --- a/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst +++ b/docs/source/guides/admin-guides/manage_clusters/ppc64le/discovery/pbmc_discovery_with_bmcdiscover.rst @@ -25,5 +25,5 @@ To start discovery process, just need to power on the PBMC node remotely with th **[Optional]** If you'd like to monitor the discovery process, you can use:: - makeconservercf node-8247-42l-10112ca + makegocons node-8247-42l-10112ca rcons node-8247-42l-10112ca From 6d3d340849de5bef75ee6b41753ed86d9cbe754d Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Fri, 9 Mar 2018 14:56:22 +0800 Subject: [PATCH 13/21] check if agent exists in process_request and give more clear message. --- xCAT-server/lib/perl/xCAT/OPENBMC.pm | 11 +++++++---- xCAT-server/lib/xcat/plugins/openbmc2.pm | 4 ++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/perl/xCAT/OPENBMC.pm b/xCAT-server/lib/perl/xCAT/OPENBMC.pm index 7e530c24f..2cecf635f 100644 --- a/xCAT-server/lib/perl/xCAT/OPENBMC.pm +++ b/xCAT-server/lib/perl/xCAT/OPENBMC.pm @@ -69,11 +69,14 @@ sub acquire_lock { flock($lock_fd, LOCK_EX) or return undef; return $lock_fd; } -sub start_python_agent { - if (! -e $PYTHON_AGENT_FILE) { - xCAT::MsgUtils->message("S", "start_python_agent() Error: '$PYTHON_AGENT_FILE' does not exist"); - return undef; + +sub exists_python_agent { + if ( -e $PYTHON_AGENT_FILE) { + return 1; } + return 0; +} +sub start_python_agent { if (!defined(acquire_lock())) { xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to acquire lock"); diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index e5b038531..1a3cac6e6 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -117,6 +117,10 @@ sub process_request { my $request = shift; $callback = shift; + if (!xCAT::OPENBMC::exists_python_agent()) { + xCAT::MsgUtils->message("E", { data => ["The xCAT Python agent does not exist. Check if xCAT-openbmc-py package is installed on management node and service nodes."] }, $callback); + return; + } # If we can't start the python agent, exit immediately my $pid = xCAT::OPENBMC::start_python_agent(); if (!defined($pid)) { From fcd98653433e3953e0db71ea5f80465b65065339 Mon Sep 17 00:00:00 2001 From: immarvin Date: Fri, 9 Mar 2018 04:32:21 -0500 Subject: [PATCH 14/21] add usercase for xcat-inventory --- docs/source/advanced/index.rst | 1 + .../xcat-inventory/define_create_cluster.rst | 28 +++++++++++ docs/source/advanced/xcat-inventory/index.rst | 21 ++++++++ .../version_control_inventory.rst | 50 +++++++++++++++++++ 4 files changed, 100 insertions(+) create mode 100644 docs/source/advanced/xcat-inventory/define_create_cluster.rst create mode 100644 docs/source/advanced/xcat-inventory/index.rst create mode 100644 docs/source/advanced/xcat-inventory/version_control_inventory.rst diff --git a/docs/source/advanced/index.rst b/docs/source/advanced/index.rst index 820e899d8..a951d2b77 100755 --- a/docs/source/advanced/index.rst +++ b/docs/source/advanced/index.rst @@ -25,3 +25,4 @@ Advanced Topics softlayer/index.rst sysclone/index.rst zones/index.rst + xcat-inventory/index.rst diff --git a/docs/source/advanced/xcat-inventory/define_create_cluster.rst b/docs/source/advanced/xcat-inventory/define_create_cluster.rst new file mode 100644 index 000000000..9a2dce023 --- /dev/null +++ b/docs/source/advanced/xcat-inventory/define_create_cluster.rst @@ -0,0 +1,28 @@ +Define and create your first xCAT cluster easily +================================================ + +The inventory templates for 2 kinds of typical xCAT cluster is shipped. You can create your first xCAT cluster easily by making several modifications on the template. The templates can be found under ``/opt/xcat/share/xcat/inventory_templates`` on management node with ``xcat-inventory`` installed. + +Currently, the inventory templates includes: + +1. flat_cluster_template.yaml: + + a flat baremetal cluster, including **openbmc controlled PowerLE servers**, **IPMI controlled Power servers(commented out)**, **X86_64 servers(commented out)** + +2. flat_kvm_cluster_template.yaml: a flat KVM based Virtual Machine cluster, including **PowerKVM based VM nodes**, **KVM based X86_64 VM nodes(commented out)** + +The steps to create your first xCAT cluster is: + +1. create a customized cluster inventory file "mycluster.yaml" based on ``flat_cluster_template.yaml`` :: + + cp /opt/xcat/share/xcat/inventory_templates/flat_cluster_template.yaml /git/cluster/mycluster.yaml + +2. custmize the cluster inventory file "mycluster.yaml" by modifying the attributs in the line under token ``#CHANGEME`` according to the setup of your phisical cluster. You can create new node definition by duplicating and modifying the node definition in the template. + +3. import the cluster inventory file :: + + xcat-inventory import -f /git/cluster/mycluster.yaml + +Now you have your 1st xCAT cluster, you can start bring up the cluster by provision nodes. + + diff --git a/docs/source/advanced/xcat-inventory/index.rst b/docs/source/advanced/xcat-inventory/index.rst new file mode 100644 index 000000000..5c7c4829b --- /dev/null +++ b/docs/source/advanced/xcat-inventory/index.rst @@ -0,0 +1,21 @@ +xcat-inventory +============== + +`xcat-inventory `_ is an inventory tool for the cluster managed by xCAT. Its features includes: + +* a object based view of the cluster inventory, which is flexible, extensible and well formatted + +* interfaces to export/import the cluster inventory data in yaml/json format, which can be then managed under source control + +* inventory templates for typical clusters, which help user to defines a cluster easily + +* ability to intergrate with Ansible(Comming Soon) + + +This section presents 2 typical user case of ``xcat-inventory`` + +.. toctree:: + :maxdepth: 2 + + version_control_inventory.rst + define_create_cluster.rst diff --git a/docs/source/advanced/xcat-inventory/version_control_inventory.rst b/docs/source/advanced/xcat-inventory/version_control_inventory.rst new file mode 100644 index 000000000..adc311e01 --- /dev/null +++ b/docs/source/advanced/xcat-inventory/version_control_inventory.rst @@ -0,0 +1,50 @@ +Manage the xCAT Cluster Definition under Source Control +======================================================= + +The xCAT cluster inventory data, including global configuration and object definitions(node/osimage/passwd/policy/network/router), and the relationship of the objects, can be exported to a YAML/JSON file(**inventory file**) from xCAT Database, or be imported to xCAT Database from the inventory file. + +By managing the inventory file under source control system, you can manage the xCAT cluster definition under source control. This section presents a typical step-by-step scenario on how to manage cluster inventory data under ``git``. + + +1. create a directory ``/git/cluster`` under git directory to hold the cluster inventory :: + + mkdir -p /git/cluster + cd /git/cluster + git init + +2. export the current cluster configuration to a inventory file "mycluster.yaml" under the git directory created above :: + + xcat-inventory export --format=yaml >/git/cluster/mycluster.yaml + +3. check diff and commit the cluster inventory file(commit no: c95673) :: + + cd /git/cluster + git diff + git add /git/cluster/mycluster.yaml + git commit /git/cluster/mycluster.yaml -m "$(date "+%Y_%m_%d_%H_%M_%S"): initial cluster inventory data; blah-blah" + +4. ordinary cluster maintenance and operation: replaced bad nodes, turn on xcatdebugmode... + +5. cluster setup is stable now, export and commit the cluster configuration(commit no: c95673) :: + + xcat-inventory export --format=yaml >/git/cluster/mycluster.yaml + cd /git/cluster + git diff + git add xcat-inventory export --format=yaml >/git/cluster/mycluster.yaml + git commit /git/cluster/mycluster.yaml -m "$(date "+%Y_%m_%d_%H_%M_%S"): replaced bad nodes; turn on xcatdebugmode; blah-blah" + +6. ordinary cluster maintenance and operation, some issues are founded in current cluster, need to restore the current cluster configuration to commit no c95673 [1]_ :: + + cd /git/cluster + git checkout c95673 + xcat-inventory import -f /git/cluster/mycluster.yaml + +*Notice:* + +1. The cluster inventory data exported by ``xcat-inventory`` does not include intermidiate data, transiate data and historical data in xCAT DataBase, such as node status, auditlog table + +2. We suggest you backup your xCAT database by ``dumpxCATdb`` before your trial on this feature, although we have run sufficient test on this + +.. [1] When you import the inventory data to xCAT Database in step 6, there are 2 modes: ``clean mode`` and ``update mode``. If you choose the ``clean mode`` by ``xcat-inventory import -c|--clean``, all the objects definitions that are not included in the inventory file will be removed; Otherwise, only the objects included in the inventory file will be updated or inserted. Please choose the proper mode according to your need + + From feaa1532ecc1d50d4a530bbbe1c6c808465b85ea Mon Sep 17 00:00:00 2001 From: xuweibj Date: Fri, 9 Mar 2018 18:30:46 +0800 Subject: [PATCH 15/21] Not start agent when no valid nodes (#4915) --- xCAT-server/lib/xcat/plugins/openbmc2.pm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/openbmc2.pm b/xCAT-server/lib/xcat/plugins/openbmc2.pm index 1a3cac6e6..f4c750777 100644 --- a/xCAT-server/lib/xcat/plugins/openbmc2.pm +++ b/xCAT-server/lib/xcat/plugins/openbmc2.pm @@ -121,12 +121,6 @@ sub process_request { xCAT::MsgUtils->message("E", { data => ["The xCAT Python agent does not exist. Check if xCAT-openbmc-py package is installed on management node and service nodes."] }, $callback); return; } - # If we can't start the python agent, exit immediately - my $pid = xCAT::OPENBMC::start_python_agent(); - if (!defined($pid)) { - xCAT::MsgUtils->message("E", { data => ["Failed to start the xCAT Python agent. Check /var/log/xcat/cluster.log for more information."] }, $callback); - return; - } my $noderange = $request->{node}; my $check = parse_node_info($noderange); @@ -137,6 +131,13 @@ sub process_request { $callback->({ errorcode => [$check] }) if ($check); return unless(%node_info); + # If we can't start the python agent, exit immediately + my $pid = xCAT::OPENBMC::start_python_agent(); + if (!defined($pid)) { + xCAT::MsgUtils->message("E", { data => ["Failed to start the xCAT Python agent. Check /var/log/xcat/cluster.log for more information."] }, $callback); + return; + } + xCAT::OPENBMC::submit_agent_request($pid, $request, \%node_info, $callback); xCAT::OPENBMC::wait_agent($pid, $callback); } From 3e8387a5c28cf6fd61f1ef86b784169a1e67fd44 Mon Sep 17 00:00:00 2001 From: Victor Hu Date: Fri, 9 Mar 2018 16:17:58 -0500 Subject: [PATCH 16/21] Add performance graph for Python/Perl comparism, for rpower <> state --- .../scalability/python/images/rpower_state.png | Bin 0 -> 25711 bytes .../scalability/python/performance.rst | 9 ++++++++- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 docs/source/references/coral/cluster_mgmt/scalability/python/images/rpower_state.png diff --git a/docs/source/references/coral/cluster_mgmt/scalability/python/images/rpower_state.png b/docs/source/references/coral/cluster_mgmt/scalability/python/images/rpower_state.png new file mode 100644 index 0000000000000000000000000000000000000000..136840281a1dca18056f2476e82db11b4e5b96bb GIT binary patch literal 25711 zcmdSB^+S};_dbl2q@YMhODaf7NrNCE-LaH(cSyUUf+8*5wMed#(jY3*4bn)%Qqt_g z^1V@!eZ4==Kk)p5vU|_WnKLJ@bLP5vt)?PJh)0QshK5F{ATOhVhK7NShISlF${6(#eI?}HbLf92+SIz>zl0F89+-6UuG1ryM7x6d_Xm9* zmIGw}>({S$!zJghUw$EP3GV24oR@ze%~9_1X*BRNH1L%z%!|?I-fac%YQyV$C$=InStIE^Ar2^EezCU=(%Ub{w;C7*xUb| z6>{U(f0tow=Etrl0yYZ1dHuaXondL7{i1U8!GO~FykIacF$Fo%CL(}veE+~>RG;2|$4<~Fb%F0-U*l-krI%j=T#+L-mj6O~ro@qrmX z4wmK)uRgp2vZ~6xH|DEIO@#3Gs|eg+@nHxxjR;iBN?;S;^d{!(+xyilLvy}x3t1?l zi70r=bVnKutVO(Sx3M#^CpYsb+08#ieE;U^bbe44SGNGd&}e<4FkG8ZV^eFYac?gcy;cnsYe$fsqG%&rlHHGaj9gSzbB9rZx02K+1;%c|@x9SEBc9neZ> ztovS6sfe-P*jKHdQpB`qoLhJ1`r2xtsLi+6Wjwc*#&@pqYUP+#n~*ZOrLLk-Ir>XD zw$A9fclyA5k%?xeWlgf*u9!i+OQFU1h~jCzHr3v?bdklUIM}=LmYj9iruH!rL{V%c zO984=+{a7G&Nu3rU^tVWcVdh*(02A!IfOn{fZzy`uQVAog3eB2eD-6U+#7PUw0yBl@nzwub$EoV zyq!}FrTEnQlAO}f2JZwrJLxzb4uqi3!XSKy+1C|RQp#Ru(z)qXkm*}adpyRwvlJe$ zl~?UOtZ%vg)H-$_-jD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CRA)k)T}aVML#141zzi9MgGmbo!KywOwGgu|W!nw_xX z1-aI@dC&iQ@PWC!Y{}bSna)0i?&Y^>Yu@vZ7>&j|Eu8F{`|G%Vae^!4XdeDO?~=Uu zNy8>rK+aVzqnpmg=GeoqQ9f)|F>s(!Sa6C2fXAC5TT}wTxQ=Mam3h*$JqE|>vrr@N z^~Jgu94C-D;J8&ATcwTRD^uEC|BcV56><*|dkwBgE zZA*pb)LD_izEwdHpozmr0+=;AS)=+81wSj%$+OxhrUgh}_|&vIC-6i&mEw%q7OPDd^5m$<7rMIqu@rsIEVMRe5B=^AFT*vjP!g~tez-F z(?+#CGJxQPvZh_a){QW1_0&`GIer*gXQiOH4&v_;51`>ZrgTBj9S=HEkWkx4yTvN= z{q+|S?fE|fw%uwY^G;R6Wi#jw0UAm(YYLk7{rV8%?*FL|; z{`*WNpRtmh9Z_R|VW3y3!VQvy$s20Cm@~kpqTOKT~hyc2UOeAjk;VXR(uxDZICo6ymy?-X^6 zJX~t(nq+^BtCh{awe>;C5UG#syK7klp%S+F$j(n~ zWaWiAulNfesliQj;}3+$8Y;@1ydK$7hf6ui3Lqj zhRtt*|DZBg9-f-Z*~h@-BBP;8_)H1$3jTjabB@9Ecnr>>ggN|&(R0NhrHWAKZ#X;` z9Y27WEIf5=#Sa7Li;PsrZwtRe4whY%F;*W>9V=0vFL063OFTFaF+cy0jImeno6K;i zQRPKOH26)1{kd}QMHwIKo state +```````````````````````` + +This chart gathers data points on a single 18-node frame, up to 4 frames (72-nodes). + +.. image:: images/rpower_state.png From 1d7e0a0042536d8de7ad5eb554789398b5874860 Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Mon, 12 Mar 2018 14:47:04 +0800 Subject: [PATCH 17/21] Support mutiple commands in the same time - Using PID tailing name to avoid the lock --- xCAT-openbmc-py/lib/python/agent/agent.py | 8 +++++- .../lib/python/agent/xcatagent/server.py | 9 +++--- xCAT-server/lib/perl/xCAT/OPENBMC.pm | 28 +++++++++++++------ 3 files changed, 31 insertions(+), 14 deletions(-) diff --git a/xCAT-openbmc-py/lib/python/agent/agent.py b/xCAT-openbmc-py/lib/python/agent/agent.py index b7a1827bc..6afdefea8 100755 --- a/xCAT-openbmc-py/lib/python/agent/agent.py +++ b/xCAT-openbmc-py/lib/python/agent/agent.py @@ -26,6 +26,11 @@ class AgentShell(object): "with the client", default='/var/run/xcat/agent.sock', type=str) + parser.add_argument('--lockfile', + help="The lock file to communicate " + "with the xcat", + default='/var/lock/xcat/agent.lock', + type=str) return parser def do_help(self, args): @@ -38,7 +43,8 @@ class AgentShell(object): if options.help: self.do_help(options) return 0 - s = server.Server(options.sock, options.standalone) + + s = server.Server(options.sock, options.standalone, options.lockfile) s.start() class HelpFormatter(argparse.HelpFormatter): diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py index ac55601a1..56b234f2b 100644 --- a/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py @@ -14,7 +14,7 @@ from xcatagent import base as xcat_manager MSG_TYPE = 'message' DB_TYPE = 'db' -LOCK_FILE = '/var/lock/xcat/agent.lock' +#LOCK_FILE = '/var/lock/xcat/agent.lock' class XCATMessager(utils.Messager): @@ -50,7 +50,7 @@ class XCATMessager(utils.Messager): class Server(object): - def __init__(self, address, standalone): + def __init__(self, address, standalone=True, lockfile=None): try: os.unlink(address) except OSError: @@ -58,6 +58,7 @@ class Server(object): raise self.address = address self.standalone = standalone + self.lockfile = lockfile self.server = StreamServer(self._serve(), self._handle) def _serve(self): @@ -117,7 +118,7 @@ class Server(object): def keep_peer_alive(self): def acquire(): - fd = open(LOCK_FILE, "r+") + fd = open(self.lockfile, "r+") fcntl.flock(fd.fileno(), fcntl.LOCK_EX) # if reach here, parent process may exit print("xcat process exit unexpectedly.", file=sys.stderr) @@ -128,6 +129,6 @@ class Server(object): t.start() def start(self): - if not self.standalone: + if not self.standalone and self.lockfile: self.keep_peer_alive() self.server.serve_forever() diff --git a/xCAT-server/lib/perl/xCAT/OPENBMC.pm b/xCAT-server/lib/perl/xCAT/OPENBMC.pm index 2cecf635f..c21fd1f8c 100644 --- a/xCAT-server/lib/perl/xCAT/OPENBMC.pm +++ b/xCAT-server/lib/perl/xCAT/OPENBMC.pm @@ -64,10 +64,10 @@ sub send_request { sub acquire_lock { mkpath($LOCK_DIR); # always create a new lock file - unlink($LOCK_PATH); - open($lock_fd, ">>", $LOCK_PATH) or return undef; + unlink($LOCK_PATH . $$); + open($lock_fd, ">>", $LOCK_PATH . $$) or return undef; flock($lock_fd, LOCK_EX) or return undef; - return $lock_fd; + return $LOCK_PATH . $$; } sub exists_python_agent { @@ -78,30 +78,38 @@ sub exists_python_agent { } sub start_python_agent { - if (!defined(acquire_lock())) { + my $lockfile = acquire_lock(); + if (!defined($lockfile)) { xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to acquire lock"); return undef; } + my $fd; - open($fd, '>', $AGENT_SOCK_PATH) && close($fd); my $pid = fork; if (!defined $pid) { xCAT::MsgUtils->message("S", "start_python_agent() Error: Unable to fork process"); return undef; + } elsif ($pid){ + + open($fd, '>', $AGENT_SOCK_PATH . $pid) && close($fd); + return $pid; } + $SIG{CHLD} = 'DEFAULT'; if (!$pid) { + # child open($fd, ">>", $PYTHON_LOG_PATH) && close($fd); open(STDOUT, '>>', $PYTHON_LOG_PATH) or die("open: $!"); open(STDERR, '>>&', \*STDOUT) or die("open: $!"); - my $ret = exec ($PYTHON_AGENT_FILE); + my @args = ( "$PYTHON_AGENT_FILE --sock $AGENT_SOCK_PATH$$ --lockfile $lockfile" ); + my $ret = exec @args; if (!defined($ret)) { xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to start the xCAT Python agent."); exit(1); } } - return $pid; + } sub handle_message { @@ -131,7 +139,7 @@ sub submit_agent_request { my $sock; my $retry = 0; while($retry < 30) { - $sock = IO::Socket::UNIX->new(Peer => $AGENT_SOCK_PATH, Type => SOCK_STREAM, Timeout => 10, Blocking => 1); + $sock = IO::Socket::UNIX->new(Peer => $AGENT_SOCK_PATH . $pid, Type => SOCK_STREAM, Timeout => 10, Blocking => 1); if (!defined($sock)) { sleep(0.1); } else { @@ -140,7 +148,7 @@ sub submit_agent_request { $retry++; } if (!defined($sock)) { - xCAT::MsgUtils->message("E", { data => ["OpenBMC management is using a Python framework. An error has occurred when trying to create socket $AGENT_SOCK_PATH."] }, $callback); + xCAT::MsgUtils->message("E", { data => ["OpenBMC management is using a Python framework. An error has occurred when trying to create socket $AGENT_SOCK_PATH$pid."] }, $callback); kill('TERM', $pid); return; } @@ -201,6 +209,8 @@ sub wait_agent { xCAT::MsgUtils->message("E", { data => ["Agent exited unexpectedly. See $PYTHON_LOG_PATH for details."] }, $callback); xCAT::MsgUtils->message("I", { data => ["To revert to Perl framework: chdef -t site clustersite openbmcperl=ALL"] }, $callback); } + unlink($AGENT_SOCK_PATH . $pid); + unlink($LOCK_PATH . $$); } #-------------------------------------------------------------------------------- From 4ad99269fe797fff13bb32bbb4e00466f3cee628 Mon Sep 17 00:00:00 2001 From: yangsong Date: Mon, 12 Mar 2018 17:40:39 +0800 Subject: [PATCH 18/21] fix issue: genimage tries direct DB access instead of via xCATd #4385 (#4924) --- xCAT-client/bin/genimage | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/xCAT-client/bin/genimage b/xCAT-client/bin/genimage index 1030b7ae0..ec65eb7c9 100755 --- a/xCAT-client/bin/genimage +++ b/xCAT-client/bin/genimage @@ -116,7 +116,7 @@ if (@ARGV > 0) { } if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) { - my $tmpimgs = `lsdef -t osimage -w provmethod=~'/statelite|netboot/' |cut -d' ' -f1`; + my $tmpimgs = `XCATXMLTRACE=0 XCATBYPASS=0 lsdef -t osimage -w provmethod=~'/statelite|netboot/' |cut -d' ' -f1`; if ($? == 0) { if (($tmpimgs) && ($tmpimgs !~ /^Could/)) { #Could is returned when the osimage table is empty my @images = split('\n', $tmpimgs); @@ -162,8 +162,7 @@ if ((!$imagename) && (!$profile) && (!$os) && (!$arch)) { # get the install directory -my @entries = xCAT::TableUtils->get_site_attribute("installdir"); -my $installdir = $entries[0]; +my $installdir = `XCATXMLTRACE=0 XCATBYPASS=0 lsdef -t site -o clustersite -i installdir|grep -w 'installdir'|cut -d= -f2`; chomp($installdir); # lots of error checking to make sure it exists. From f36e659715e9ae031407db379ba91a24b88c3909 Mon Sep 17 00:00:00 2001 From: bybai Date: Mon, 12 Mar 2018 23:10:24 -0400 Subject: [PATCH 19/21] enhance mlnxofed_ib_install.v2 return 1 when service openibd restart failed --- .../share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 index dc4df9918..cc1970044 100755 --- a/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 +++ b/xCAT-server/share/xcat/ib/scripts/Mellanox/mlnxofed_ib_install.v2 @@ -328,6 +328,10 @@ EOF #force openibd load all modules in need, restart again sleep 1 service openibd restart + if [ "$?" != "0" ] ;then + echo "[Error] service openibd restart failed." + exit 1 + fi fi if [[ "$NODESETSTATE" == "genimage" ]]; then From 06a3db57c8ed1261d90e04f7928b1af38b90f5cf Mon Sep 17 00:00:00 2001 From: yangsong Date: Tue, 13 Mar 2018 14:27:45 +0800 Subject: [PATCH 20/21] add template for openbmc controlled Power LE server (#4928) --- .../{ppc64le.stanza => ppc64le-ipmi.stanza} | 4 ++-- .../objects/node/ppc64le-openbmc.stanza | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) rename xCAT/templates/objects/node/{ppc64le.stanza => ppc64le-ipmi.stanza} (74%) create mode 100644 xCAT/templates/objects/node/ppc64le-openbmc.stanza diff --git a/xCAT/templates/objects/node/ppc64le.stanza b/xCAT/templates/objects/node/ppc64le-ipmi.stanza similarity index 74% rename from xCAT/templates/objects/node/ppc64le.stanza rename to xCAT/templates/objects/node/ppc64le-ipmi.stanza index f0a72bf23..3b134926d 100644 --- a/xCAT/templates/objects/node/ppc64le.stanza +++ b/xCAT/templates/objects/node/ppc64le-ipmi.stanza @@ -1,4 +1,4 @@ -# +# ppc64le-template: objtype=node @@ -15,4 +15,4 @@ ppc64le-template: nodetype=mp serialport=0 serialspeed=115200 - usercomment="the template for PowerLE NV node definition" + usercomment="the template for ipmi controlled PowerLE NV node definition" diff --git a/xCAT/templates/objects/node/ppc64le-openbmc.stanza b/xCAT/templates/objects/node/ppc64le-openbmc.stanza new file mode 100644 index 000000000..43af130a9 --- /dev/null +++ b/xCAT/templates/objects/node/ppc64le-openbmc.stanza @@ -0,0 +1,18 @@ +# + +ppc64le-openbmc-template: + objtype=node + arch=ppc64le + bmc="MANDATORY:The hostname or ip address of the BMC adapater" + bmcpassword="MANDATORY:the password of the BMC" + bmcusername="MANDATORY:the username of the BMC" + cons=openbmc + groups=all + ip=OPTIONAL:the ip address of the node + mac=OPTIONAL:the mac of the node + mgt=openbmc + netboot=petitboot + nodetype=mp + serialport=0 + serialspeed=115200 + usercomment="the template for openbmc controlled PowerLE NV node definition" From 387055a3be33da5b005c50b8ead4e1366269f93c Mon Sep 17 00:00:00 2001 From: Bin Xu Date: Tue, 13 Mar 2018 16:56:55 +0800 Subject: [PATCH 21/21] to address the review comments: - using signal to handle the cleanup --- .../lib/python/agent/xcatagent/server.py | 2 +- xCAT-server/lib/perl/xCAT/OPENBMC.pm | 30 ++++++++++--------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py b/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py index 56b234f2b..30f9d0f4d 100644 --- a/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py +++ b/xCAT-openbmc-py/lib/python/agent/xcatagent/server.py @@ -129,6 +129,6 @@ class Server(object): t.start() def start(self): - if not self.standalone and self.lockfile: + if not self.standalone: self.keep_peer_alive() self.server.serve_forever() diff --git a/xCAT-server/lib/perl/xCAT/OPENBMC.pm b/xCAT-server/lib/perl/xCAT/OPENBMC.pm index c21fd1f8c..bc583ee87 100644 --- a/xCAT-server/lib/perl/xCAT/OPENBMC.pm +++ b/xCAT-server/lib/perl/xCAT/OPENBMC.pm @@ -25,8 +25,8 @@ use xCAT_monitoring::monitorctrl; use xCAT::TableUtils; my $LOCK_DIR = "/var/lock/xcat/"; -my $LOCK_PATH = "/var/lock/xcat/agent.lock"; -my $AGENT_SOCK_PATH = "/var/run/xcat/agent.sock"; +my $LOCK_PATH = "/var/lock/xcat/agent-$$.lock"; +my $AGENT_SOCK_PATH = "/var/run/xcat/agent-$$.sock"; my $PYTHON_LOG_PATH = "/var/log/xcat/agent.log"; my $PYTHON_AGENT_FILE = "/opt/xcat/lib/python/agent/agent.py"; my $MSG_TYPE = "message"; @@ -64,10 +64,10 @@ sub send_request { sub acquire_lock { mkpath($LOCK_DIR); # always create a new lock file - unlink($LOCK_PATH . $$); - open($lock_fd, ">>", $LOCK_PATH . $$) or return undef; + unlink($LOCK_PATH); + open($lock_fd, ">>", $LOCK_PATH) or return undef; flock($lock_fd, LOCK_EX) or return undef; - return $LOCK_PATH . $$; + return $lock_fd; } sub exists_python_agent { @@ -76,10 +76,13 @@ sub exists_python_agent { } return 0; } +sub python_agent_reaper { + unlink($LOCK_PATH); + unlink($AGENT_SOCK_PATH); +} sub start_python_agent { - my $lockfile = acquire_lock(); - if (!defined($lockfile)) { + if (!defined(acquire_lock())) { xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to acquire lock"); return undef; } @@ -91,18 +94,18 @@ sub start_python_agent { return undef; } elsif ($pid){ - open($fd, '>', $AGENT_SOCK_PATH . $pid) && close($fd); + open($fd, '>', $AGENT_SOCK_PATH) && close($fd); + $SIG{INT} = $SIG{TERM} = \&python_agent_reaper; return $pid; } $SIG{CHLD} = 'DEFAULT'; if (!$pid) { - # child open($fd, ">>", $PYTHON_LOG_PATH) && close($fd); open(STDOUT, '>>', $PYTHON_LOG_PATH) or die("open: $!"); open(STDERR, '>>&', \*STDOUT) or die("open: $!"); - my @args = ( "$PYTHON_AGENT_FILE --sock $AGENT_SOCK_PATH$$ --lockfile $lockfile" ); + my @args = ( "$PYTHON_AGENT_FILE --sock $AGENT_SOCK_PATH --lockfile $LOCK_PATH" ); my $ret = exec @args; if (!defined($ret)) { xCAT::MsgUtils->message("S", "start_python_agent() Error: Failed to start the xCAT Python agent."); @@ -139,7 +142,7 @@ sub submit_agent_request { my $sock; my $retry = 0; while($retry < 30) { - $sock = IO::Socket::UNIX->new(Peer => $AGENT_SOCK_PATH . $pid, Type => SOCK_STREAM, Timeout => 10, Blocking => 1); + $sock = IO::Socket::UNIX->new(Peer => $AGENT_SOCK_PATH, Type => SOCK_STREAM, Timeout => 10, Blocking => 1); if (!defined($sock)) { sleep(0.1); } else { @@ -148,7 +151,7 @@ sub submit_agent_request { $retry++; } if (!defined($sock)) { - xCAT::MsgUtils->message("E", { data => ["OpenBMC management is using a Python framework. An error has occurred when trying to create socket $AGENT_SOCK_PATH$pid."] }, $callback); + xCAT::MsgUtils->message("E", { data => ["OpenBMC management is using a Python framework. An error has occurred when trying to create socket $AGENT_SOCK_PATH."] }, $callback); kill('TERM', $pid); return; } @@ -209,8 +212,7 @@ sub wait_agent { xCAT::MsgUtils->message("E", { data => ["Agent exited unexpectedly. See $PYTHON_LOG_PATH for details."] }, $callback); xCAT::MsgUtils->message("I", { data => ["To revert to Perl framework: chdef -t site clustersite openbmcperl=ALL"] }, $callback); } - unlink($AGENT_SOCK_PATH . $pid); - unlink($LOCK_PATH . $$); + python_agent_reaper(); } #--------------------------------------------------------------------------------