mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
Merge branch '2.13' into master
This commit is contained in:
commit
4d2e51a61e
@ -4,4 +4,5 @@ Questions & Answers
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
makehosts.rst
|
||||
|
||||
makehosts.rst
|
132
docs/source/QA/makehosts_qa.rst
Normal file
132
docs/source/QA/makehosts_qa.rst
Normal file
@ -0,0 +1,132 @@
|
||||
DNS,hostname and alias Q/A list
|
||||
-------------------------------
|
||||
|
||||
Q: When there are multiple NICs, how to generate ``/etc/hosts`` records?
|
||||
````````````````````````````````````````````````````````````````````````
|
||||
|
||||
When there are multiple NICs, and you want to use ``confignetwork`` to configure these NICs, suggest to use ``hosts`` table to configure installnic and use ``nics`` table to configure secondary NICs. You can refer to the following best practice example to generate ``/etc/hosts`` records.
|
||||
|
||||
**Best practice example**:
|
||||
|
||||
* There are 2 networks in different domains: ``mgtnetwork`` and ``pubnetwork``
|
||||
* ``mgtnetwork`` is xCAT management network
|
||||
* There are 2 adapters in system node1: ``eth0`` and ``eth1``
|
||||
* Add installnic ``eth0`` ``10.5.106.101`` record in ``/etc/hosts``, its alias is ``mgtnic``
|
||||
* hostnames ``node1-pub`` and ``node1.public.com`` are for nic ``eth1``, ip is ``192.168.30.101``
|
||||
|
||||
**Steps**:
|
||||
|
||||
#. Add networks entry in ``networks`` table: ::
|
||||
|
||||
chdef -t network mgtnetwork net=10.0.0.0 mask=255.0.0.0 domain=cluster.com
|
||||
chdef -t network pubnetwork net=192.168.30.0 mask=255.255.255.0 domain=public.com
|
||||
|
||||
#. Create ``node1`` with installnic ip ``10.5.106.101``, its alias is ``mgtnic``: ::
|
||||
|
||||
chdef node1 ip=10.5.106.101 hostnames=mgtnic groups=all
|
||||
|
||||
#. Configure ``eth1`` in ``nics`` table: ::
|
||||
|
||||
chdef node1 nicips.eth1=192.168.30.101 nichostnamesuffixes.eth1=-pub nicaliases.eth1=node1.public.com nictypes.eth1=Ethernet nicnetworks.eth1=pubnetwork
|
||||
|
||||
#. Check ``node1`` definition: ::
|
||||
|
||||
lsdef node1
|
||||
Object name: node1
|
||||
groups=all
|
||||
ip=10.5.106.101
|
||||
hostnames=mgtnic
|
||||
nicaliases.eth1=node1.public.com
|
||||
nichostnamesuffixes.eth1=-pub
|
||||
nicips.eth1=192.168.30.101
|
||||
nicnetworks.eth1=pubnetwork
|
||||
nictypes.eth1=Ethernet
|
||||
postbootscripts=otherpkgs
|
||||
postscripts=syslog,remoteshell,syncfiles
|
||||
|
||||
#. Execute ``makehosts -n`` to generate ``/etc/hosts`` records: ::
|
||||
|
||||
makehosts -n
|
||||
|
||||
#. Check results in ``/etc/hosts``: ::
|
||||
|
||||
10.5.106.101 node1 node1.cluster.com mgtnic
|
||||
192.168.30.101 node1-pub node1.public.com
|
||||
|
||||
#. Edit ``/etc/resolv.conf``, xCAT management node ip like ``10.5.106.2`` is nameserver: ::
|
||||
|
||||
search cluster.com public.com
|
||||
nameserver 10.5.106.2
|
||||
|
||||
#. Execute ``makedns -n`` to configure DNS
|
||||
|
||||
Q: How to configure aliases?
|
||||
````````````````````````````
|
||||
|
||||
There are 3 methods to configure aliases:
|
||||
|
||||
#. Use ``hostnames`` in ``hosts`` table to configure aliases for the installnic.
|
||||
#. If you want to use script ``confignetwork`` to configure secondary NICs, suggest to use ``aliases`` in ``nics`` table to configure aliases, you can refer to :doc:`Configure Aliases <../guides/admin-guides/manage_clusters/common/deployment/network/cfg_network_aliases>`
|
||||
#. If you want to generate aliases records in ``/etc/hosts`` for secondary NICs, and don't want to use script ``confignetwork`` to configure these NICs, suggest to use ``otherinterfaces`` in ``hosts`` table to configure aliases. You can refer to following example:
|
||||
|
||||
* If you want to add ``node1-hd`` ``20.1.1.1`` in ``hosts`` table, and don't use ``confignetwork`` to configure it, you can add ``otherinterfaces`` like this: ::
|
||||
|
||||
chdef node1 otherinterfaces="node1-hd:20.1.1.1"
|
||||
|
||||
* After executing ``makehosts -n``, you can get records in ``/etc/hosts`` like following: ::
|
||||
|
||||
20.1.1.1 node1-hd
|
||||
|
||||
**Note**: If suffixes or aliases for the same IP are configured in both ``hosts`` table and ``nics`` table, will cause conflicts. ``makehosts`` will use values from ``nics`` table. The values from ``nics`` table will over-write that from ``hosts`` table to create ``/etc/hosts`` records.
|
||||
|
||||
Q: How to handle the same short hostname in different domains?
|
||||
``````````````````````````````````````````````````````````````
|
||||
|
||||
You can follow the best practice example.
|
||||
|
||||
**Best practice example**:
|
||||
|
||||
* There are 2 networks in different domains: ``mgtnetwork`` and ``pubnetwork``
|
||||
* ``mgtnetwork`` is xCAT management network
|
||||
* Generate 2 records with the same hostname in ``/etc/hosts``, like: ::
|
||||
|
||||
10.5.106.101 node1.cluster.com
|
||||
192.168.20.101 node1.public.com
|
||||
|
||||
* Nameserver is xCAT management node IP
|
||||
|
||||
**Steps**:
|
||||
|
||||
#. Add networks entry in ``networks`` table: ::
|
||||
|
||||
chdef -t network mgtnetwork net=10.0.0.0 mask=255.0.0.0 domain=cluster.com
|
||||
chdef -t network pubnetwork net=192.168.30.0 mask=255.255.255.0 domain=public.com
|
||||
|
||||
#. Create ``node1`` with ``ip=10.5.106.101``, xCAT can manage and install this node: ::
|
||||
|
||||
chdef node1 ip=10.5.106.101 groups=all
|
||||
|
||||
#. Create ``node1-pub`` with ``ip=192.168.30.101``, this node is only used to generate ``/etc/hosts`` records for public network, can use ``_unmanaged`` group name to label it: ::
|
||||
|
||||
chdef node1-pub ip=192.168.30.101 hostnames=node1.public.com groups=_unmanaged
|
||||
|
||||
#. Execute ``makehosts -n`` to generate ``/etc/hosts`` records: ::
|
||||
|
||||
makehosts -n
|
||||
|
||||
#. Check results in ``/etc/hosts``: ::
|
||||
|
||||
10.5.106.101 node1 node1.cluster.com
|
||||
192.168.30.101 node1-pub node1.public.com
|
||||
|
||||
#. Edit ``/etc/resolv.conf``, for example, xCAT management node IP is 10.5.106.2 : ::
|
||||
|
||||
search cluster.com public.com
|
||||
nameserver 10.5.106.2
|
||||
|
||||
#. Execute ``makedns -n`` to configure DNS
|
||||
|
||||
Q: When to use ``hosts`` table and ``nics`` table?
|
||||
``````````````````````````````````````````````````
|
||||
|
||||
``hosts`` table is used to store IP addresses and hostnames of nodes. ``makehosts`` use these data to create ``/etc/hosts`` records. ``nics`` table is used to stores secondary NICs details. Some scripts like ``confignetwork`` use data from ``nics`` table to configure secondary NICs. ``makehosts`` also use these data to create ``/etc/hosts`` records for each NIC.
|
@ -199,6 +199,21 @@ To apply the firmware level, a reboot is required to BMC and HOST.
|
||||
|
||||
|
||||
|
||||
\ **-d**\ :
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
This option steamlines the update, activate, reboot BMC and reboot HOST procedure. It expects a directory containing both BMC and PNOR .tar files. When BMC and PNOR tar files are provided, the command will upload and activate firmware. After BMC becomes activate, it will reboot BMC. If BMC state is Ready, the command will reboot the HOST. If BMC state is NotReady, the command will exit.
|
||||
|
||||
\ **Note:**\ When using \ **--no-host-reboot**\, it will not reboot the host after BMC is reboot.
|
||||
|
||||
|
||||
\ **-**\ **-delete**\ :
|
||||
|
||||
.. code-block:: perl
|
||||
|
||||
The delete option will delete update image from BMC. It expects an ID as the input.
|
||||
|
||||
|
||||
***************
|
||||
\ **Options**\
|
||||
|
@ -3065,14 +3065,14 @@ sub rspconfig_response {
|
||||
push @output, @vlan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
xCAT::SvrUtils::sendmsg("$_", $callback, $node) foreach (@output);
|
||||
if ($multiple_error and $mul_out) {
|
||||
xCAT::SvrUtils::sendmsg([1, "$multiple_error"], $callback, $node);
|
||||
$wait_node_num--;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if ($grep_string eq "all") {
|
||||
# If all current values equal the input, just print out message
|
||||
my @checks = split("-", $status_info{RSPCONFIG_CHECK_RESPONSE}{argv});
|
||||
|
@ -80,4 +80,4 @@ reventlog_s_openbmc
|
||||
rpower_softoff
|
||||
rpower_suspend_OpenpowerBmc
|
||||
rpower_wake_OpenpowerBmc
|
||||
rpower_errorcommand_OpenpowerBmc
|
||||
rpower_errorcommand_OpenpowerBmc
|
Loading…
x
Reference in New Issue
Block a user