Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 23A3A11A21 for ; Tue, 9 Sep 2014 16:15:29 +0000 (UTC) Received: (qmail 99194 invoked by uid 500); 9 Sep 2014 16:15:28 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 99067 invoked by uid 500); 9 Sep 2014 16:15:28 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 98880 invoked by uid 500); 9 Sep 2014 16:15:28 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 98875 invoked by uid 99); 9 Sep 2014 16:15:28 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Sep 2014 16:15:28 +0000 Date: Tue, 9 Sep 2014 16:15:28 +0000 (UTC) From: "Siavash Safi (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (CLOUDSTACK-7521) DB migration from 4.2.1 to 4.4.0 fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-7521?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Siavash Safi updated CLOUDSTACK-7521: ------------------------------------- Description: I tried to upgrade the management server on ubuntu from 4.2.1 to 4.4.0 but it fails to start. After checking syslog I noticed an exception related to DB migration. Here is the mysql error output when trying to run migration schema manually: {noformat} root@server:/etc/cloudstack/management# mysql -f -u cloud -p cloud < /usr/share/cloudstack-management/setup/db/schema-421to430.sql Enter password: ERROR 1050 (42S01) at line 64: Table 'vm_work_job' already exists ERROR 1050 (42S01) at line 75: Table 'async_job_journal' already exists ERROR 1050 (42S01) at line 86: Table 'async_job_join_map' already exists ERROR 1046 (3D000) at line 483: No database selected ERROR 1046 (3D000) at line 498: No database selected ERROR 1050 (42S01) at line 583: Table 'firewall_rule_details' already exists ERROR 1050 (42S01) at line 615: Table 'ldap_configuration' already exists ERROR 1050 (42S01) at line 624: Table 'monitoring_services' already exists ERROR 1062 (23000) at line 634: Duplicate entry '1' for key 'PRIMARY' ERROR 1062 (23000) at line 635: Duplicate entry '2' for key 'PRIMARY' ERROR 1062 (23000) at line 636: Duplicate entry '3' for key 'PRIMARY' ERROR 1062 (23000) at line 637: Duplicate entry '4' for key 'PRIMARY' ERROR 1050 (42S01) at line 641: Table 'usage_event_details' already exists ERROR 1050 (42S01) at line 650: Table 'usage_event_details' already exists ERROR 1050 (42S01) at line 659: Table 'user_ip_address_details' already exists ERROR 1050 (42S01) at line 669: Table 'remote_access_vpn_details' already exists ERROR 1060 (42S21) at line 787: Duplicate column name 'cpu_speed' ERROR 1050 (42S01) at line 791: Table 'vpc_details' already exists ERROR 1050 (42S01) at line 802: Table 'vpc_gateway_details' already exists ERROR 1050 (42S01) at line 812: Table 'network_acl_details' already exists ERROR 1050 (42S01) at line 822: Table 'network_acl_item_details' already exists ERROR 1050 (42S01) at line 847: Table 's2s_vpn_gateway_details' already exists ERROR 1050 (42S01) at line 876: Table 's2s_customer_gateway_details' already exists ERROR 1050 (42S01) at line 887: Table 's2s_vpn_connection_details' already exists{noformat} was: I tried to upgrade the management server on ubuntu from 4.2.1 to 4.4.0 but it fails to start. After checking syslog I noticed an exception related to DB migration. Here is the mysql error output when trying to run migration schema manually: {noformat} root@server:/etc/cloudstack/management# mysql -f -u cloud -p cloud < /usr/share/cloudstack-management/setup/db/schema-421to430.sql Enter password: ERROR 1060 (42S21) at line 25: Duplicate column name 'related' ERROR 1091 (42000) at line 26: Can't DROP 'session_key'; check that column/key exists ERROR 1091 (42000) at line 27: Can't DROP 'job_cmd_originator'; check that column/key exists ERROR 1091 (42000) at line 28: Can't DROP 'callback_type'; check that column/key exists ERROR 1091 (42000) at line 29: Can't DROP 'callback_address'; check that column/key exists ERROR 1060 (42S21) at line 31: Duplicate column name 'job_type' ERROR 1060 (42S21) at line 32: Duplicate column name 'job_dispatcher' ERROR 1060 (42S21) at line 33: Duplicate column name 'job_executing_msid' ERROR 1060 (42S21) at line 34: Duplicate column name 'job_pending_signals' ERROR 1060 (42S21) at line 36: Duplicate column name 'keep_alive_enabled' ERROR 1060 (42S21) at line 38: Duplicate column name 'power_state' ERROR 1060 (42S21) at line 39: Duplicate column name 'power_state_update_time' ERROR 1060 (42S21) at line 40: Duplicate column name 'power_state_update_count' ERROR 1060 (42S21) at line 41: Duplicate column name 'power_host' ERROR 1005 (HY000) at line 42: Can't create table 'cloud.#sql-12ce_27f86f3' (errno: 121) ERROR 1060 (42S21) at line 44: Duplicate column name 'lb_protocol' ERROR 1060 (42S21) at line 117: Duplicate column name 'default_value' ERROR 1060 (42S21) at line 118: Duplicate column name 'updated' ERROR 1060 (42S21) at line 119: Duplicate column name 'scope' ERROR 1060 (42S21) at line 120: Duplicate column name 'is_dynamic' ERROR 1060 (42S21) at line 125: Duplicate column name 'state' ERROR 1060 (42S21) at line 126: Duplicate column name 'hv_ss_reserve' ERROR 1060 (42S21) at line 128: Duplicate column name 'hv_ss_reserve' ERROR 1060 (42S21) at line 139: Duplicate column name 'vpc_id' ERROR 1060 (42S21) at line 141: Duplicate column name 'passive' ERROR 1060 (42S21) at line 508: Duplicate column name 'cpu_sockets' ERROR 1060 (42S21) at line 509: Duplicate column name 'hyperv_network_label' ERROR 1060 (42S21) at line 594: Duplicate column name 'display' ERROR 1054 (42S22) at line 595: Unknown column 'display_detail' in 'network_details' ERROR 1060 (42S21) at line 596: Duplicate column name 'display' ERROR 1054 (42S22) at line 597: Unknown column 'display_detail' in 'volume_details' ERROR 1054 (42S22) at line 598: Unknown column 'display_detail' in 'nic_details' ERROR 1054 (42S22) at line 599: Unknown column 'display_detail' in 'user_vm_details' ERROR 1060 (42S21) at line 600: Duplicate column name 'display' ERROR 1060 (42S21) at line 601: Duplicate column name 'display' ERROR 1064 (42000) at line 634: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--insert into cloud.monitoring_services(id, uuid, service, process_name, service' at line 1 ERROR 1064 (42000) at line 635: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--insert into cloud.monitoring_services(id, uuid, service, process_name, service' at line 1 ERROR 1064 (42000) at line 636: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--insert into cloud.monitoring_services(id, uuid, service, process_name, service' at line 1 ERROR 1064 (42000) at line 637: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--insert into cloud.monitoring_services(id, uuid, service, process_name, servic' at line 1 ERROR 1064 (42000) at line 787: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '--ALTER TABLE `cloud_usage`.`usage_vm_instance` ADD COLUMN `cpu_speed` INT(10) U' at line 1 ERROR 1060 (42S21) at line 833: Duplicate column name 'name' ERROR 1060 (42S21) at line 838: Duplicate column name 'is_exclusive_gslb_provider' ERROR 1091 (42000) at line 897: Can't DROP 'cpu'; check that column/key exists ERROR 1091 (42000) at line 898: Can't DROP 'ram'; check that column/key exists ERROR 1091 (42000) at line 899: Can't DROP 'speed'; check that column/key exists {noformat} > DB migration from 4.2.1 to 4.4.0 fails > -------------------------------------- > > Key: CLOUDSTACK-7521 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7521 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Management Server > Affects Versions: 4.4.0 > Reporter: Siavash Safi > Priority: Blocker > Attachments: management-server.log > > > I tried to upgrade the management server on ubuntu from 4.2.1 to 4.4.0 but it fails to start. > After checking syslog I noticed an exception related to DB migration. > Here is the mysql error output when trying to run migration schema manually: > {noformat} > root@server:/etc/cloudstack/management# mysql -f -u cloud -p cloud < /usr/share/cloudstack-management/setup/db/schema-421to430.sql > Enter password: > ERROR 1050 (42S01) at line 64: Table 'vm_work_job' already exists > ERROR 1050 (42S01) at line 75: Table 'async_job_journal' already exists > ERROR 1050 (42S01) at line 86: Table 'async_job_join_map' already exists > ERROR 1046 (3D000) at line 483: No database selected > ERROR 1046 (3D000) at line 498: No database selected > ERROR 1050 (42S01) at line 583: Table 'firewall_rule_details' already exists > ERROR 1050 (42S01) at line 615: Table 'ldap_configuration' already exists > ERROR 1050 (42S01) at line 624: Table 'monitoring_services' already exists > ERROR 1062 (23000) at line 634: Duplicate entry '1' for key 'PRIMARY' > ERROR 1062 (23000) at line 635: Duplicate entry '2' for key 'PRIMARY' > ERROR 1062 (23000) at line 636: Duplicate entry '3' for key 'PRIMARY' > ERROR 1062 (23000) at line 637: Duplicate entry '4' for key 'PRIMARY' > ERROR 1050 (42S01) at line 641: Table 'usage_event_details' already exists > ERROR 1050 (42S01) at line 650: Table 'usage_event_details' already exists > ERROR 1050 (42S01) at line 659: Table 'user_ip_address_details' already exists > ERROR 1050 (42S01) at line 669: Table 'remote_access_vpn_details' already exists > ERROR 1060 (42S21) at line 787: Duplicate column name 'cpu_speed' > ERROR 1050 (42S01) at line 791: Table 'vpc_details' already exists > ERROR 1050 (42S01) at line 802: Table 'vpc_gateway_details' already exists > ERROR 1050 (42S01) at line 812: Table 'network_acl_details' already exists > ERROR 1050 (42S01) at line 822: Table 'network_acl_item_details' already exists > ERROR 1050 (42S01) at line 847: Table 's2s_vpn_gateway_details' already exists > ERROR 1050 (42S01) at line 876: Table 's2s_customer_gateway_details' already exists > ERROR 1050 (42S01) at line 887: Table 's2s_vpn_connection_details' already exists{noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)