Closed bybai closed 6 years ago
UT:
[root@bybc0605 ~]# python xcatha.py -s -p /HAtest -v 10.5.106.22 -i eth0:0 -n bymn -m 255.0.0.0 -t mariadb
============================================================================================
2018-06-06 04:17:07,379 - INFO - Setup this node as xCAT HA standby MN
============================================================================================
2018-06-06 04:17:07,379 - INFO - Check virtual ip stage
2018-06-06 04:17:07,380 - INFO - ping -c 1 -w 10 10.5.106.22
PING 10.5.106.22 (10.5.106.22) 56(84) bytes of data.
From 10.5.106.5 icmp_seq=1 Destination Host Unreachable
From 10.5.106.5 icmp_seq=2 Destination Host Unreachable
From 10.5.106.5 icmp_seq=3 Destination Host Unreachable
From 10.5.106.5 icmp_seq=4 Destination Host Unreachable
--- 10.5.106.22 ping statistics ---
4 packets transmitted, 0 received, +4 errors, 100% packet loss, time 2999ms
pipe 4
2018-06-06 04:17:10,389 - INFO - virtual ip can be used.
============================================================================================
2018-06-06 04:17:10,390 - INFO - Check if xCAT data is in shared data directory
2018-06-06 04:17:10,391 - INFO - There is no xCAT data /HAtest/install in shared data /HAtest
============================================================================================
2018-06-06 04:17:10,391 - INFO - Configure virtual ip as alias ip stage
2018-06-06 04:17:10,403 - INFO - ifconfig eth0:0 10.5.106.22 netmask 255.0.0.0 [Passed]
nameserver 10.5.106.22
============================================================================================
2018-06-06 04:17:10,403 - INFO - Adding virtual ip 10.5.106.22 into /etc/resolv.conf
============================================================================================
2018-06-06 04:17:10,403 - INFO - Save physical hostname and ip
============================================================================================
2018-06-06 04:17:10,405 - INFO - Configure hostname stage for host bymn
2018-06-06 04:17:10,407 - INFO - hostname bymn [Passed]
============================================================================================
2018-06-06 04:17:10,407 - INFO - Check xcatd service status
Unit xcatd.service could not be found.
============================================================================================
2018-06-06 04:17:10,413 - INFO - Install xCAT stage
--2018-06-06 04:17:10-- https://raw.githubusercontent.com/xcat2/xcat-core/master/xCAT-server/share/xcat/tools/go-xcat
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 151.101.20.133
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|151.101.20.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 46541 (45K) [text/plain]
Saving to: 'STDOUT'
100%[=======================================>] 46,541 --.-K/s in 0.007s
2018-06-06 04:17:10 (6.41 MB/s) - written to stdout [46541/46541]
2018-06-06 04:17:10,660 - INFO - wget https://raw.githubusercontent.com/xcat2/xcat-core/master/xCAT-server/share/xcat/tools/go-xcat -O - >/tmp/go-xcat [Passed]
2018-06-06 04:17:10,663 - INFO - chmod +x /tmp/go-xcat [Passed]
Operating system: linux
Architecture: x86_64
Linux Distribution: rhel
Version: 7.4
Reading repositories ...... done
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Resolving Dependencies
--> Running transaction check
---> Package conserver-xcat.x86_64 0:8.2.1-1 will be installed
... ...
2018-06-06 04:22:03,031 - INFO - /tmp/go-xcat --yes install [Passed]
xCAT is installed [Passed]
Version 2.14.1 (git commit 70d6e7f93cc9714a127c22df2e7ca53d4996a34c, built Fri Jun 1 03:00:53 EDT 2018)
2018-06-06 04:22:03,211 - INFO - lsxcatd -v [Passed]
============================================================================================
2018-06-06 04:22:03,211 - INFO - Check database type stage
2018-06-06 04:22:03,221 - INFO - ifconfig|grep "inet 10.5.106.5 netmask" > /dev/null [Passed]
============================================================================================
2018-06-06 04:22:03,225 - INFO - Check if xCAT data is in shared data directory
2018-06-06 04:22:03,226 - INFO - There is no xCAT data /HAtest/install in shared data /HAtest
============================================================================================
2018-06-06 04:22:03,226 - INFO - Installing database package ...
Loaded plugins: product-id, search-disabled-repos, subscription-manager
... ...
Complete!
2018-06-06 04:22:11,434 - INFO - yum -y install perl-DBD-MySQL* mariadb-server-5.* mariadb-5.* mysql-connector-odbc-* [Passed]
2018-06-06 04:22:11,434 - INFO - install perl-DBD-MySQL* mariadb-server-5.* mariadb-5.* mysql-connector-odbc-* [Passed]
============================================================================================
2018-06-06 04:22:11,434 - INFO - Switch to target database stage
============================================================================================
2018-06-06 04:22:11,434 - INFO - Check xcatd service status
2018-06-06 04:22:11,445 - INFO - mysqlsetup -i -f /tmp/physical_ip -V
Running command on bymn: rpm -qa | grep -i mariadb 2>&1
Running command on bymn: rpm -qa | grep -i perl-DBD-mysql 2>&1
Running command on bymn: ps -ef | grep mysqld 2>&1
Running command on bymn: pidof mysqld 2>&1
... ...
This could take several minutes.
Restarting xcatd (via systemctl): [ OK ]
xCAT is now running on the MySQL database.
2018-06-06 04:24:23,701 - INFO - Switch to mariadb [Passed]
============================================================================================
2018-06-06 04:24:23,702 - INFO - Configure shared data directory stage
2018-06-06 04:24:25,071 - INFO - systemctl stop mariadb [Passed]
2018-06-06 04:24:25,095 - INFO - systemctl stop goconserver [Passed]
2018-06-06 04:24:25,108 - INFO - systemctl stop conserver [Passed]
2018-06-06 04:24:25,121 - INFO - systemctl stop ntpd [Passed]
2018-06-06 04:24:25,133 - INFO - systemctl stop dhcpd [Passed]
2018-06-06 04:24:25,144 - INFO - systemctl stop named [Passed]
2018-06-06 04:24:28,508 - INFO - systemctl stop xcatd [Passed]
2018-06-06 04:24:28,520 - INFO - systemctl stop mariadb [Passed]
2018-06-06 04:24:28,521 - INFO - Copy /install to /HAtest/install
2018-06-06 04:24:34,496 - INFO - chown -R root:root /HAtest/install [Passed]
2018-06-06 04:24:34,496 - INFO - Copy /etc/xcat to /HAtest/etc/xcat
2018-06-06 04:24:39,019 - INFO - chown -R root:root /HAtest/etc/xcat [Passed]
2018-06-06 04:24:39,020 - INFO - Copy /root/.xcat to /HAtest/root/.xcat
2018-06-06 04:24:39,237 - INFO - chown -R root:root /HAtest/root/.xcat [Passed]
2018-06-06 04:24:39,237 - INFO - Copy /var/lib/mysql to /HAtest/var/lib/mysql
2018-06-06 04:24:47,122 - INFO - chown -R mysql:mysql /HAtest/var/lib/mysql [Passed]
2018-06-06 04:24:47,122 - INFO - Copy /tftpboot to /HAtest/tftpboot
2018-06-06 04:25:12,967 - INFO - chown -R root:root /HAtest/tftpboot [Passed]
2018-06-06 04:25:12,968 - INFO - Creating symlink .../install
2018-06-06 04:25:12,968 - INFO - Creating symlink .../etc/xcat
2018-06-06 04:25:12,968 - INFO - Creating symlink .../root/.xcat
2018-06-06 04:25:12,969 - INFO - Creating symlink .../var/lib/mysql
2018-06-06 04:25:12,969 - INFO - Creating symlink .../tftpboot
2018-06-06 04:25:12,986 - INFO - cat /tmp/ha_mn >> /etc/xcat/ha_mn [Passed]
2018-06-06 04:25:15,076 - INFO - systemctl restart mariadb [Passed]
2018-06-06 04:25:15,076 - INFO - mariadb service restart [Passed]
============================================================================================
2018-06-06 04:25:15,076 - INFO - Check xcatd service status
2018-06-06 04:25:17,563 - INFO - systemctl restart xcatd [Passed]
2018-06-06 04:25:17,563 - INFO - xCAT service has started [Passed]
============================================================================================
2018-06-06 04:25:17,563 - INFO - Configure xCAT policy table stage
name=bymn
2018-06-06 04:25:17,896 - INFO - lsdef -t policy -i name|grep bymn [Passed]
============================================================================================
2018-06-06 04:25:17,896 - INFO - Deactivate stage
2018-06-06 04:25:17,928 - INFO - ifconfig|grep "inet 10.5.106.5 netmask" > /dev/null [Passed]
2018-06-06 04:25:17,939 - INFO - ifconfig|grep "inet 10.5.106.5 netmask" > /dev/null [Passed]
============================================================================================
2018-06-06 04:25:17,943 - INFO - Configure hostname stage for host bybc0605.cluster.com
2018-06-06 04:25:17,947 - INFO - hostname bybc0605.cluster.com [Passed]
============================================================================================
2018-06-06 04:25:17,947 - INFO - Unconfigure shared data directory stage
2018-06-06 04:25:17,948 - INFO - Removing symlink .../install
2018-06-06 04:25:17,948 - INFO - Restoring local directory .../install
2018-06-06 04:25:17,948 - INFO - Removing symlink .../etc/xcat
2018-06-06 04:25:17,948 - INFO - Restoring local directory .../etc/xcat
2018-06-06 04:25:17,948 - INFO - Removing symlink .../root/.xcat
2018-06-06 04:25:17,948 - INFO - Restoring local directory .../root/.xcat
2018-06-06 04:25:17,948 - INFO - Removing symlink .../var/lib/mysql
2018-06-06 04:25:17,949 - INFO - Restoring local directory .../var/lib/mysql
2018-06-06 04:25:17,949 - INFO - Removing symlink .../tftpboot
2018-06-06 04:25:17,949 - INFO - Restoring local directory .../tftpboot
============================================================================================
2018-06-06 04:25:17,949 - INFO - Remove virtual IP stage
2018-06-06 04:25:17,951 - INFO - ifconfig eth0:0 0.0.0.0 0.0.0.0 &>/dev/null [Failed, OK to ignore]
2018-06-06 04:25:17,955 - INFO - ip addr show |grep 10.5.106.22 &>/dev/null [Failed, OK to ignore]
2018-06-06 04:25:17,955 - INFO - Remove virtual IP [Passed]
2018-06-06 04:25:18,022 - INFO - systemctl disable goconserver [Passed]
conserver.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig conserver off
2018-06-06 04:25:18,073 - INFO - systemctl disable conserver [Passed]
2018-06-06 04:25:18,118 - INFO - systemctl disable ntpd [Passed]
Removed symlink /etc/systemd/system/multi-user.target.wants/dhcpd.service.
2018-06-06 04:25:18,165 - INFO - systemctl disable dhcpd [Passed]
Removed symlink /etc/systemd/system/multi-user.target.wants/named.service.
2018-06-06 04:25:18,209 - INFO - systemctl disable named [Passed]
xcatd.service is not a native service, redirecting to /sbin/chkconfig.
Executing /sbin/chkconfig xcatd off
2018-06-06 04:25:18,258 - INFO - systemctl disable xcatd [Passed]
Removed symlink /etc/systemd/system/multi-user.target.wants/mariadb.service.
2018-06-06 04:25:18,302 - INFO - systemctl disable mariadb [Passed]
2018-06-06 04:25:18,322 - INFO - systemctl stop goconserver [Passed]
2018-06-06 04:25:18,333 - INFO - systemctl stop conserver [Passed]
2018-06-06 04:25:18,343 - INFO - systemctl stop ntpd [Passed]
2018-06-06 04:25:18,353 - INFO - systemctl stop dhcpd [Passed]
2018-06-06 04:25:18,365 - INFO - systemctl stop named [Passed]
2018-06-06 04:25:21,671 - INFO - systemctl stop xcatd [Passed]
2018-06-06 04:25:23,597 - INFO - systemctl stop mariadb [Passed]
2018-06-06 04:25:23,598 - INFO - This machine is set to standby management node successfully...
Will only support mariadb
Command:
This PR need
mysqlsetup
enhancement from PR https://github.com/xcat2/xcat-core/pull/5279