cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugo Trippaers <HTrippa...@schubergphilis.com>
Subject RE: DB upgrade to 4.0 version
Date Mon, 20 Aug 2012 11:22:41 GMT
Hey Alena,

I did some checking and unfortunately I can't reproduce your issue. I started with a fresh
3.0.2 installation using the create_schema.sql. I get only one entry in the resulting list.
Can you show me the schema only dump of the database (or only of the table physical_network_service_providers
) you are having the problems with so I can see what is going on?

Cheers,

Hugo

-----Original Message-----
From: Alena Prokharchyk [mailto:Alena.Prokharchyk@citrix.com] 
Sent: Tuesday, August 14, 2012 1:31 AM
To: cloudstack-dev@incubator.apache.org
Cc: Hugo Trippaers
Subject: DB upgrade to 4.0 version

I started looking at the DB upgrade part of the code for 4.0 release, and fixed the following:

1) joined 3.0.2->3.0.3 and 3.0.3->4.0 upgrade paths to one: 3.0.2 to 4.0.
Did it because asf/master was branched when no 3.0.3 was released yet, and we shouldn't have
merged 302->303 to asf/master.
So whoever is going to make the upgrade to 4.0 Apache cloudStack, can do it from the any version
up to 3.0.2 inclusively.

2) Added upgrade code for the VPC feature


Hugo, I hit some error in your code during the unittest for db upgrade:

mysql -u root cloud < ./setup/db/db/schema-302to40.sql ERROR 1242 (21000) at line 237:
Subquery returns more than 1 row

It seems to be related to commit 420f08ab4a37fa485e6318a5c2683732b5744d7e,
and the following query returns more than one row:

mysql> select CONCAT(CONCAT('DROP INDEX ', A.CONSTRAINT_NAME), ' ON
physical_network_service_providers' ) from information_schema.key_column_usage A JOIN information_schema.key_column_usage
B ON B.table_name = 'physical_network_service_providers' AND B.COLUMN_NAME = 'provider_name'
AND A.COLUMN_NAME ='physical_network_id' AND B.CONSTRAINT_NAME=A.CONSTRAINT_NAME where A.table_name
=
'physical_network_service_providers';+-------------------------------------
--------------------------------------------------------+
| CONCAT(CONCAT('DROP INDEX ', A.CONSTRAINT_NAME), ' ON
physical_network_service_providers' ) |
+-----------------------------------------------------------------------
+---
-------------------+
| DROP INDEX physical_network_id ON physical_network_service_providers
                   |
| DROP INDEX physical_network_id ON physical_network_service_providers
                   |
| DROP INDEX physical_network_id ON physical_network_service_providers
                   |
| DROP INDEX physical_network_id ON physical_network_service_providers
                   |
+-----------------------------------------------------------------------
+---
-------------------+
4 rows in set (0.00 sec)




So could you please take a look and let me know if I did something wrong, or is it a real
bug? Steps I've made to reproduce the problem:

* deployed cloudStack 3.0.2, haven't added any resources, no dataCenters, nothing
* ran schema-302to40.sql against this DB.



Thank you,
Alena.


Mime
View raw message