2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Merge branch 'master' into rhels8-tmp

This commit is contained in:
GONG Jie 2019-03-14 16:10:41 +08:00
commit 410226830d
17 changed files with 354 additions and 105 deletions

View File

@ -61,59 +61,63 @@ dhcp should be restarted after seting up dynamic IP range.
Discover Switches
~~~~~~~~~~~~~~~~~
xCAT supports **switchdiscover** command to discover the switches that are attached to the subnets on xCAT management node. Refer to :doc:`/advanced/networks/switchdiscover/switches_discovery` for more info.
.. note:: Only BNT and Mellanox switches are supported for switch-based switch discovery
For the switch-based switch discovery, we add **setup** flag: ::
xCAT can automatically discover switches that are connected to the defined subnets from the management node using the ``switchdiscover`` command.
For switch-based switch discovery, use the ``--setup`` option::
switchdiscover [noderange|--range ip_ranges][-s scan_methods] [--setup]
if **--setup** flag is specified, the command will perform following steps:
The ``--setup`` option will perform the following steps:
1. Use snmp or nmap scan methods to find all switches in the dynamic IP ranges specified by --range, the available switches will be stored in switch hash table with hostname, switchtype, vendor info and mac address.
1. Scan the IP range using ``snmp`` or ``nmap`` to find all switches that respond. The available switches will be stored into the switch hash table with ``hostname``, ``switchtype``, ``mac``, and vendor information.
2. Based on MAC address for each switch defined in the hash table, call **find_mac** subroutine. The **find_mac** subroutine will go thought the switch and switch ports and find matched mac address.
* If discovered switch didn't find any predefined switch matches, it will log the message ``NO predefined switch matched``.
* If discovered switch matched with one of pre-defined switch, it will update the predefined switch with ::
otherinterface=x.x.x.x (discovered ip)
state=matched
switchtype=type of switch
usercomment=vendor information
2. Based on mac address for each switch defined in the hash table, call **find_mac** subroutine. The **find_mac** subroutine will go thought the switch and switch ports and find matched mac address.
3. If the switches are matched, the ``switchdiscover`` command will execute the following scripts to configure static IP address, hostname, and enable the snmpv3.
* If discovered switch didn't find any predefined switch matches, it will log the message ``NO predefined switch matched``.
* If discovered switch matched with one of pre-defined switch, it will update the predefined switch with ::
* ``/opt/xcat/share/xcat/scripts/configBNT``
* ``/opt/xcat/share/xcat/scripts/configMellanox``
otherinterface=x.x.x.x (discovered ip)
state=matched
switchtype=type of switch
usercomment=vendor information
4. After discovery process the predefined node attribute in the xCAT database will be updated. ::
lsdef switch-192-168-5-22
groups=switch
ip=192.168.5.22
mac=a8:97:dc:02:92:00
mgt=switch
nodetype=switch
password=admin
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles
protocol=telnet
snmpauth=sha
snmppassword=xcatadminpassw0rd@snmp
snmpusername=xcatadmin
snmpversion=3
status=hostname_configured
statustime=08-31-2016 15:35:49
supportedarchs=ppc64
switch=switch-10-5-23-1
switchport=45
switchtype=BNT
usercomment=IBM Networking Operating System RackSwitch G8052
username=root
3. After switches are matched, the command will call config files to set up static IP address, hostname and enable the snmpv3. Currently, BNT and Mellanox switches are supported. The two config files are located in the **/opt/xcat/share/xcat/scripts/config.BNT** and **/opt/xcat/share/xcat/scripts/config.Mellanox**. the log message ``the switch type is not support for config`` is displayed if switchtype is something other than BNT or Mellanox.
4. After discovery process, the predefined node attribute in the xCATdb will be updated.
::
lsdef switch-192-168-5-22
groups=switch
ip=192.168.5.22
mac=a8:97:dc:02:92:00
mgt=switch
nodetype=switch
password=admin
postbootscripts=otherpkgs
postscripts=syslog,remoteshell,syncfiles
protocol=telnet
snmpauth=sha
snmppassword=xcatadminpassw0rd@snmp
snmpusername=xcatadmin
snmpversion=3
status=hostname_configured
statustime=08-31-2016 15:35:49
supportedarchs=ppc64
switch=switch-10-5-23-1
switchport=45
switchtype=BNT
usercomment=IBM Networking Operating System RackSwitch G8052
username=root
.. tip:: Refer to :doc:`/advanced/networks/switchdiscover/switches_discovery` for more info.
Configure switches

View File

@ -45,9 +45,11 @@ sync file **/etc/file2** to the file **/etc/file2** on the node ::
/etc/file2 -> /etc/
sync all files in **/home/mikev** to directory **/home/mikev** on the node ::
sync all files, including subdirectories, in **/home/mikev** to directory **/home/mikev** on the node ::
/home/mikev/* -> /home/mikev/
or
/home/mikev -> /home/mikev/
.. note:: Don't try to sync files to the read only directory on the target node.

View File

@ -61,7 +61,7 @@ Update the ca and credentials for the service nodes.
The default behavior when no options are input to \ **updatenode**\ will be to run
the following options \ **-S**\ , \ **-P**\ and \ **-F**\ options in this order.
If you wish to limit \ **updatenode**\ to specific
actions you can use combinations of the \ **-S**\ , \ **-P**\ , and \ **-F**\ flags.
actions you can use combination of the \ **-S**\ , \ **-P**\ , and \ **-F**\ flags.
For example, If you just want to synchronize configuration file you could
specify the \ **-F**\ flag. If you want to synchronize files and update

View File

@ -21,7 +21,7 @@ xdcp.1
\ **xdcp**\ \ *noderange*\ [[\ **-B**\ | \ **-**\ **-bypass**\ ] [\ **-f**\ \ *fanout*\ ] [\ **-L**\ ] [\ **-l**\ \ *userID*\ ] [\ **-o**\ \ *node_options*\ ] [\ **-p**\ ] [\ **-P**\ ] [\ **-r**\ \ *node remote copy command] [\ \*\*-R\*\*\ ] [\ \*\*-t\*\*\ \ \*timeout\*\ ] [\ \*\*-T\*\*\ ] [\ \*\*-v\*\*\ ] [\ \*\*-q\*\*\ ] [\ \*\*-X\*\*\ \ \*env_list\*\ ] \ \*sourcefile.... targetpath\*\ *\
\ **xdcp**\ \ *noderange*\ [\ **-F**\ Irsynclist input file>] [\ **-r**\ \ *node remote copy command*\ ]
\ **xdcp**\ \ *noderange*\ [\ **-F**\ \ *rsynclist input file*\ ] [\ **-r**\ \ *node remote copy command*\ ]
\ **xdcp**\ \ *computenoderange*\ [\ **-s**\ \ **-F**\ \ *synclist input file*\ ] [\ **-r**\ \ *node remote copy command*\ ]

View File

@ -406,7 +406,7 @@ site Attributes:
dbtracelevel: The trace level for the database access log. To activate this setting, please.
restart xcatd or send HUP signal to the 'xcatd: DB Access' process, Like: .
pkill -f -HUP 'xcatd: DB Access'
pkill -f -HUP 'xcatd: DB Access'
Currrent support values:
0: disable the trace log for db
1: trace the calls of database subroutines

View File

@ -0,0 +1,9 @@
Get Started
===========
.. toctree::
:maxdepth: 1
quick_start.rst
workflow_guide.rst

View File

@ -0,0 +1,140 @@
Quick Start Guide
=================
xCAT can be a comprehensive system to manage infrastructure elements in Data Center, bare-metal servers, switches, PDUs, and Operation System distributions. This quick start guide will instruct you to set up a xCAT system and manage an IPMI managed bare metal server with Red Hat-based distribution in 15 minutes.
The steps below will be focused on RHEL7, however they should work for other distribution, such as CentOS, SLES, etc, details :doc:`Operating System & Hardware Support Matrix <../../overview/support_matrix>`
Prerequisites
-------------
Assume there are two servers named ``xcatmn.mydomain.com`` and ``cn1.mydomain.com``.
#. They are in the same subnet ``192.168.0.0``.
#. ``cn1.mydomain.com`` has BMC which ``xcatmn.mydomain.com`` can access it.
#. ``xcatmn.mydomain.com`` has Red Hat OS installed, and uses IP ``192.168.0.2``.
#. ``xcatmn.mydomain.com`` has access to internet.
#. ``cn1.mydomain.com`` BMC IP address is ``10.4.40.254``.
#. Prepare a full DVD for OS provision, and not a ``Live CD`` ISO, for this example, will use ``RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso`` ISO, you can download it from Red Hat website.
All the following steps should be executed in ``xcatmn.mydomain.com``.
Prepare the Management Node ``xcatmn.mydomain.com``
```````````````````````````````````````````````````
#. Disable SELinux: ::
echo 0 > /selinux/enforce
sed -i 's/^SELINUX=.*$/SELINUX=disabled/' /etc/selinux/config
#. Set the hostname of ``xcatmn.mydomain.com``: ::
hostname xcatmn.mydomain.com
#. Set the IP to STATIC in the ``/etc/sysconfig/network-scripts/ifcfg-<proc_nic>`` file
#. Update your ``/etc/resolv.conf`` with DNS settings and make sure that the node could visit ``github`` and ``xcat`` official website.
#. Configure any domain search strings and nameservers to the ``/etc/resolv.conf`` file
#. Add ``xcatmn`` into ``/etc/hosts``: ::
192.168.0.2 xcatmn xcatmn.mydomain.com
#. Install xCAT: ::
wget https://raw.githubusercontent.com/xcat2/xcat-core/master/xCAT-server/share/xcat/tools/go-xcat -O - >/tmp/go-xcat
chmod +x /tmp/go-xcat
go-xcat --yes install
source /etc/profile.d/xcat.sh
#. Configure the system password for the root user on the compute nodes: ::
chtab key=system passwd.username=root passwd.password=abc123
Stage 1 Add your first node and control it with out-of-band BMC interface
-------------------------------------------------------------------------
#. Define compute node ``cn1``: ::
mkdef -t node cn1 --template x86_64-template ip=192.168.0.3 mac=42:3d:0a:05:27:0c bmc=10.4.40.254 bmcusername=USERID bmcpassword=PASSW0RD
#. Configure DNS: ::
makehosts cn1
makedns -n
#. Check ``cn1`` Hardware Control:
``cn1`` power management: ::
rpower cn1 on
rpower cn1 state
cn1: on
``cn1`` firmware information: ::
rinv cn1 firm
cn1: UEFI Version: 1.31 (TDE134EUS 2013/08/27)
cn1: Backup UEFI Version: 1.00 (TDE112DUS )
cn1: Backup IMM Version: 1.25 (1AOO26K 2012/02/23)
cn1: BMC Firmware: 3.10 (1AOO48H 2013/08/22 18:49:44)
Stage 2 Provision a node and manage it with parallel shell
----------------------------------------------------------
#. In order to PXE boot, you need a DHCP server to hand out addresses and direct the booting system to the TFTP server where it can download the network boot files. Configure DHCP: ::
makedhcp -n
#. Copy all contents of Distribution ISO into ``/install`` directory, create OS repository and osimage for OS provision: ::
copycds RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso
After ``copycds``, the corresponding basic osimage will be generated automatically. And then you can list the new osimage name here. You can refer document to customize the package list or postscript for target compute nodes, but here just use the default one: ::
lsdef -t osimage
#. Use ``xcatprobe`` to precheck xCAT management node ready for OS provision: ::
xcatprobe xcatmn
[mn]: Checking all xCAT daemons are running... [ OK ]
[mn]: Checking xcatd can receive command request... [ OK ]
[mn]: Checking 'site' table is configured... [ OK ]
[mn]: Checking provision network is configured... [ OK ]
[mn]: Checking 'passwd' table is configured... [ OK ]
[mn]: Checking important directories(installdir,tftpdir) are configured... [ OK ]
[mn]: Checking SELinux is disabled... [ OK ]
[mn]: Checking HTTP service is configured... [ OK ]
[mn]: Checking TFTP service is configured... [ OK ]
[mn]: Checking DNS service is configured... [ OK ]
[mn]: Checking DHCP service is configured... [ OK ]
... ...
[mn]: Checking dhcpd.leases file is less than 100M... [ OK ]
=================================== SUMMARY ====================================
[MN]: Checking on MN... [ OK ]
#. Start the Diskful OS Deployment: ::
rinstall cn1 osimage=rhels7.6-x86_64-install-compute
#. Monitor Installation Process: ::
makegocons cn1
rcons cn1
**Note**: The keystroke ``ctrl+e c .`` will disconnect you from the console.
After 5-10 min verify provision status is ``booted``: ::
lsdef cn1 -i status
Object name: cn1
status=booted
Use ``xdsh`` to check ``cn1`` OS version, OS provision is successful: ::
xdsh cn1 more /etc/*release
cn1: ::::::::::::::
cn1: /etc/os-release
cn1: ::::::::::::::
cn1: NAME="Red Hat Enterprise Linux Server"
cn1: VERSION="7.6 (Maipo)"
... ...

View File

@ -1,5 +1,5 @@
Quick Start Guide
=================
Workflow Guide
==============
If xCAT looks suitable for your requirement, following steps are recommended procedure to set up an xCAT cluster.

View File

@ -30,6 +30,7 @@ Table of Contents
overview/index.rst
guides/install-guides/index.rst
guides/get-started/index.rst
guides/admin-guides/index.rst
advanced/index.rst
QA/index.rst

View File

@ -10,5 +10,4 @@ xCAT enables you to easily manage large number of servers for any type of techni
features.rst
support_matrix.rst
architecture.rst
quick_start.rst
xcat2_release.rst

View File

@ -4,7 +4,7 @@ B<updatenode> - Update nodes in an xCAT cluster environment.
=head1 SYNOPSIS
B<updatenode> I<noderange> [B<-V>|B<--verbose>] [B<-F>|B<--sync>] [B<-f>|B<--snsync>] [B<-r>|B<--node-rcp> [I<full_path_to_remote_copy_command>]] [B<-S>|B<--sw>] [B<-l> I<userID>] [B<-P>|B<--scripts> [I<script1,script2...>]] [B<-s>|B<--sn>] [B<-A>|B<--updateallsw>] [B<-c>|B<--cmdlineonly>] [B<-d> I<alt_source_dir>] [B<--fanout>=I<fanout_value>] [B<-t> I<timeout>} [I<attr=val> [I<attr=val...>]] [B<-n>|B<--noverify>]
B<updatenode> I<noderange> [B<-V>|B<--verbose>] [B<-F>|B<--sync>] [B<-f>|B<--snsync>] [B<-r>|B<--node-rcp> [I<node_remote_copy_command>]] [B<-S>|B<--sw>] [B<-l> I<userID>] [B<-P>|B<--scripts> [I<script1,script2...>]] [B<-s>|B<--sn>] [B<-A>|B<--updateallsw>] [B<-c>|B<--cmdlineonly>] [B<-d> I<alt_source_dir>] [B<--fanout>=I<fanout_value>] [B<-t> I<timeout>} [I<attr=val> [I<attr=val...>]] [B<-n>|B<--noverify>]
B<updatenode> B<noderange> [B<-k>|B<--security>] [B<-t> I<timeout>]
@ -41,7 +41,7 @@ Update the ca and credentials for the service nodes.
The default behavior when no options are input to B<updatenode> will be to run
the following options B<-S>, B<-P> and B<-F> options in this order.
If you wish to limit B<updatenode> to specific
actions you can use combinations of the B<-S>, B<-P>, and B<-F> flags.
actions you can use combination of the B<-S>, B<-P>, and B<-F> flags.
For example, If you just want to synchronize configuration file you could
specify the B<-F> flag. If you want to synchronize files and update
@ -315,17 +315,17 @@ read-only option for files/directories listed in
B<litefile> table with source location specified in the B<litetree> table.
=item [B<-r>|B<--node-rcp> [I<full_path_to_remote_copy_command>]]
=item [B<-r>|B<--node-rcp> [I<node_remote_copy_command>]]
Specifies the full path of the remote copy command used for syncing files to node targets, such as "/usr/bin/rsync" or "/usr/bin/scp". If not specified, rsync will be used by default.
Specifies the full path of the remote copy command used for syncing files to node targets, such as B</usr/bin/rsync> or B</usr/bin/scp>. If not specified, B<rsync> will be used by default.
Notice: The synclist for "-r /usr/bin/scp" has some differences with "-r /usr/bin/rsync":
Note: The synclist processing for B<-r /usr/bin/scp> has some differences with B<-r /usr/bin/rsync>:
1) the ``EXECUTE`` clause is not supported in "-r /usr/bin/scp"
1) the B<EXECUTE> clause in synclist file is not supported with B<-r /usr/bin/scp> flag
2) if the destination directory specified in synclist is an existing file on target node, "updatenode -r /usr/bin/scp" will fail with ``scp: <destination directory>: Not a directory``
2) if the destination directory specified in synclist file is an existing file on target node, B<updatenode -r /usr/bin/scp> will fail with "scp: <destination directory>: Not a directory"
3) if the destination file specified in synclist is an existing directory on target node, "updatenode -r /usr/bin/scp" will fail with ``scp: <destination file>: Is a directory``
3) if the destination file specified in synclist file is an existing directory on target node, B<updatenode -r /usr/bin/scp> will fail with "scp: <destination file>: Is a directory"
=item B<-g|--genmypost>

View File

@ -4,15 +4,13 @@ B<xdcp> - Concurrently copies files to or from multiple nodes. In addition, prov
=head1 B<SYNOPSIS>
B<xdcp> I<noderange> [[B<-B> | B<--bypass>] [B<-f> I<fanout>] [B<-L>] [B<-l> I<userID>] [B<-o> I<node_options>] [B<-p>] [B<-P>] [B<-r> I<node_remote_shell>] [B<-R>] [B<-t> I<timeout>] [B<-T>] [B<-v>] [B<-q>] [B<-X> I<env_list>] I<sourcefile.... targetpath>
B<xdcp> I<noderange> [[B<-B> | B<--bypass>] [B<-f> I<fanout>] [B<-L>] [B<-l> I<userID>] [B<-o> I<node_options>] [B<-p>] [B<-P>] [B<-r> I<node remote copy command] [B<-R>] [B<-t> I<timeout>] [B<-T>] [B<-v>] [B<-q>] [B<-X> I<env_list>] I<sourcefile.... targetpath>
B<xdcp> I<noderange> [B<-F> I<rsync input file>]
B<xdcp> I<noderange> [B<-F> I<rsynclist input file>] [B<-r> I<node remote copy command>]
B<xdcp> I<computenoderange> [B<-s> B<-F> I<rsync input file>]
B<xdcp> [B<-i> I<install image>] [B<-F> I<rsync input file>]
B<xdcp> I<computenoderange> [B<-s> B<-F> I<synclist input file>] [B<-r> I<node remote copy command>]
B<xdcp> [B<-i> I<install image>] [B<-F> I<synclist input file>] [B<-r> I<node remote copy command>]
B<xdcp> [B<-h> | B<-V> | B<-q>]
@ -46,7 +44,7 @@ For node targets, the remote copy command is determined by the following order
1. The B<-r> flag.
2. The B</usr/bin/scp> command.
2. The B</usr/bin/rsync> command.
B<COMMAND> B<EXECUTIONS>:
@ -99,7 +97,7 @@ Specifies a fanout value for the maximum number of concurrently executing rem
can be specified by indicating a fanout value of B<1>.
If B<-f> is not specified, a default fanout value of B<64> is used.
=item B<-F>|B<--File> I<rsync input file>
=item B<-F>|B<--File> I<synclist input file>
Specifies the path to the file that will be used to
build the B<rsync> command.
@ -151,10 +149,17 @@ valid contexts. Each setting is prefixed with I<context>: to
identify the source context of the setting.
=item B<-r>|B<--node-rcp> I<node_remote_copy>
=item B<-r>|B<--node-rcp> I<node remote copy command>
Specifies the full path of the remote copy command used
for remote command execution on node targets.
Specifies the full path of the remote copy command used for syncing files to node targets, such as B</usr/bin/rsync> or B</usr/bin/scp>. If not specified, B<rsync> will be used by default.
Note: The synclist processing for B<-r /usr/bin/scp> has some differences with B<-r /usr/bin/rsync>:
1) the B<EXECUTE> clause in synclist file is not supported with B<-r /usr/bin/scp> flag
2) if the destination directory specified in synclist file is an existing file on target node, B<xdcp -r /usr/bin/scp> will fail with "scp: <destination directory>: Not a directory"
3) if the destination file specified in synclist file is an existing directory on target node, B<xdcp -r /usr/bin/scp> will fail with "scp: <destination file>: Is a directory"
=item B<-R>|B<--recursive> I<recursive>

View File

@ -4609,7 +4609,7 @@ sub defmk_usage
}
$rsp->{data}->[$n] = "$dataobj\n";
$n++;
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t <object-types>\' option to";
$n++;
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
xCAT::MsgUtils->message("I", $rsp, $::callback);
@ -4656,7 +4656,7 @@ sub defch_usage
}
$rsp->{data}->[$n] = "$dataobj\n";
$n++;
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t <object-types>\' option to";
$n++;
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
xCAT::MsgUtils->message("I", $rsp, $::callback);
@ -4700,7 +4700,7 @@ sub defls_usage
}
$rsp->{data}->[$n] = "$dataobj\n";
$n++;
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t <object-types>\' option to";
$n++;
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
xCAT::MsgUtils->message("I", $rsp, $::callback);
@ -4741,7 +4741,7 @@ sub defrm_usage
}
$rsp->{data}->[$n] = "$dataobj\n";
$n++;
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t\' option to";
$rsp->{data}->[$n] = "\nUse the \'-h\' option together with the \'-t <object-types>\' option to";
$n++;
$rsp->{data}->[$n] = " get a list of valid attribute names for each object type.\n";
xCAT::MsgUtils->message("I", $rsp, $::callback);

View File

@ -335,8 +335,8 @@ start:xcatconfig_u_check_xcatsslversion_rhels_sles
description:after xcatconfig -u the site.xcatsslversion will not be changed
os:rhels,sles
label:mn_only
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$'
check:rc==0
cmd:mkdir -p /tmp/xcatconfig_u_check_xcatsslversion_rhels_sles
cmd:lsdef -t site clustersite -z >/tmp/xcatconfig_u_check_xcatsslversion_rhels_sles/clustersite.stanza
cmd:chtab key=xcatsslversion site.value=TLSv12
check:rc==0
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv12$'
@ -345,8 +345,8 @@ cmd:xcatconfig -u
check:rc==0
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv12$'
check:rc==0
cmd:chtab key=xcatsslversion site.value=TLSv1
check:rc==0
cmd: cat /tmp/xcatconfig_u_check_xcatsslversion_rhels_sles/clustersite.stanza |mkdef -zf
cmd: rm -rf /tmp/xcatconfig_u_check_xcatsslversion_rhels_sles
end
@ -354,8 +354,8 @@ start:xcatconfig_u_check_xcatsslversion_ubuntu
description:after xcatconfig -u the site.xcatsslversion will not be changed
os:ubuntu
label:mn_only
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1$'
check:rc==0
cmd:mkdir -p /tmp/xcatconfig_u_check_xcatsslversion_ubuntu
cmd:lsdef -t site clustersite -z >/tmp/xcatconfig_u_check_xcatsslversion_ubuntu/clustersite.stanza
cmd:chtab key=xcatsslversion site.value=TLSv1_2
check:rc==0
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1_2$'
@ -364,6 +364,6 @@ cmd:xcatconfig -u
check:rc==0
cmd:lsdef -t site -i xcatsslversion -c | grep '=TLSv1_2$'
check:rc==0
cmd:chtab key=xcatsslversion site.value=TLSv1
check:rc==0
cmd: cat /tmp/xcatconfig_u_check_xcatsslversion_ubuntu/clustersite.stanza |mkdef -zf
cmd: rm -rf /tmp/xcatconfig_u_check_xcatsslversion_ubuntu
end

View File

@ -559,7 +559,11 @@ function configure_nicdevice {
if [ $? -ne 0 ]; then
errorcode=1
else
create_bridge_interface ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type
if [ "$networkmanager_active" = "0" ]; then
create_bridge_interface ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type
elif [ "$networkmanager_active" = "1" ]; then
create_bridge_interface_nmcli ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type
fi
fi
#configure vlan
elif [ x"$nic_dev_type" = "xvlan" ]; then
@ -570,11 +574,18 @@ function configure_nicdevice {
vlanid=`echo "$nic_dev" | $sed -e 's/^\(.*\)vla\?n\?\([0-9]\+\)$/\2/'`
vlanname=`echo "$nic_dev" | $sed -e 's/^\(.*\)vla\?n\?\([0-9]\+\)$/\1/'`
fi
create_vlan_interface ifname=$vlanname vlanid=$vlanid
if [ "$networkmanager_active" = "0" ]; then
create_vlan_interface ifname=$vlanname vlanid=$vlanid
elif [ "$networkmanager_active" = "1" ]; then
create_vlan_interface_nmcli ifname=$vlanname vlanid=$vlanid
fi
#configure bond
elif [ x"$nic_dev_type" = "xbond" ]; then
create_bond_interface ifname=$nic_dev slave_ports=$base_nic_for_bond slave_type=$base_nic_type
if [ "$networkmanager_active" = "0" ]; then
create_bond_interface ifname=$nic_dev slave_ports=$base_nic_for_bond slave_type=$base_nic_type
elif [ "$networkmanager_active" = "1" ]; then
create_bond_interface_nmcli ifname=$nic_dev slave_ports=$base_nic_for_bond slave_type=$base_nic_type
fi
elif [ x"$nic_dev_type" = "xinfiniband" ] || [ x"$nic_dev_type" = "xOmnipath" ]; then
log_info "Call configib for IB nics: $nic_dev, ports: $num_iba_ports"
log_info "NIC_IBNICS=$nic_dev NIC_IBAPORTS=$num_iba_ports configib"
@ -593,26 +604,6 @@ function configure_nicdevice {
return $errorcode
}
############################################################################
#
# disable NetworkManager and start network
#
###########################################################################
function enable_network_service {
checkservicestatus NetworkManager > /dev/null
if [ $? -eq 0 ]; then
log_info "NetworkManager is active. start to stop it ..."
stopservice NetworkManager | log_lines info
disableservice NetworkManager
enableservice network
startservice network
else
log_info "NetworkManager is inactive."
fi
}
############################################################################
#
# Main process
@ -644,6 +635,17 @@ if [ $boot_install_nic -eq 1 ];then
fi
fi
#check if using NetworkManager or network service
networkmanager_active=2
check_NetworkManager_or_network_service
if [ $? -eq 0 ]; then
networkmanager_active=0
elif [ $? -eq 1 ]; then
networkmanager_active=1
else
exit 1
fi
#replace | with "@", for example, eth1|eth2 ----> eth1@eth2
nicdevice=`echo "$NICDEVICES" | sed 's/|/@/g'`
@ -695,8 +697,6 @@ if [ -n "$valid_sorted_nicdevice_list" ]; then
log_info "All valid nics and device list:"
echo "$valid_sorted_nicdevice_list" |log_lines info
fi
#enable network service
enable_network_service
#config nics and ifcfg files
configure_nicdevice "$valid_sorted_nicdevice_list"

View File

@ -743,6 +743,17 @@ function check_brctl() {
fi
}
###############################################################################
#
# check and set device managed
# input: ifname
# output: 0 managed
# 1 umanaged
#
###############################################################################
function check_and_set_device_managed() {
ifname=$1
}
###############################################################################
#
@ -1548,3 +1559,82 @@ function decode_arguments {
return $rc
}
###############################################################################
#
# check NetworkManager
# output: 2 error
# 1 using NetworkManager
# 0 using network
#
##############################################################################
function check_NetworkManager_or_network_service() {
#check NetworkManager is active
checkservicestatus NetworkManager > /dev/null 2>/dev/null
if [ $? -eq 0 ]; then
log_info "NetworkManager is active"
#check nmcli is installed
type $nmcli >/dev/null 2>/dev/null
if [ $? -ne 0 ]; then
log_error "There is no nmcli"
else
stopservice network | log_lines info
disableservice network | log_lines info
stopservice networking | log_lines info
disableservice networking | log_lines info
return 1
fi
fi
checkservicestatus network > /dev/null 2>/dev/null
if [ $? -eq 0 ]; then
stopservice NetworkManager | log_lines info
disableservice NetworkManager | log_lines info
log_info "network service is active"
return 0
fi
checkservicestatus networking > /dev/null 2>/dev/null
if [ $? -eq 0 ]; then
stopservice NetworkManager | log_lines info
disableservice NetworkManager | log_lines info
log_info "networking service is active"
return 0
fi
log_error "NetworkManager, network.service and networking service are not active"
return 2
}
###############################################################################
#
# create vlan using nmcli
#
# input : ifname=<ifname> slave_ports=<ports> xcatnet=<xcatnetwork> _ipaddr=<ip> _netmask=<netmask> _mtu=<mtu> _bridge=<bridge_name> vlanid=<vlanid>
# return : 0 success
#
###############################################################################
function create_vlan_interface_nmcli {
log_info "create_vlan_interface_nmcli $@"
}
###############################################################################
#
# create bridge
#
# input : ifname=<ifname> xcatnet=<xcat_network> _ipaddr=<ip> _netmask=<netmask> _port=<port> _pretype=<nic_type> _brtype=<bridge|bridge_ovs> _mtu=<mtu> _bridge=<bridge_name>
#
###############################################################################
function create_bridge_interface_nmcli {
log_info "create_bridge_interface_nmcli $@"
}
#############################################################################################################################
#
# create bond or bond->vlan interface
# https://www.kernel.org/doc/Documentation/networking/bonding.txt
# https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/Networking_Guide/sec-Using_Channel_Bonding.html
#
# input : ifname=<nic> xcatnet=<xcatnetwork> _ipaddr=<ip> _netmask=<netmask> _bonding_opts=<bonding_opts> _mtu=<mtu> slave_ports=<port1,port2>
#
############################################################################################################################
function create_bond_interface_nmcli {
log_info "create_bond_interface $@"
}

View File

@ -495,7 +495,6 @@ else # for common mode MODE=1,2,3,5 (updatenode,moncfg,node deployment)
download_postscripts "${SIP}:${HTTPPORT}"
if [ $? -eq 0 ]; then
downloaded=1
break
fi
fi
fi