cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rajesh Battala <rajesh.batt...@citrix.com>
Subject RE: db deployment is failing in master branch
Date Wed, 30 Apr 2014 10:22:15 GMT
I have figure out that root cause. 
Murali commit has committed the file with instance_ip column.  (https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=commit;h=095151c98a45022b9759a45c066d8ec815de19e4)

After that again Amogh commit is trying to create the same column. (https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=commit;h=78c683f5682560deffa405ac76edf23f8e17565d)


769 ALTER TABLE `cloud`.`load_balancer_vm_map` ADD COLUMN instance_ip VARCHAR(40);
 770 ALTER TABLE `cloud`.`load_balancer_vm_map` DROP KEY `load_balancer_id`, ADD UNIQUE KEY
load_balancer_id (`load_balancer_id`, `instance_id`, `instance_ip`);
 771 ALTER TABLE `cloud`.`vpc_offerings` ADD COLUMN supports_region_level_vpc boolean default
false;
 772 ALTER TABLE `cloud`.`network_offerings` ADD COLUMN supports_streched_l2 boolean default
false;
 773 ALTER TABLE `cloud`.`networks` ADD COLUMN streched_l2 boolean default false;
 774 ALTER TABLE `cloud`.`vpc` ADD COLUMN region_level_vpc boolean default false;
 775 INSERT INTO `cloud`.`configuration`(category, instance, component, name, value, description,
default_value) VALUES ('Advanced', 'DEFAULT', 'NetworkOrchestrationService', 'router.redundant.vrrp.interval',
'1', 'seconds between VRRP broadcast. It would 3 times broadcast fail to trigger fail-over
mechanism of redundant router', '1') ON DUPLICATE KEY UPDATE category='Advanced';
 776 INSERT INTO `cloud`.`configuration`(category, instance, component, name, value, description,
default_value) VALUES ('Advanced', 'DEFAULT', 'NetworkOrchestrationService', 'router.aggregation.command.each.timeout',
'3', 'timeout in seconds for each Virtual Router command being aggregated. The final aggregation
command timeout would be determined by this timeout * commands counts ', '3') ON DUPLICATE
KEY UPDATE category='Advanced';
 777 ALTER TABLE `cloud`.`load_balancer_vm_map` ADD COLUMN instance_ip VARCHAR(40);
 778 ALTER TABLE `cloud`.`load_balancer_vm_map` DROP KEY `load_balancer_id`, ADD UNIQUE KEY
load_balancer_id (`load_balancer_id`, `instance_id`, `instance_ip`)



I can fix this issue and commit the changes. 

Thanks
Rajesh Battala


-----Original Message-----
From: Rajesh Battala [mailto:rajesh.battala@citrix.com] 
Sent: Wednesday, April 30, 2014 3:29 PM
To: dev@cloudstack.apache.org
Subject: db deployment is failing in master branch

Hi All,

Deploying DB on master branch is failing.

========> Processing upgrade: com.cloud.upgrade.DatabaseUpgradeChecker
[WARNING]
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)
        at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297)
        at java.lang.Thread.run(Thread.java:722)
Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to upgrade the database
        at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:352)
        at com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChecker.java:447)
        at com.cloud.upgrade.DatabaseCreator.main(DatabaseCreator.java:222)
        ... 6 more
Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to execute upgrade script:
/home/rajesh/hyperv/developer/target/db/db/schema-430to440.sql
        at com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:267)
        at com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeChecker.java:321)
        ... 8 more
Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Duplicate column name
'instance_ip'
        at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:193)
        at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:87)
        at com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseUpgradeChecker.java:258)
        ... 9 more


Thanks
Rajesh Battala

Mime
View raw message