2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

Modify the maintenance table according to the comments

Change ip to IP, update the example to change
the MN ip address in networks table
This commit is contained in:
chenglch 2016-01-21 02:40:24 -05:00
parent e51e155ae3
commit 11443d5205
3 changed files with 47 additions and 45 deletions

View File

@ -1,11 +1,11 @@
Changing the hostname/IP address
Changing the Hostname/IP address
================================
Background
----------
If the hostname or ip address has already been modified on compute nodes, you
can follow the steps to change the configuration in xcat.
If the hostname or IP address has already been modified on compute nodes,
follow the steps to change the configuration in xcat.
Remove Old Provision Environment
--------------------------------
@ -32,11 +32,14 @@ Change Definition
The output may be like ::
10_0_0_0-255_0_0_0 (network)
fd03:2e76:8631::/64 (network)
192_168_122_0-255_255_255_0 (network)
Change the networks table definitions, take ``10_0_0_0-255_0_0_0`` as a example ::
Change the networks table definitions, For example ``192_168_122_0-255_255_255_0``
is a original network configuration which should be modified to
``192_168_123_0-255_255_255_0``::
chdef -t network 10_0_0_0-255_0_0_0 gateway=10.0.0.103
rmdef -t network 192_168_122_0-255_255_255_0
mkdef -t network 192_168_123_0-255_255_255_0 net=192.168.123.0 mask=255.255.255.0
#. Change the hostname in the xCAT database (This command only supports one node
at a time). For many nodes you will have to write a script. ::
@ -44,21 +47,21 @@ Change Definition
# changes node1 to node2 in the database
chdef -t node -o node1 -n node2
#. Change the hostname and ip address in the ``/etc/hosts`` file
#. Change the hostname and IP address in the ``/etc/hosts`` file
- If you do not use the hosts table in xCAT to create the ``/etc/hosts`` file,
edit the ``/etc/hosts`` file and change your hostnames/ipaddresses entries
edit the ``/etc/hosts`` file and change your hostname and IP address entries
directly.
- If you use the xCAT hosts table, and your nodes are defined by name in the
hosts table, the hosts table must be updated with the new names when
we changed the node name using chdef command. If the hosts tables contains
we changed the node name using ``chdef`` command. If the hosts tables contains
regular expression, you have to rewrite the regular expression to
match your new hostnames/ip addresses.
match your new hostname and IP address.
- If these is no regular expression in the hosts table, you can run ::
# change the ip address for the new hostname in the hosts table.
# change the IP address for the new hostname in the hosts table.
nodech <newnodename> hosts.ip="x.xx.xx.xx"
# add host/ip records in /etc/hosts from the definition in the xCAT hosts
# add hostname/IP records in /etc/hosts from the definition in the xCAT hosts
# table for the <noderange>
makehosts <noderange>

View File

@ -13,8 +13,7 @@ any other tools.
Backup your xCAT data
---------------------
It is good to backup all your xCAT data at first if necessary. Clean up the
database by running the following: ::
Clean up the database by running ``tabprune`` command: ::
tabprune -a auditlog
tabprune -a eventlog
@ -46,22 +45,22 @@ For example ::
service postgresql stop
service mysqld stop
Change the Management Host name
Change the Management Hostname
-------------------------------
* hostname command ::
hostname <newMNname>
hostname <new_MN_name>
* Edit hostname configuration file
Add hostname in ``/etc/hostname``
Add HOSTNAME attribute in ``/etc/sysconfig/network`` (only for [RHEL])
| Add hostname in ``/etc/hostname``
| Add HOSTNAME attribute in ``/etc/sysconfig/network`` (only for [RHEL])
Update Database Files
---------------------
You need to update the new MN hostname or ip address in several database
You need to update the new MN hostname or IP address in several database
configuration files.
SQLite
@ -72,18 +71,18 @@ Nothing to do.
Postgresql
^^^^^^^^^^
- Edit ``/etc/xcat/cfgloc`` file, replace ``Pg:dbname=xcatdb;host=<oldMNip>|xcatadm|xcat20``
with ``Pg:dbname=xcatdb;host=<newMNip>|xcatadm|xcat20``.
- Edit ``/etc/xcat/cfgloc`` file, replace ``Pg:dbname=xcatdb;host=<old_MN_ip>|xcatadm|xcat20``
with ``Pg:dbname=xcatdb;host=<new_MN_ip>|xcatadm|xcat20``.
- Edit config database config file ``/var/lib/pgsql/data/pg_hba.conf``,
replace ``host all all <oldMNip>/32 md5``
with ``host all all <newMNip>/32 md5``.
replace ``host all all <old_MN_ip>/32 md5``
with ``host all all <new_MN_ip>/32 md5``.
Mysql
^^^^^
Edit ``/etc/xcat/cfglooc``, replace ``mysql:dbname=xcatdb;host=<oldMNip>|xcatadmin|xcat20``
with ``mysql:dbname=xcatdb;host=<newMNip>|xcatadmin|xcat20``.
Edit ``/etc/xcat/cfglooc``, replace ``mysql:dbname=xcatdb;host=<old_MN_ip>|xcatadmin|xcat20``
with ``mysql:dbname=xcatdb;host=<new_MN_ip>|xcatadmin|xcat20``.
Start the database
------------------
@ -112,10 +111,10 @@ Change the site table master attribute
::
chdef -t site master=<new mn ip address>
chdef -t site master=<new_MN_ip>
Change all ip address attribute relevant to the MN ipaddress
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Change all IP address attribute relevant to the MN IP address
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
For example, old address was "10.6.0.1"
@ -139,7 +138,7 @@ For example, old address was "10.6.0.1"
servicenode=10.6.0.1
xcatmaster=10.6.0.1
* As the attribute with the old ip address is list above, take conserver as
* As the attribute with the old IP address is list above, take conserver as
a example, query the nodes with ``conserver=10.6.0.1``.
::
@ -153,7 +152,7 @@ For example, old address was "10.6.0.1"
* Change the conserver address for cn1,cn2,cn3,cn4 ::
chdef -t node cn1-cn4 conserver=<newipaddress>
chdef -t node cn1-cn4 conserver=<new_ip_address>
Repeat the same process for the other attributes.
@ -192,8 +191,8 @@ command.
xcatconfig -c
* Update the policy table with new MN name,
replace ``"1.4","oldMNname",,,,,,"trusted",,`` with
``"1.4","newMNname",,,,,,"trusted",,``
replace ``"1.4","old_MN_name",,,,,,"trusted",,`` with
``"1.4","new_MN_name",,,,,,"trusted",,``
* Setup up conserver with new credentials ::
@ -205,11 +204,11 @@ External DNS Server Changed
* Update nameserver entries in ``/etc/resolv.conf``
* Update nameserver attribute in ``site`` table ::
chdef -t site -o clustersite nameservers="newipaddress1,newipaddress2"
chdef -t site -o clustersite nameservers="new_ip_address1,new_ip_address2"
* Update site forwarders in DB ::
chdef -t site -o clustersite forwarders="newipaddress1,newipaddress2"
chdef -t site -o clustersite forwarders="new_ip_address1,new_ip_address2"
* Run command ``makedns -n``
@ -225,13 +224,13 @@ Change the ``/etc/resolv.conf``, forwarders attribute in site table. ::
Change the domain name in the xCAT database site table. ::
chdef -t site -o clustersite domain=<newdomainname>
chdef -t site -o clustersite domain=<new_domainname>
From xCAT 2.8, multiple domains is supported in the cluster. Update the
networks table definition. ::
lsdef -t network -l
chdef -t network -o <netname> ddnsdomain=<newdomainname1,newdomainname2>
chdef -t network -o <network_name> ddnsdomain=<new_domainname1,new_domainname2>
Update the Provision Environment
--------------------------------
@ -245,19 +244,19 @@ If it exists, then use the return name and do the following:
- Remove the MN from DNS configuration ::
makedns -d <oldMNname>
makedns -d <old_MN_name>
- Remove the MN from the DHCP configuration ::
makedns -d <oldMNname>
makedns -d <old_MN_name>
- Remove the MN from the conserver configuration ::
makedns -d <oldMNname>
makedns -d <old_MN_name>
- Change the MN name in the xCAT database ::
chdef -t node -o <oldMNname> -n <newMNname>
chdef -t node -o <old_MN_name> -n <new_MN_name>
- Add the new MN to DNS ::

View File

@ -1,18 +1,18 @@
Changing the hostname/IP address
Changing the Hostname/IP address
================================
Change compute node definition relevant to the service node
-----------------------------------------------------------
Change the settings in database. Below shows a method to find out where the old
ip address settings (take 10.6.0.1 as a example) are used in Hierarchy
IP address settings (take 10.6.0.1 as a example) are used in Hierarchy
environment.
* Query the old attribute ::
lsdef -t node -l | grep "10.6.0.1"
# below is output of the above command. We can find out that nfsserver
# and servicenode are using the old ip address setting.
# and servicenode are using the old IP address setting.
nfsserver=10.6.0.1
servicenode=10.6.0.1
@ -29,7 +29,7 @@ environment.
* Change the nfsserver address for cn1,cn2,cn3,cn4 by running the following
command: ::
chdef -t node cn1-cn4 nfsserver=<new service node ip addresss>
chdef -t node cn1-cn4 nfsserver=<new service node IP addresss>
Database Connection Changes
---------------------------
@ -57,4 +57,4 @@ Reinstall the nodes to pick up all changes ::
nodeset <noderange> osimage=<osimagename>
Then use your normal command to install the nodes like rinstall,rnetboot,etc.
Then use your normal command to install the nodes like rinstall, rnetboot, etc.