Skip to content

zstack upstream installation failed because mysql error #135

Description

@youyk

After build latest zstack upstream code, it fails to be installed.

ZStack commit:

ff6be96

Error logs:

  1. Install Database and Message Bus:
    Generate Temp SSH Key: ... PASS
    Install Mysql Server: ... PASS
    Deploy ZStack Database: ... FAIL

    Reason: failed to deploy ZStack database. You might want to add -D to drop previous ZStack database or -k to keep previous zstack database

The detailed installation log could be found in /tmp/zstack_installation.log

[root@localhost ~]# vim /tmp/zstack_installation.log
[root@localhost ~]# tail -50 /tmp/zstack_installation.log
TASK: [rollback MySql installation on Ubuntu] *********************************
skipping: [10.0.101.31]

TASK: [failure] ***************************************************************
skipping: [10.0.101.31]

PLAY RECAP ********************************************************************
10.0.101.31 : ok=8 changed=6 unreachable=0 failed=0

PASS
\n----------------
Deploy ZStack Database:ERROR: failed to execute shell command: bash /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/deploydb.sh root '' 10.0.101.31 3306 ''
return code: 1
stdout: /usr/local/zstack/apache-tomcat/webapps/zstack/WEB-INF/classes/deploydb.sh root 10.0.101.31 3306
Flyway 3.2.1 by Boxfuse

Database: jdbc:mysql://10.0.101.31:3306/zstack (MySQL 5.5)
Cleaned schema zstack (execution time 00:00.002s)
Flyway 3.2.1 by Boxfuse

Database: jdbc:mysql://10.0.101.31:3306/zstack (MySQL 5.5)
Validated 5 migrations (execution time 00:00.006s)
Creating Metadata table: zstack.schema_version
Current version of schema zstack: << Empty Schema >>
Migrating schema zstack to version 0.6 - schema
Migrating schema zstack to version 0.7 - schema
Migrating schema zstack to version 0.8 - schema
Migrating schema zstack to version 0.9 - schema
Migrating schema zstack to version 1.0 - schema
ERROR: Migration of schema zstack to version 1.0 failed! Please restore backups and roll back database and code!
ERROR:

Migration V1.0__schema.sql failed

SQL State : 42000
Error Code : 1064
Message : You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'DELETE 0' at line 1
Query is:
ALTER TABLE HostCapacityVO ADD totalPhysicalMemory bigint unsigned NOT NULL DELETE 0
Location : /usr/local/zstack/apache-tomcat-7.0.35/webapps/zstack/WEB-INF/classes/tools/flyway-3.2.1/sql/V1.0__schema.sql (/usr/local/zstack/apache-tomcat-7.0.35/webapps/zstack/WEB-INF/classes/tools/flyway-3.2.1/sql/V1.0__schema.sql)
Line : 1
Statement : ALTER TABLE HostCapacityVO ADD totalPhysicalMemory bigint unsigned NOT NULL DELETE 0

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions