You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cloudstack.apache.org by Hugo Trippaers <HT...@schubergphilis.com> on 2013/02/11 17:21:54 UTC

FW: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec statements

Hey Rohit,

I don't think this is the right solution, we should not depend on the name of the database in the scripts themselves. All the other scripts use the prefix 'cloud.' to work around this. I would prefer it that way so admins can change stuff without have to go through the database scripts, like reading stuff into a test database.

Cheers,

Hugo

> -----Original Message-----
> From: bhaisaab@apache.org [mailto:bhaisaab@apache.org]
> Sent: Monday, February 11, 2013 12:13 PM
> To: cloudstack-commits@incubator.apache.org
> Subject: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix 4.1-new-
> db-schema.sql, use cloud before exec statements
> 
> CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec
> statements
> 
> Signed-off-by: Rohit Yadav <bh...@apache.org>
> 
> 
> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
> Commit: http://git-wip-us.apache.org/repos/asf/incubator-
> cloudstack/commit/e3156a6e
> Tree: http://git-wip-us.apache.org/repos/asf/incubator-
> cloudstack/tree/e3156a6e
> Diff: http://git-wip-us.apache.org/repos/asf/incubator-
> cloudstack/diff/e3156a6e
> 
> Branch: refs/heads/4.1
> Commit: e3156a6e16cee9ffeb5d757dd8a775236127410f
> Parents: a880f47
> Author: Rohit Yadav <bh...@apache.org>
> Authored: Mon Feb 11 16:36:41 2013 +0530
> Committer: Rohit Yadav <bh...@apache.org>
> Committed: Mon Feb 11 16:42:48 2013 +0530
> 
> ----------------------------------------------------------------------
>  setup/db/4.1-new-db-schema.sql |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> ----------------------------------------------------------------------
> 
> 
> http://git-wip-us.apache.org/repos/asf/incubator-
> cloudstack/blob/e3156a6e/setup/db/4.1-new-db-schema.sql
> ----------------------------------------------------------------------
> diff --git a/setup/db/4.1-new-db-schema.sql b/setup/db/4.1-new-db-
> schema.sql index e8bafa2..d60eca2 100644
> --- a/setup/db/4.1-new-db-schema.sql
> +++ b/setup/db/4.1-new-db-schema.sql
> @@ -15,6 +15,8 @@
>  -- specific language governing permissions and limitations
>  -- under the License.
> 
> +use cloud;
> +
>  alter table vm_template add image_data_store_id bigint unsigned;  alter
> table vm_template add size bigint unsigned;  alter table vm_template add
> state varchar(255);


Re: FW: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec statements

Posted by Chip Childers <ch...@sungard.com>.
On Mon, Feb 11, 2013 at 04:46:56PM +0000, Hugo Trippaers wrote:
> Hmm..  I was pretty sure I removed all of them from the create-schema.sql already. Will take care of it tomorrow, it's my complaint so I should fix it ;-) I'm not caring that much about the "old" upgrade paths, I really hope nobody is using 2.0 anymore.
> 
> Hugo

I think we may need to be careful about that assumption.  An upgrade
from 2 to 4 was just discussed on the user list:

http://markmail.org/thread/h4sqtrf3h36m747a

I think that having a strong upgrade story is a strength for the project
that we should protect.  CloudStack has been relatively mature, as far
as operational considerations go (OK, perhaps logging is a sore spot).

-chip

Re: FW: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec statements

Posted by Rohit Yadav <bh...@apache.org>.
On Mon, Feb 11, 2013 at 10:16 PM, Hugo Trippaers
<HT...@schubergphilis.com> wrote:
> Hmm..  I was pretty sure I removed all of them from the create-schema.sql already. Will take care of it tomorrow, it's my complaint so I should fix it ;-) I'm not caring that much about the "old" upgrade paths, I really hope nobody is using 2.0 anymore.

Cool, go Hugo!

>
> Hugo
>
>> -----Original Message-----
>> From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On Behalf
>> Of Rohit Yadav
>> Sent: Monday, February 11, 2013 5:39 PM
>> To: Hugo Trippaers
>> Cc: cloudstack-dev@incubator.apache.org
>> Subject: Re: FW: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix
>> 4.1-new-db-schema.sql, use cloud before exec statements
>>
>> Hi Hugo,
>>
>> > I don't think this is the right solution, we should not depend on the name of
>> the database in the scripts themselves. All the other scripts use the prefix
>> 'cloud.' to work around this. I would prefer it that way so admins can change
>> stuff without have to go through the database scripts, like reading stuff into a
>> test database.
>> >
>>
>> Okay, so should we change and fix this pattern in following files as well, they
>> too depend on database name;
>>
>> $ grep 'use cloud' -R
>> ./4.1-new-db-schema.sql:use cloud;
>> ./create-schema.sql:use cloud;
>> ./data-20to21.sql:use cloud;
>> ./postprocess-20to21.sql:use cloud;
>>
>> You want to do it, else I can fix it tomorrow morning.
>>
>> Cheers!
>>
>> >
>> >> -----Original Message-----
>> >> From: bhaisaab@apache.org [mailto:bhaisaab@apache.org]
>> >> Sent: Monday, February 11, 2013 12:13 PM
>> >> To: cloudstack-commits@incubator.apache.org
>> >> Subject: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix
>> >> 4.1-new- db-schema.sql, use cloud before exec statements
>> >>
>> >> CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec
>> >> statements
>> >>
>> >> Signed-off-by: Rohit Yadav <bh...@apache.org>
>> >>
>> >>
>> >> Project:
>> >> http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
>> >> Commit: http://git-wip-us.apache.org/repos/asf/incubator-
>> >> cloudstack/commit/e3156a6e
>> >> Tree: http://git-wip-us.apache.org/repos/asf/incubator-
>> >> cloudstack/tree/e3156a6e
>> >> Diff: http://git-wip-us.apache.org/repos/asf/incubator-
>> >> cloudstack/diff/e3156a6e
>> >>
>> >> Branch: refs/heads/4.1
>> >> Commit: e3156a6e16cee9ffeb5d757dd8a775236127410f
>> >> Parents: a880f47
>> >> Author: Rohit Yadav <bh...@apache.org>
>> >> Authored: Mon Feb 11 16:36:41 2013 +0530
>> >> Committer: Rohit Yadav <bh...@apache.org>
>> >> Committed: Mon Feb 11 16:42:48 2013 +0530
>> >>
>> >> ----------------------------------------------------------------------
>> >>  setup/db/4.1-new-db-schema.sql |    2 ++
>> >>  1 files changed, 2 insertions(+), 0 deletions(-)
>> >> ---------------------------------------------------------------------
>> >> -
>> >>
>> >>
>> >> http://git-wip-us.apache.org/repos/asf/incubator-
>> >> cloudstack/blob/e3156a6e/setup/db/4.1-new-db-schema.sql
>> >> ---------------------------------------------------------------------
>> >> - diff --git a/setup/db/4.1-new-db-schema.sql b/setup/db/4.1-new-db-
>> >> schema.sql index e8bafa2..d60eca2 100644
>> >> --- a/setup/db/4.1-new-db-schema.sql
>> >> +++ b/setup/db/4.1-new-db-schema.sql
>> >> @@ -15,6 +15,8 @@
>> >>  -- specific language governing permissions and limitations
>> >>  -- under the License.
>> >>
>> >> +use cloud;
>> >> +
>> >>  alter table vm_template add image_data_store_id bigint unsigned;
>> >> alter table vm_template add size bigint unsigned;  alter table
>> >> vm_template add state varchar(255);
>> >

RE: FW: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec statements

Posted by Hugo Trippaers <HT...@schubergphilis.com>.
Hmm..  I was pretty sure I removed all of them from the create-schema.sql already. Will take care of it tomorrow, it's my complaint so I should fix it ;-) I'm not caring that much about the "old" upgrade paths, I really hope nobody is using 2.0 anymore.

Hugo

> -----Original Message-----
> From: rohityadav89@gmail.com [mailto:rohityadav89@gmail.com] On Behalf
> Of Rohit Yadav
> Sent: Monday, February 11, 2013 5:39 PM
> To: Hugo Trippaers
> Cc: cloudstack-dev@incubator.apache.org
> Subject: Re: FW: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix
> 4.1-new-db-schema.sql, use cloud before exec statements
> 
> Hi Hugo,
> 
> > I don't think this is the right solution, we should not depend on the name of
> the database in the scripts themselves. All the other scripts use the prefix
> 'cloud.' to work around this. I would prefer it that way so admins can change
> stuff without have to go through the database scripts, like reading stuff into a
> test database.
> >
> 
> Okay, so should we change and fix this pattern in following files as well, they
> too depend on database name;
> 
> $ grep 'use cloud' -R
> ./4.1-new-db-schema.sql:use cloud;
> ./create-schema.sql:use cloud;
> ./data-20to21.sql:use cloud;
> ./postprocess-20to21.sql:use cloud;
> 
> You want to do it, else I can fix it tomorrow morning.
> 
> Cheers!
> 
> >
> >> -----Original Message-----
> >> From: bhaisaab@apache.org [mailto:bhaisaab@apache.org]
> >> Sent: Monday, February 11, 2013 12:13 PM
> >> To: cloudstack-commits@incubator.apache.org
> >> Subject: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix
> >> 4.1-new- db-schema.sql, use cloud before exec statements
> >>
> >> CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec
> >> statements
> >>
> >> Signed-off-by: Rohit Yadav <bh...@apache.org>
> >>
> >>
> >> Project:
> >> http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
> >> Commit: http://git-wip-us.apache.org/repos/asf/incubator-
> >> cloudstack/commit/e3156a6e
> >> Tree: http://git-wip-us.apache.org/repos/asf/incubator-
> >> cloudstack/tree/e3156a6e
> >> Diff: http://git-wip-us.apache.org/repos/asf/incubator-
> >> cloudstack/diff/e3156a6e
> >>
> >> Branch: refs/heads/4.1
> >> Commit: e3156a6e16cee9ffeb5d757dd8a775236127410f
> >> Parents: a880f47
> >> Author: Rohit Yadav <bh...@apache.org>
> >> Authored: Mon Feb 11 16:36:41 2013 +0530
> >> Committer: Rohit Yadav <bh...@apache.org>
> >> Committed: Mon Feb 11 16:42:48 2013 +0530
> >>
> >> ----------------------------------------------------------------------
> >>  setup/db/4.1-new-db-schema.sql |    2 ++
> >>  1 files changed, 2 insertions(+), 0 deletions(-)
> >> ---------------------------------------------------------------------
> >> -
> >>
> >>
> >> http://git-wip-us.apache.org/repos/asf/incubator-
> >> cloudstack/blob/e3156a6e/setup/db/4.1-new-db-schema.sql
> >> ---------------------------------------------------------------------
> >> - diff --git a/setup/db/4.1-new-db-schema.sql b/setup/db/4.1-new-db-
> >> schema.sql index e8bafa2..d60eca2 100644
> >> --- a/setup/db/4.1-new-db-schema.sql
> >> +++ b/setup/db/4.1-new-db-schema.sql
> >> @@ -15,6 +15,8 @@
> >>  -- specific language governing permissions and limitations
> >>  -- under the License.
> >>
> >> +use cloud;
> >> +
> >>  alter table vm_template add image_data_store_id bigint unsigned;
> >> alter table vm_template add size bigint unsigned;  alter table
> >> vm_template add state varchar(255);
> >

Re: FW: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec statements

Posted by Rohit Yadav <bh...@apache.org>.
Hi Hugo,

> I don't think this is the right solution, we should not depend on the name of the database in the scripts themselves. All the other scripts use the prefix 'cloud.' to work around this. I would prefer it that way so admins can change stuff without have to go through the database scripts, like reading stuff into a test database.
>

Okay, so should we change and fix this pattern in following files as
well, they too depend on database name;

$ grep 'use cloud' -R
./4.1-new-db-schema.sql:use cloud;
./create-schema.sql:use cloud;
./data-20to21.sql:use cloud;
./postprocess-20to21.sql:use cloud;

You want to do it, else I can fix it tomorrow morning.

Cheers!

>
>> -----Original Message-----
>> From: bhaisaab@apache.org [mailto:bhaisaab@apache.org]
>> Sent: Monday, February 11, 2013 12:13 PM
>> To: cloudstack-commits@incubator.apache.org
>> Subject: [1/2] git commit: refs/heads/4.1 - CLOUDSTACK-1226: Fix 4.1-new-
>> db-schema.sql, use cloud before exec statements
>>
>> CLOUDSTACK-1226: Fix 4.1-new-db-schema.sql, use cloud before exec
>> statements
>>
>> Signed-off-by: Rohit Yadav <bh...@apache.org>
>>
>>
>> Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
>> Commit: http://git-wip-us.apache.org/repos/asf/incubator-
>> cloudstack/commit/e3156a6e
>> Tree: http://git-wip-us.apache.org/repos/asf/incubator-
>> cloudstack/tree/e3156a6e
>> Diff: http://git-wip-us.apache.org/repos/asf/incubator-
>> cloudstack/diff/e3156a6e
>>
>> Branch: refs/heads/4.1
>> Commit: e3156a6e16cee9ffeb5d757dd8a775236127410f
>> Parents: a880f47
>> Author: Rohit Yadav <bh...@apache.org>
>> Authored: Mon Feb 11 16:36:41 2013 +0530
>> Committer: Rohit Yadav <bh...@apache.org>
>> Committed: Mon Feb 11 16:42:48 2013 +0530
>>
>> ----------------------------------------------------------------------
>>  setup/db/4.1-new-db-schema.sql |    2 ++
>>  1 files changed, 2 insertions(+), 0 deletions(-)
>> ----------------------------------------------------------------------
>>
>>
>> http://git-wip-us.apache.org/repos/asf/incubator-
>> cloudstack/blob/e3156a6e/setup/db/4.1-new-db-schema.sql
>> ----------------------------------------------------------------------
>> diff --git a/setup/db/4.1-new-db-schema.sql b/setup/db/4.1-new-db-
>> schema.sql index e8bafa2..d60eca2 100644
>> --- a/setup/db/4.1-new-db-schema.sql
>> +++ b/setup/db/4.1-new-db-schema.sql
>> @@ -15,6 +15,8 @@
>>  -- specific language governing permissions and limitations
>>  -- under the License.
>>
>> +use cloud;
>> +
>>  alter table vm_template add image_data_store_id bigint unsigned;  alter
>> table vm_template add size bigint unsigned;  alter table vm_template add
>> state varchar(255);
>