EMS environment build for Alma8 ¶
EMS edbsvr node build ¶
EMS edbsvr node builds for AlmaLinux8 need to install WBXMySql 8.0.x version, based on the MySQL version upgrade, the grammar is different from the old MySQL version, so this doc will support the new version installation.
1. Install the packages via CMC ¶
Install the MySQL with Sub Component: emsdedicated_db via CMC only, but no config file and commands.
2. Configuration MySQL manually on a new server terminal. ¶
After installing MySQL, we need config more configurations to make edbsvr server work well.
2.1 configuration for mysql root password. ¶
2.1.1 Skip grant tables ¶
vi /opt/mysql/conf/my.cnf
[mysqld]
skip-grant-tables
2.1.2 config root grant ¶
mysql -u root
set password for 'root'@'localhost'='**_PASSWORD_**';
flush privileges;
set password for 'root'@'localhost'='**_PASSWORD_**';
2.1.3 Create user(data sync user or remote user)'s grant ¶
mysql -u root -p'**_PASSWORD_**'
CREATE USER '**_USERNAME_**'@'%' IDENTIFIED BY '**_PASSWORD_**';
2.2 Create the databases for edbsvr. ¶
mysql -u root -p'**_PASSWORD_**' -e "create database ecenter;"
mysql -u root -p'**_PASSWORD_**' -e "GRANT ALL PRIVILEGES ON ecenter.* TO '**_USERNAME_**'@'%'"
mysql -u root -p'**_PASSWORD_**' -e "create database metadb;"
mysql -u root -p'**_PASSWORD_**' -e "GRANT ALL PRIVILEGES ON metadb.* TO '**_USERNAME_**'@'%'"
mysql -u root -p'**_PASSWORD_**' -e "create database ecenter_history;"
mysql -u root -p'**_PASSWORD_**' -e "GRANT ALL PRIVILEGES ON ecenter_history.* TO '**_USERNAME_**'@'%'"
mysql -u root -p'**_PASSWORD_**' -e "create database net_snmp;"
mysql -u root -p'**_PASSWORD_**' -e "GRANT ALL PRIVILEGES ON net_snmp.* TO '**_USERNAME_**'@'%'"
mysql -u root -p'**_PASSWORD_**' -e "create database availability;"
mysql -u root -p'**_PASSWORD_**' -e "GRANT ALL PRIVILEGES ON availability.* TO '**_USERNAME_**'@'%'"
2.2 Grant the user for each database on edbsvr. ¶
GRANT RELOAD, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO '**_USERNAME_**'@'%';
FLUSH PRIVILEGES;
SHOW GRANTS;
For example of show emsui grants:
mysql> SHOW GRANTS for 'emsui'@'%';
+------------------------------------------------------------------------------------+
| Grants for emsui@% |
+------------------------------------------------------------------------------------+
| GRANT RELOAD, PROCESS, REPLICATION SLAVE, REPLICATION CLIENT ON *.* TO `emsui`@`%` |
| GRANT ALL PRIVILEGES ON `availability`.* TO `emsui`@`%` |
| GRANT ALL PRIVILEGES ON `ecenter`.* TO `emsui`@`%` |
| GRANT ALL PRIVILEGES ON `metadb`.* TO `emsui`@`%` |
| GRANT ALL PRIVILEGES ON `ecenter_history`.* TO `emsui`@`%` |
| GRANT ALL PRIVILEGES ON `net_snmp`.* TO `emsui`@`%` |
+------------------------------------------------------------------------------------+
6 rows in set (0.00 sec)
3. Data dump from the old master db server ¶
mysql -u root -p'**_PASSWORD_**'
mysql> FLUSH TABLES WITH READ LOCK;
Query OK, 0 rows affected (0.01 sec)
mysql> SHOW MASTER STATUS;
+----------------+-----------+--------------------------------+--------------------------+-------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB | Executed_Gtid_Set |
+----------------+-----------+--------------------------------+--------------------------+-------------------+
| log-bin.000051 | 193669549 | ecenter,metadb,ecenter_hisotry | information_schema,mysql | |
+----------------+-----------+--------------------------------+--------------------------+-------------------+
1 row in set (0.00 sec)
3.1. mysqldump edbsvr database from master server. ¶
mysqldump -uroot -p'**_PASSWORD_**' ecenter > /tmp/ecenter20230818.sql
mysqldump -uroot -p'**_PASSWORD_**' availability > /tmp/availability20230818.sql
mysqldump -uroot -p'**_PASSWORD_**' --where="timestamp>='2023-08-17'" ecenter_history idb_eventhistory > /tmp/idb_eventhistory_10days.sql
mysqldump -uroot -p'**_PASSWORD_**' metadb > /tmp/metadb20230818.sql
mysqldump -uroot -p'**_PASSWORD_**' net_snmp > /tmp/net_snmp20230818.sql
3.2. Tar edbsvr database. ¶
cd /tmp
tar -cvf fofb.tar ecenter20230818.sql metadb20230818.sql idb_eventhistory_10days.sql net_snmp20230818.sql availability20230818.sql
scp fofb.tar wbxbuilds@10.225.26.110:/tmp/
3.3. Unlock edbsvr mysql. ¶
mysql -u root -p'**_PASSWORD_**'
mysql> UNLOCK TABLES;
Query OK, 0 rows affected (0.00 sec)
4. Sync up data on the new server. ¶
4.1. Import data ¶
Login to the new edbsvr server and get the database files.
cd /tmp
tar -vxf fofb.tar
/opt/mysql/bin/mysql -u root -p'**_PASSWORD_**' ecenter < ecenter20230818.sql
/opt/mysql/bin/mysql -u root -p'**_PASSWORD_**' metadb < metadb20230818.sql
/opt/mysql/bin/mysql -u root -p'**_PASSWORD_**' ecenter_history < idb_eventhistory_10days.sql
/opt/mysql/bin/mysql -u root -p'**_PASSWORD_**' net_snmp < net_snmp20230818.sql
/opt/mysql/bin/mysql -u root -p'**_PASSWORD_**' availability < availability20230818.sql
4.2. Edit config file ¶
vi /opt/mysql/conf/my.cnf
[mysqld]
max_connections=2500
binlog_expire_logs_seconds=172800
max_connect_errors=10000
max_allowed_packet=512M
thread_stack = 256K
thread_cache_size = 40
wait_timeout = 31536000 # seconds or milli seconds? giving higher value since we need high value here.
#add for replication as master
log-bin=/var/lib/mysql/log-bin
server-id=2
binlog-do-db = ecenter
binlog-do-db =metadb
binlog-do-db =ecenter_history
binlog-ignore-db=information_schema
binlog-ignore-db = mysql
binlog-ignore-db = availability
innodb_flush_log_at_trx_commit=1
sync_binlog=1
##threading stuff
innodb_read_io_threads = 64
innodb_write_io_threads = 16
innodb_log_buffer_size = 256M
#add for replication as slave
replicate-do-db =ecenter
replicate-do-db =metadb
replicate-do-db =ecenter_history
replicate-ignore-db=mysql
replicate-ignore-db=information_schema
replicate-ignore-db=availability
relay-log=mysqld-relay-bin
slave-skip-errors=1032, 1452,1062
log-slave-updates
[snmptrapd]
user=emsui
password='**_PASSWORD_**'
host=localhost
4.3. Sync data from master server. ¶
mysql> STOP SLAVE;
CHANGE MASTER TO MASTER_HOST='10.225.28.221', MASTER_USER='emsui', MASTER_PASSWORD='**_PASSWORD_**', MASTER_CONNECT_RETRY=60, MASTER_LOG_FILE='log-bin.000051', MASTER_LOG_POS=193669549,MASTER_SSL=1, MASTER_SSL_CA='/opt/mysql/certs/ca.pem';
START SLAVE;
SHOW SLAVE STATUS\G;
Seconds_Behind_Master: NULL
SHOW SLAVE STATUS\G;
Seconds_Behind_Master: 0
EMS imssvr node build ¶
1. Install necessary package ¶
[root@mthf1ims001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/WBXecenter-4.9.0-50-redhat8.4_64.rpm
[root@mthf1ims001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/WBXemspython-3.7-9-redhat8.4_64.rpm
[root@mthf1ims001-alma8 ~]# yum install -y mariadb-connector-c
2. Modify service file ¶
vi /usr/lib/systemd/system/emsd.service
Need to add /bin/bash before the script path as below, so that the kernel knows which interpreter to use.
[Service]
Type=forking
User=root
Group=root
PIDFile=/tmp/emsd.pid
ExecStart=/bin/bash /webapp/ecenter/WBXemsd.sh start
ExecStop=/bin/bash /webapp/ecenter/WBXemsd.sh stop
ExecStatus=/bin/bash /webapp/ecenter/WBXemsd.sh status
ExecRestart=/bin/bash /webapp/ecenter/WBXemsd.sh restart
ExecCondrestart=/bin/bash /webapp/ecenter/WBXemsd.sh condrestart
ExecReload=/bin/bash /webapp/ecenter/WBXemsd.sh reload
3. Start service ¶
[root@mthf1ims001-alma8 ~]# systemctl start emsd.service
[root@mthf1ims001-alma8 ~]# systemctl status emsd.service
If you get the following result, it means the operation was successful.
● emsd.service - EMS emsd service
Loaded: loaded (/usr/lib/systemd/system/emsd.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2023-08-22 03:40:11 GMT; 4h 15min ago
Process: 2854910 ExecStop=/bin/bash /webapp/ecenter/WBXemsd.sh stop (code=exited, status=0/SUCCESS)
Process: 2854939 ExecStart=/bin/bash /webapp/ecenter/WBXemsd.sh start (code=exited, status=0/SUCCESS)
Main PID: 2854951 ([emsd-core] Sle)
Tasks: 18 (limit: 23644)
Memory: 2.2G
CGroup: /system.slice/emsd.service
├─2854951 [emsd-core] Sleeping..
├─2854952 [emsd-cacheRule] Running..
├─2854954 [emsd-as] Running..
├─2854959 [emsd-mail] Idle.
├─2854960 [emsd-mail-mon] Running..
├─2854961 [emsd-notifier] Idle.
├─2854962 [emsd-notifier-dev] Starting..
├─2854963 [emsd-rabbitmq] Idle.
├─2854964 [emsd-rabbitmq-mon] Running..
├─2854966 [emsd-cmc-queue] Idle.
├─2854968 [emsd-rmqcmc-mon] Running..
├─2854969 [emsd-snow-acctprovision-queue] Idle.
├─2854971 [emsd-snow-acctprovision-mon] Running..
├─2854972 [emsd-asset-dc] Running..
└─2854973 [emsd-escalation] Idle.
.....
Aug 22 03:40:11 mthf1ims001-alma8.qa.webex.com systemd[1]: emsd.service: Supervising process 2854951 which is not our child. We'll m>
Aug 22 03:40:11 mthf1ims001-alma8.qa.webex.com systemd[1]: Started EMS emsd service.
EMS episvr node build ¶
1. Install necessary package ¶
[root@mthf1epi001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/WBXecenter-4.9.0-50-redhat8.4_64.rpm
[root@mthf1epi001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/WBXemspython-3.7-9-redhat8.4_64.rpm
[root@mthf1epi001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/ems-wsgi-py3-4.6.5-11.rehl8.x86_64.rpm
[root@mthf1epi001-alma8 ~]# yum install -y WBXhttpd-2.4.57
[root@mthf1epi001-alma8 ~]# yum install -y mariadb-connector-c
2. Modify service file ¶
vi /usr/lib/systemd/system/emsapihandler.service
Need to add /bin/bash before the script path as below, so that the kernel knows which interpreter to use.
[Service]
Type=forking
User=root
Group=root
PIDFile=/tmp/emsapihandler.pid
ExecStart=/bin/bash /webapp/ecenter/WBXemsapihandler.sh start
ExecStop=/bin/bash /webapp/ecenter/WBXemsapihandler.sh stop
ExecStatus=/bin/bash /webapp/ecenter/WBXemsapihandler.sh status
ExecRestart=/bin/bash /webapp/ecenter/WBXemsapihandler.sh restart
ExecCondrestart=/bin/bash /webapp/ecenter/WBXemsapihandler.sh condrestart
ExecReload=/bin/bash /webapp/ecenter/WBXemsapihandler.sh reload
3. Start service ¶
[root@mthf1epi001-alma8 ~]# systemctl start httpd
[root@mthf1epi001-alma8 ~]# systemctl start emsapihandler.service
[root@mthf1epi001-alma8 ~]# systemctl status emsapihandler.service
If both Apache and emsapihandler service are active, such as the following result, it means the operation was successful.
● emsapihandler.service - EMS emsapihandler service
Loaded: loaded (/usr/lib/systemd/system/emsapihandler.service; disabled; vendor preset: disabled)
Active: active (running) since Thu 2023-08-17 01:39:44 GMT; 5 days ago
Process: 323775 ExecStart=/bin/bash /webapp/ecenter/WBXemsapihandler.sh start (code=exited, status=0/SUCCESS)
Main PID: 323785 ([emsapihandler-)
Tasks: 2 (limit: 23644)
Memory: 132.6M
CGroup: /system.slice/emsapihandler.service
├─323785 [emsapihandler-master] Idle.
└─323786 [emsapihandler-requestsdispatch] Starting..
Aug 17 01:39:42 mthf1epi001-alma8.qa.webex.com-1 systemd[1]: Starting EMS emsapihandler service...
Aug 17 01:39:44 mthf1epi001-alma8.qa.webex.com-1 bash[323775]: Starting /webapp/ecenter/core/emsapihandler.py: [ OK ]
Aug 17 01:39:44 mthf1epi001-alma8.qa.webex.com-1 systemd[1]: Started EMS emsapihandler service.
EMS ewbsvr node build ¶
1. Install necessary package ¶
[root@mthf1ewb001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/WBXecenter-4.9.0-49-redhat8.4_64.rpm
[root@mthf1ewb001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/WBXemspython-3.7-9-redhat8.4_64.rpm
[root@mthf1ewb001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/ems-wsgi-py3-4.6.5-11.rehl8.x86_64.rpm
[root@mthf1ewb001-alma8 ~]# yum install -y WBXhttpd-2.4.57
[root@mthf1ewb001-alma8 ~]# yum install -y mariadb-connector-c
2. Start service ¶
[root@mthf1ewb001-alma8 ~]# systemctl start httpd
[root@mthf1ewb001-alma8 ~]# systemctl status httpd
If httpd service is active, means the operation was successful.
● httpd.service - The Apache HTTP Server
Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)
Active: active (running) since Tue 2023-08-22 08:29:29 GMT; 3min 58s ago
Process: 503962 ExecStart=/opt/httpd/bin/httpd $OPTIONS -k start (code=exited, status=0/SUCCESS)
Main PID: 503963 (httpd)
Tasks: 109 (limit: 49448)
Memory: 302.9M
CGroup: /system.slice/httpd.service
├─503963 /opt/httpd/bin/httpd -k start
├─503966 /opt/httpd/bin/httpd -k start
├─503967 /opt/httpd/bin/httpd -k start
├─503968 /opt/httpd/bin/httpd -k start
└─520298 /opt/httpd/bin/httpd -k start
Aug 22 08:29:29 mthf1ewb001-alma8.qa.webex.com-1 systemd[1]: Starting The Apache HTTP Server...
Aug 22 08:29:29 mthf1ewb001-alma8.qa.webex.com-1 systemd[1]: Started The Apache HTTP Server.
EMS etssvr node build ¶
1. Install MySQL ¶
[root@mthf1ets001-alma8 ~]# yum install -y WBXMySQL-config-8.0.34-1.el8
[root@mthf1ets001-alma8 ~]# yum install -y WBXMySQL-shared-8.0.34-1.el8
[root@mthf1ets001-alma8 ~]# yum install -y WBXMySQL-client-8.0.34-1.el8
[root@mthf1ets001-alma8 ~]# yum install -y WBXMySQL-server.34-1.el8
# Edit mysql config file,update content as flow
[root@mthf1ets001-alma8 ~]# vi /opt/mysql/conf/my.cnf
[mysqld]
skip-grant-tables=YES
1.1 Set password ¶
[root@mthf1ets001-alma8 ~]# systemctl start mysql
[root@mthf1ets001-alma8 ~]# mysql -u root
mysql>set password for 'root'@'localhost'='**_PASSWORD_**';
mysql>flush privileges;
mysql>exit;
1.2. Install necessary package ¶
[root@mthf1ets001-alma8 ~]# yum install -y https://rmc.webex.com/qa/EMS/redhat8.4_64/WBXemspython-3.7-9-redhat8.4_64.rpm
[root@mthf1ets001-alma8 ~]# yum install -y mariadb-connector-c
[root@mthf1ets001-alma8 ~]# yum install -y ems-net-snmp-5.8-13
2 Create user and table ¶
[root@mthf1ets001-alma8 ~]#mysql -u root -p -e "CREATE USER 'emsui'@'%' IDENTIFIED BY '**_PASSWORD_**';"
[root@mthf1ets001-alma8 ~]#mysql -u root -p -e "CREATE USER 'trapreceiver'@'localhost' IDENTIFIED BY '**_PASSWORD_**';"
[root@mthf1ets001-alma8 ~]#mysql -u root -p -e "create database net_snmp;"
[root@mthf1ets001-alma8 ~]#mysql -u root -p -e "GRANT ALL PRIVILEGES ON net_snmp.* TO 'trapreceiver'@'localhost';"
[root@mthf1ets001-alma8 ~]#mysql -u root -p -e "GRANT ALL PRIVILEGES ON net_snmp.* TO 'emsui'@'%';"
[root@mthf1ets001-alma8 ~]#mysql -u root -p net_snmp < /webapp/trapreceiver/share/net_snmp_table_schema.sql
3. Install ems_net_snmp ¶
3.1 Add content to snmptrapd.conf ¶
[root@mthf1ets001-alma8 ~]#mkdir /opt/snmp/etc
[root@mthf1ets001-alma8 ~]#vi /opt/snmp/etc/snmptrapd.conf
disableAuthorization yes
sqlSaveInterval 9
sqlMaxQueue 140
3.2 Modify file permissions and add soft link ¶
[root@mthf1ets001-alma8 ~]#chmod 644 /opt/snmp/etc/snmptrapd.conf
[root@mthf1ets001-alma8 ~]#cp /opt/snmp/etc/snmptrapd.conf /etc/
[root@mthf1ets001-alma8 ~]#chmod 775 /opt/snmp/sbin/snmptrapd
[root@mthf1ets001-alma8 ~]#vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
/opt/snmp/lib/
[root@mthf1ets001-alma8 ~]#ln -s /opt/mysql/lib64/mysql/libmysqlclient.so.21.2.29 /usr/lib64/libmysqlclient.so.21
[root@mthf1ets001-alma8 ~]#/sbin/ldconfig -v
3.3 Start snmptrapd service ¶
[root@mthf1ets001-alma8 ~]#cp /opt/snmp/snmptrapd.sh /etc/init.d/snmptrapd
[root@mthf1ets001-alma8 ~]#chmod 775 /etc/init.d/snmptrapd
[root@mthf1ets001-alma8 ~]#vi /etc/my.cnf
[snmptrapd]
user=trapreceiver
password=**_PASSWORD_**
host=localhost
[root@mthf1ets001-alma8 ~]#systemctl daemon-reload
[root@mthf1ets001-alma8 ~]#systemctl enable snmptrapd.service
[root@mthf1ets001-alma8 ~]#service snmptrapd start
[root@mthf1ets001-alma8 ~]#service snmptrapd status
[root@mthf1ets001-alma8 ~]#ps -ef|grep snmptrapd
4. Install emstrapd ¶
[root@mthf1ets001-alma8 ~]#cp /webapp/trapreceiver/WBXemstrapd.sh /usr/local/bin/
[root@mthf1ets001-alma8 ~]#vi /lib/systemd/system/emstrapd.service
[Unit]
Description=EMS emstrapd service
After=emstrapd.service
[Service]
Type=forking
User=root
Group=root
PIDFile=/tmp/emstrapd.pid
ExecStart=/usr/local/bin/WBXemstrapd.sh start
ExecStop=/usr/local/bin/WBXemstrapd.sh stop
ExecStatus=/usr/local/bin/WBXemstrapd.sh status
ExecRestart=/usr/local/bin/WBXemstrapd.sh restart
ExecCondrestart=/usr/local/bin/WBXemstrapd.sh condrestart
ExecReload=/usr/local/bin/WBXemstrapd.sh reload
[Install]
WantedBy=multi-user.target
4.1 Start emstrpd service ¶
[root@mthf1ets001-alma8 ~]#systemctl daemon-reload
[root@mthf1ets001-alma8 ~]#systemctl enable emstrapd.service
[root@mthf1ets001-alma8 ~]#systemctl start emstrapd.service
[root@mthf1ets001-alma8 ~]#systemctl status emstrapd.service
EMS OS Upgrade ¶
Goal ¶
Upgrade CentOS7 to AlmaLinux8 via CMC
Operation ¶
-
Go to the page(My Dashboard-Vmware Upgrade)
-
Check value of "Target OS Type". It is required for "Set Flags" menu and atomic operations(Includes: "Check Vmware Build", "Vmware Build", "Vmware Cutover", "Vmware Upgrade Full Refresh", "Vmware Rollback", "PA Fix", "Vmware Decommission")
-
Select the machine you want to upgrade, then click "Set Flag."
-
You must prepare the new version-build configuration and set the boxes's "EnableFlag is True" to "Y" by the menu Set Flags
-
Then you can do the atomic operations steps by steps in the order Check Vmware Build → Vmware Build → Vmware Cutover → Vmware Upgrade Full Refresh (→ Vmware Rollback) → PA Fix → Vmware Decommission For Vmware Upgrade, every step's result must be Y, or it will block next step execute.(Ps. Can ignore "Vmware Rollback" step)
-
You can proceed to the next step only if the result of the previous step is "Y". Otherwise, you will encounter the following error.
-
The successful operation result looks like the following picture.
-
Until when you complete the "Vmware Cutover" operation, log in to the target machine, and you will see that the OS has been successfully upgraded.
9.You can refresh the service here(Vmware Upgrade Full Refresh) or using traditional methods refresh, if you have prepared the template configuration for the new system.[wbxbuilds@mtbt4ims001 ~]$ cat /etc/os-release NAME="AlmaLinux" VERSION="8.6 (Sky Tiger)" ID="almalinux" ID_LIKE="rhel centos fedora" VERSION_ID="8.6" PLATFORM_ID="platform:el8" PRETTY_NAME="AlmaLinux 8.6 (Sky Tiger)" ANSI_COLOR="0;34" CPE_NAME="cpe:/o:almalinux:almalinux:8::baseos" HOME_URL="https://almalinux.org/" DOCUMENTATION_URL="https://wiki.almalinux.org/" BUG_REPORT_URL="https://bugs.almalinux.org/" ALMALINUX_MANTISBT_PROJECT="AlmaLinux-8" ALMALINUX_MANTISBT_PROJECT_VERSION="8.6" -
PA Fix will check whether your machine meets the production line requirements. If you don't care about these points, you can manually change the flag to 'Y' for skip this step
-
Perform the Vmware Decommission operation will delete the old os type VMware and update the new os type VMware metadata.name. If you don't do this, it will affect the next round of upgrade, and then you will be counted as two copies of the quota for the vm, one for the new and old machines. This step is also necessary.
12.Due to the removal of Fusion login during the upgrade process, if you are in the BTS or Prod environment, you will need to configure Fusion login as follows.
Blocking issues ¶
Q:fatal: [localhost]: FAILED! => changed=false assertion: vm_info.json.err_code is not defined evaluated_to: false msg: vmware build check for mtbt4edb001 unsuccessfully, gateway, subnet, account and tier are required property!
A:The reason for this problem may be due to the following points. - Log in this machine and check if it is a virtual machine.You can execute 'systemd-detect-virt' command,If the result is "vmware," it indicates a virtual machine. If the result is "none," it indicates a physical machine.Only VMware can be upgraded. - Check if the DNS and hostname match.
Q:CMC task fail\n'NoneType' object has no attribute 'execute_command'\nReport by cmc writer server:10.252.10.242
A:First, make sure the machine is alive. Then.if you can log into this machine, you should write the key into "/home/cmcadmin/.ssh/authorized_keys" file. Moreover, if you don't konw key's value,you can log in to another machine where CMC can log in and copy it.
vi /home/cmcadmin/.ssh/authorized_keys
# stage
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDfGL3WjeOhSGXN2wAy89IVC6bWccXGgqCIzQVVK6SwbmKGpeKFLh9yQMUXNgF7YixVGuMd3orCBF6m2Mfk06FUObI4Igxjmf2ueSrCO4jqaGR/wOFANsqZ+cXo2WVN38hvm3J+mqSSCk3ubSVhq/0pd+njHdXwhDNpR/RNUQedOr7b9UccFma2BzvgFIvgTUaIliZ6JDYd9MBRi7R+kQK+QrdeE8kqooojXxXb5M39MP34mOxn9EgrdVn1qG42cblCHymIJQwcECtvTn9RVbT/0q73WNo9UIHNLripWiHAqDRpFgv0Fpvw5T76rforHg+R7HkRDc+XHijwzgsM0ahP root@mtbt1cmc001.webex.com
# prod
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCgufAQP6ebgiUOJQeoPQN4SrBj7rCpy0R8u88hFKzBgWhYzuQzRSCShDnhcsHbpFCTAwFe43vDejGnQZ9wn4R36/tRoV0EkG6yy++8tZPCh8c7vJgP7zXSGULok2ItpU3iVRhKqF5FuubUQDJnGn9dGQr3kW7QfDG+pJ2PV/iheNL4uaR9nu8hGvHhLCpXyK+WUQVdPAsPEjOud+I9ILRr3ZLVrbOHaLfo2dB/lwvNeaecAGBs5d6dCk4N8yxD12AYTt1dF9eXc6iKR4n/7Pxc2qvuYAdLSUqvIyyBDqIOs+PyPr8K91JD6l9gxjbx0RYsbTSfG/WmBpaanppE74ON root@mtsj1cmc001.webex.com
# qa
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCb8dSy+gdxR1+5EmVXA66o3cwnkxjKHQ86tNcZzUdgqrepIki3u+KNdZ5NRsADumcNVJ8FIRUObZWpJYpq59KzIkujaId+pC+4gt36dvxybTIOxDm+ZdwZiFqStRQgvpdnIYtIVhpL7G9yKe40F3Vqs1l+Xu177Xpy3Dhp86NGJUuW3FIJYTqRt+mqeITT6yQ9yHQl4FQSzEdUGAmlYT+MzztjgunoxZ5akOo0q4AGY7kYKsnRiaPx82MUBDHkaR0Fejx0NHZM7VgXk46GtK2dZNDgQKAbOXK/96C+ep4tcmw/uVHJF7HY5HS81OMawjerrHaNtSNnqXBgPmJeXOTx root@mthz00cmc003.qa.webex.com
# china
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCwlCetl6cSpygDDsI7Np++A8IS7GsoCw9K6zjv/Zb9CqlQz1ocXVLTCnMDz9e+vcoRI6rAqilYyit76Z2HtM5V/fMcicK3+AkalpDxCEWScYZW5sxuw+8vdC9VJfyD3P6IxG5a8JEBeBUNMWucQK1ySfHmnuVGpk6gRW3GDMta1mapDXqa1bE9/bLaJUWosLxy4aKklbApXsjAUxyeNUJLpQ7+b1GZITXB6t5qs9MiJQRG8uHCQ9LFGcC7334haKuFhbKrqLhReOW1/HaNZIvmtqe/UTL5ZNP9jerhtw6z2mmhAls79qLpmxrIm70QhVwE+9f2BO3X7+1vFEh9n0YJ root@mtbj3cmc001.webex.com.cn
chown cmcadmin:cmcadmin authorized_keys