Basic Platform Maintenance

This chapter provides solutions for errors encountered during fundamental operations in ZStack Cloud.


Installation and Deployment

If you fail to install, deploy, or upgrade ZStack Cloud, investigate the following factors:
  1. Assuming you choose the management node mode when installing the operating system (OS). When the installation of OS is completed, ZStack Cloud is not installed at all.
    The causes could be as follows:
    • The minimum hardware requirement is not satisfied: 4-core CPU and 8GB memory.
    • No IP address is set when the OS is installed. The management node in ZStack Cloud requires the IP address.
    Solution:
    • In this case, you need to run the bash /opt/zstack-installer.bin -E command to install ZStack Cloud;
    • Alternatively, you can run the bash /opt/zstack-installer.bin command to install ZStack Cloud Community.
  2. The error message below presents itself when installing ZStack Cloud.
    Error message:
    Fail Reason: /usr/local/zstack is existing. Please delete it manually before installing a new ZStack

    Cause:

    Now, a ZStack Cloud already exists in the system. Repeated installation is not allowed.

    Solution:
    • To upgrade ZStack Cloud, simply use the -u parameter.
    • To reinstall ZStack Cloud, run the rm -rf /usr/local/zstack; bash zstack-installer.bin -D command.
  3. If the deployment fails, error details will be output on the screen.

    Solution:

    Check the /tmp/zstack_installation.log path. Then try to solve this problem according to error details.

  4. If an ISO version mismatch is encountered during the upgrade, an error message similar to the following will be displayed.
    mount: /dev/loop0 is write-protected, mounting read-only /root Current release h79c not matched the new ISO h84r, Use zstack-upgrade -r xxx.iso to update current repo, Use zstack-upgrade -a/--add_repo xxx.iso to add a new repo

    Solution:

    You need to follow the steps below:
    1. Download the latest ISO by using the following command:
      wget http://cdn.zstack.io/product_downloads/iso/ZStack-Cloud-x86_64-DVD-5.3.28-h84r.iso
    2. Run the following command to perform the upgrade. This will synchronize the yum repository from the ISO to the local system and directly upgrade the management node.
      zstack-upgrade ZStack-Cloud-x86_64-DVD-5.3.28-h84r.iso
  5. If an upgrade fails due to custom software development or database modifications, you wish to restore ZStack Cloud to the pre-upgrade state.

    Prerequisite for restoration:

    When upgrading ZStack Cloud, the current core files and databases are backed up to the corresponding directory:
    1. Core files in ZStack Cloud have been backed up in the/usr/local/zstack/upgrade/ directory by default. The backup files constitue a folder named the time when the upgrade occurs, for example, 2017-11-09-15-41-52.
    2. The database has been backed up in the /usr/local/zstack/db_backup/directory by default. The backup files constitue a folder named the time when the upgrade occurs, for example, 2017-11-09-15-42-43, while the files end with backup.sql.
    Procedures for restoration:
    1. To back up the core files in ZStack Cloud of the previous version, run the following command:
      cp /usr/local/zstack/upgrade/2017-11-09-15-41-52 /root -r
    2. To back up the database in ZStack Cloud of the previous version, run the following command:
      cp /usr/local/zstack/db_backup/2017-11-09-15-42-43/backup.sql /root
    3. To back up the database again, run the following command:
      zstack-ctl dump_mysql
    4. To delete the current ZStack Cloud environment, run the following command:
      zstack-ctl stop rm -rf /usr/local/zstack
    5. Simply install ZStack Cloud by using the previous bin package:
      bash ZStack-Cloud-installer.bin -D
    6. Restore ZStack Cloud by using the backup files generated in procedure a.
      zstack-ctl stop mv /usr/local/zstack/apache-tomcat/webapps/zstack /usr/local/zstack/apache-tomcat/webapps/zstack-bk cp /root/2017-11-09-15-41-52/zstack /usr/local/zstack/apache-tomcat/webapps  -r chown zstack:zstack /usr/local/zstack/apache-tomcat/webapps/zstack -R
    7. Restore the backup database generated in procedure b.
      cat /root/backup.sql |mysql -u root -pzstack.mysql.password zstack
    8. Start the management node service in ZStack Cloud. Then ZStack Cloud has been successfully restored to the pre-upgrade state.
      zstack-ctl start
  6. If you adopt all-in-one installation, we recommend you configure Reserved Memory of Host after initialization. The method is as follows:
    • For global setting:
      On the main menu of ZStack Cloud, choose Settings > Platform Setting > Global Setting > Basic Settings. Set Reserved Memory of Host. The default is 1GB.
      Note: If you set this parameter on the details page of a cluster, this global setting does not take effect on the cluster.
    • For a cluster:

      On the main menu of ZStack Cloud, choose Resource Center > Hardware > Cluster. Select the target cluster and enter its details page. Click Advanced Settings on the top row and you can configure Reserved Memory of Host. The default is 1GB.

      Note: If you set this parameter for certain host, this advanced setting of cluster does not take effect on the host.。
    • For a host:
      Currently, we support configuring Reserved Memory of Host by using CLI command line:
      UpdateResourceConfig category=kvm name=reservedMemory resourceUuid=e2f4836723a2490095768fe611c540b1 value=10G # resourceUuid is the host UUID, while value is the reserved memory size of the host.

Start Services

ZStack Cloud services will automatically start after the management node (MN) is restarted.

If ZStack Cloud services fail to start, check the following:
  1. The database should run properly:

    You can check its status by using the systemctl status/start/stop/restart mariadb command.

  2. Troubleshooting case 1:
    Error message 1:
    ERROR: failed to connect to the mysql server[hostname:10.0.0.18, port:3306, user:zstack, password:zstack.password]
    Solution 1:
    • Mae sure that the IP address, username and password related to the database are correct and accessible in the /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/zstack.properties path. You can use the mysql command to access it.
    • For example, you can connect to the mysql server by typing mysql -u zstack -pzstack.password -h 10.0.0.18.
  3. Troubleshooting case 2:
    Error message 2:
    8080 is occupied by some process. Please use netstat to find out and stop it

    Solution 2:

    Run the netstat -anp|grep 8080 command to find out the occupied 8080 and stop it. Then restart ZStack Cloud.

  4. Troubleshooting case 3:
    Error message 3:
    MN status: Unknown, the management node seems to become zombie as it stops responding APIs

    Solution 3:

    Insufficient memory may cause such messaging failures. To resolve this issue, allocate more memory and avoid reusing the management node for compute tasks.


zstack-ctl command

ZStack Cloud provides zstack-ctl command to control services and resources.

Common zstack-ctl commands are as follows:
  • Check the status:zstack-ctl status
  • Control the status of the management node or the UI service: zstack-ctl stop/start/stop_ui/start_ui/start_node/stop_node/restart_node/
  • Collect diagnostic logs: zstack-ctl configured_collect_log
  • Back up the database: zstack-ctl dump_mysql
  • Restore the database: zstack-ctl restore_mysql -f back.gz --mysql-root-password password
  • Update the management IP address: zstack-ctl change_ip
  • Check the information about the zstack.properties configuration file: zstack-ctl show_configuration
  • Check UI configurations: zstack-ctl show_ui_configuration
  • Install the license of ZStack Cloud: zstack-ctl install_license -f license_key.txt
  • Reset the password of the admin in ZStack Cloud: zstack-ctl reset_password
  • Change the password of the MySQL database: zstack-ctl change_mysql_password --root-password zstack.mysql.password --user-name zstack --new-password password
Note:

The zstack-ctl command has multiple subcommands. For detailed information about what these subcommands are and how to use them, see CTL Command Manual.







Archives

Download Document Archives

Download

Already filled the basic info?Click here.

Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

An email with a verification code will be sent to you. Make sure the address you provided is valid and correct.

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Download

Not filled the basic info yet? Click here.

Invalid email address or mobile number.
同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
ZStack Training and Certification
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io
Request Trial
Enter at least 2 characters.
Invalid mobile number.
Enter at least 4 characters.
Invalid email address.
Wrong code. Try again. Send Code Resend Code (60s)

同意 不同意

I have read and concur with the Site TermsPrivacy PolicyRules and Conventions on User Management of ZStack Cloud

Email Us

contact@zstack.io

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder. After receiving the email, click the URL to download the documentation.

The download link is sent to your email address.

If you don't see it, check your spam folder, subscription folder, or AD folder.
Or click on the URL below. (For Internet Explorer, right-click the URL and save it.)

Thank you for using ZStack products and services.

Submit successfully.

We'll connect soon.

Thank you for using ZStack products and services.