Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6A68AED0C for ; Mon, 25 Feb 2013 07:20:20 +0000 (UTC) Received: (qmail 36552 invoked by uid 500); 25 Feb 2013 07:20:20 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 36496 invoked by uid 500); 25 Feb 2013 07:20:19 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 36487 invoked by uid 99); 25 Feb 2013 07:20:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 07:20:19 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rohityadav89@gmail.com designates 209.85.215.174 as permitted sender) Received: from [209.85.215.174] (HELO mail-ea0-f174.google.com) (209.85.215.174) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Feb 2013 07:20:15 +0000 Received: by mail-ea0-f174.google.com with SMTP id 1so1085904eaa.33 for ; Sun, 24 Feb 2013 23:19:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type; bh=ve63MXOgmKaQVdKoccvugSq8OO/h7WDiNoqmEqwwA9Q=; b=S6NZcsLWDiW3DcHF3DSunNaCLX5MH9sbMtsAbHXG9oyY5OvodeNeljruaqaruPzwwo FKInXel9BcsTsmPUhAOB9KbQIRIMINwTtSRxxyg8k7RCHqt+NDkxUwDFl5BNePXiti/Z iK/iHXuxUcHnTdd6Xgy5Zv+Eo1gQC0PsxOj7cakktMs6T4ZZKUNs/+gF9Niwno31kZdF UPvkB5sw8ajDDnSFA/6xjrQ5LrZRwvM4KSRozD30tZlOG0YbT94NNY5l+dQZf6yCHwNs B4KFk//XWbViMzM3to1TgIQwBp9K5HVXaQBySc4MLuu3/jgky4WRGTweiE6L0IlEjb9c SkLg== X-Received: by 10.14.193.134 with SMTP id k6mr35944714een.37.1361776793876; Sun, 24 Feb 2013 23:19:53 -0800 (PST) MIME-Version: 1.0 Sender: rohityadav89@gmail.com Received: by 10.223.155.141 with HTTP; Sun, 24 Feb 2013 23:19:33 -0800 (PST) In-Reply-To: References: <93099572B72EB341B81A644E134F240B012F750D7A92@SJCPMAILBOX01.citrite.net> <93099572B72EB341B81A644E134F240B012F7592C99C@SJCPMAILBOX01.citrite.net> <93099572B72EB341B81A644E134F240B012F7592C9A5@SJCPMAILBOX01.citrite.net> <031222CBCF33214AB2EB4ABA279428A3012CABCF83AC@SJCPMAILBOX01.citrite.net> From: Rohit Yadav Date: Mon, 25 Feb 2013 12:49:33 +0530 X-Google-Sender-Auth: MJ-wBNdZmU6wRXLpdNIXAM2FWx0 Message-ID: Subject: Re: Upgrade path for db To: cloudstack-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org Thanks for confirming Gavin, it was a path issue. Will write wiki on database deployment this week if I get time from bugs/fixes/blockers and pending stuff for 4.1 Regards. On Mon, Feb 25, 2013 at 12:27 PM, Gavin Lee wrote: > Thanks Rohit for the quick fix, the latest code now can pass the > developer and deploydb build. > > > On Mon, Feb 25, 2013 at 9:54 AM, Rohit Yadav wrote: >> Hi Gavin, will look into this issue today. I think it's mostly a >> classpath issue, for some reason the utilities/scripts/db is not on >> classpath. Last time I checked, I fixed that in appConfig of >> client/pom.xml. >> >> Regards. >> >> On Mon, Feb 25, 2013 at 7:19 AM, Gavin Lee wrote: >>> Hi, Alex >>> Using following command: >>> bash$ mvn -P developer -pl developer,tools/devcloud -Ddeploydb -e -X >>> >>> The error log attached in this link: >>> http://pastebin.com/01qjFij4 >>> >>> >>> >>> On Mon, Feb 25, 2013 at 8:59 AM, Alex Huang wrote: >>>> Hi Gavin, >>>> >>>> I redeploy with commit id ac1b529f784d865a0c443c3da0367a22902ed5a2 with the following two commands and it works fine. >>>> >>>> mvn clean install -P developer,systemvm >>>> mvn -P developer -pl developer,tools/devcloud -Ddeploydb >>>> >>>> --Alex >>>> >>>>> -----Original Message----- >>>>> From: Alex Huang [mailto:Alex.Huang@citrix.com] >>>>> Sent: Sunday, February 24, 2013 12:24 PM >>>>> To: cloudstack-dev@incubator.apache.org >>>>> Subject: RE: Upgrade path for db >>>>> >>>>> Hi Gavin, >>>>> >>>>> Can you send me the output from >>>>> >>>>> Mvn -X -e -pl developer,tools/devcloud -Ddeploydb -P developer >>>>> >>>>> Thanks. >>>>> >>>>> --Alex >>>>> >>>>> > -----Original Message----- >>>>> > From: Gavin Lee [mailto:gavin.lxh@gmail.com] >>>>> > Sent: Sunday, February 24, 2013 6:20 AM >>>>> > To: cloudstack-dev@incubator.apache.org >>>>> > Subject: Re: Upgrade path for db >>>>> > >>>>> > Still need to copy setup/db/db to project base dir to pass following build: >>>>> > bash$ mvn -pl developer,tools/devcloud -Ddeploydb -P developer >>>>> > >>>>> > If not, the error message is: >>>>> > >>>>> > 2013-02-24 22:15:44,656 WARN [utils.script.Script] >>>>> > (com.cloud.upgrade.DatabaseCreator.main():) Unable to find script >>>>> > db/schema-40to410.sql >>>>> > 2013-02-24 22:15:44,657 DEBUG [db.Transaction.Transaction] >>>>> > (com.cloud.upgrade.DatabaseCreator.main():) Rolling back the >>>>> > transaction: Time = 8 Name = >>>>> > -DatabaseCreator.main:196-NativeMethodAccessorImpl.invoke0:-2- >>>>> > NativeMethodAccessorImpl.invoke:39- >>>>> > DelegatingMethodAccessorImpl.invoke:25-Method.invoke:597- >>>>> > ExecJavaMojo$1.run:297-Thread.run:680; >>>>> > called by -Transaction.rollback:890-Transaction.removeUpTo:833- >>>>> > Transaction.close:657-DatabaseUpgradeChecker.upgrade:262- >>>>> > DatabaseUpgradeChecker.check:357-DatabaseCreator.main:209- >>>>> > NativeMethodAccessorImpl.invoke0:-2- >>>>> > NativeMethodAccessorImpl.invoke:39- >>>>> > DelegatingMethodAccessorImpl.invoke:25-Method.invoke:597- >>>>> > ExecJavaMojo$1.run:297-Thread.run:680 >>>>> > [WARNING] >>>>> > java.lang.reflect.InvocationTargetException >>>>> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) >>>>> > at >>>>> > >>>>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.j >>>>> > ava:39) >>>>> > at >>>>> > >>>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces >>>>> > sorImpl.java:25) >>>>> > at java.lang.reflect.Method.invoke(Method.java:597) >>>>> > at >>>>> > org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:297) >>>>> > at java.lang.Thread.run(Thread.java:680) >>>>> > Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to >>>>> > find db/schema-40to410.sql >>>>> > at >>>>> > >>>>> com.cloud.upgrade.dao.Upgrade40to41.getPrepareScripts(Upgrade40to41.ja >>>>> > va:57) >>>>> > at >>>>> > >>>>> com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpgradeCh >>>>> > ecker.java:229) >>>>> > at >>>>> > >>>>> com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgradeChec >>>>> > ker.java:357) >>>>> > at >>>>> > com.cloud.upgrade.DatabaseCreator.main(DatabaseCreator.java:209) >>>>> > >>>>> > On Sun, Feb 24, 2013 at 11:31 AM, Alex Huang >>>>> > wrote: >>>>> > > I reverted 5b760f903f1a3145f62d05c1d3c142b710248026 again. It all >>>>> > > works >>>>> > now. >>>>> > > >>>>> > > --Alex >>>>> > > >>>>> > >> -----Original Message----- >>>>> > >> From: Min Chen [mailto:min.chen@citrix.com] >>>>> > >> Sent: Friday, February 22, 2013 9:46 PM >>>>> > >> To: cloudstack-dev@incubator.apache.org >>>>> > >> Subject: RE: Upgrade path for db >>>>> > >> >>>>> > >> My last commit 5b760f903f1a3145f62d05c1d3c142b710248026 is >>>>> reverted >>>>> > >> in master. To conclude this thread, this is not an issue for >>>>> > >> developer. Just previous db behavior is changed a bit. Previously, >>>>> > >> after running deployDB, we will be able to see all db schema >>>>> > >> created for the branch we work on. Now with new db sql >>>>> > >> reorganization, we will only be able to see all db schema created after >>>>> running MS first time. >>>>> > >> >>>>> > >> -min >>>>> > >> ________________________________________ >>>>> > >> From: Min Chen [min.chen@citrix.com] >>>>> > >> Sent: Friday, February 22, 2013 9:27 PM >>>>> > >> To: cloudstack-dev@incubator.apache.org >>>>> > >> Cc: cloudstack-dev@incubator.apache.org >>>>> > >> Subject: Re: Upgrade path for db >>>>> > >> >>>>> > >> Hi vijay, >>>>> > >> >>>>> > >> As I mentioned in my previous email, the commit didn't >>>>> > >> completely fix the problem, which requires a manual workaround to >>>>> > >> copy db folder before running deploy db. I checked it in to unblock >>>>> > >> you. Since now we realized that starting MS can fix the db >>>>> > >> problem, I will >>>>> > revert my commit. >>>>> > >> >>>>> > >> -min >>>>> > >> >>>>> > >> Sent from my iPhone >>>>> > >> >>>>> > >> On Feb 22, 2013, at 7:07 PM, "Vijayendra Bhamidipati" >>>>> > >> wrote: >>>>> > >> >>>>> > >> > I spoke too soon - I hadn't realized I was in another branch when >>>>> > >> > my setup >>>>> > >> worked, and the branch didn't have your fix.. now on master, I >>>>> > >> actually am hitting the exception you mentioned (of not finding the >>>>> > >> scripts) with the fix in place and if I revert it, I'm not seeing >>>>> > >> it anymore.. any chance you may be missing something else in your >>>>> setup?? >>>>> > >> > >>>>> > >> > Regards, >>>>> > >> > Vijay >>>>> > >> > >>>>> > >> > -----Original Message----- >>>>> > >> > From: Vijayendra Bhamidipati >>>>> > >> > [mailto:vijayendra.bhamidipati@citrix.com] >>>>> > >> > Sent: Friday, February 22, 2013 6:36 PM >>>>> > >> > To: cloudstack-dev@incubator.apache.org >>>>> > >> > Subject: RE: Upgrade path for db >>>>> > >> > >>>>> > >> > Hi Min! >>>>> > >> > >>>>> > >> > Actually I just tried this out and it did invoke the upgrade >>>>> > >> > scripts when I ran >>>>> > >> the jetty server to bring up the mgmt. server.. I hadn't copied >>>>> > >> over the setup/db/db directory either.. did a fresh db deploy and >>>>> > >> ran the >>>>> > mgmt. >>>>> > >> server.. thanks for fixing the db checker invocation! >>>>> > >> > >>>>> > >> > Cheers! >>>>> > >> > Regards, >>>>> > >> > Vijay >>>>> > >> > >>>>> > >> > >>>>> > >> > -----Original Message----- >>>>> > >> > From: Min Chen [mailto:min.chen@citrix.com] >>>>> > >> > Sent: Friday, February 22, 2013 6:07 PM >>>>> > >> > To: cloudstack-dev@incubator.apache.org >>>>> > >> > Subject: Re: Upgrade path for db >>>>> > >> > >>>>> > >> > Yes, I am running into the same issue. The problem is that >>>>> > >> > DatabaseCreator is not currently invoking DatabaseUpgradeChecker. >>>>> > >> > I just checked in Commit >>>>> > >> > 5b760f903f1a3145f62d05c1d3c142b710248026 to address this issue, >>>>> > >> > but still >>>>> > >> have one issue pending solution, that is, how to tell >>>>> > >> DatabaseCreator to look into setup/db folder to look for those sql script >>>>> in pom.xml. >>>>> > >> So far we haven't found a solution yet. A temporary workaround is >>>>> > >> to copy setup/db/db to your project basedir. >>>>> > >> > >>>>> > >> > Thanks >>>>> > >> > -min >>>>> > >> > >>>>> > >> > On 2/22/13 3:13 PM, "Vijayendra Bhamidipati" >>>>> > >> > wrote: >>>>> > >> > >>>>> > >> >> How exactly are db upgrade scripts kicked off during a fresh db >>>>> > >> >> install on the master branch? >>>>> > >> >> >>>>> > >> >> When I deploy a fresh db off the ACS master using : mvn -e -P >>>>> > >> >> developer -pl developer -Ddeploydb, I don't see the tables >>>>> > >> >> specified in setup/db/db/schema-40to410.sql or >>>>> > setup/db/db/schema- >>>>> > >> 410to420.sql >>>>> > >> >> getting created. >>>>> > >> >> >>>>> > >> >> The version in the create-schema.sql is 4.0.0 and the same shows >>>>> > >> >> up in the newly created db when I do a select * from version; >>>>> > >> >> >>>>> > >> >> How do I ensure that when deploying a fresh db, the tables >>>>> > >> >> specified in schema40to410.sql and schema-410to420.sql get created? >>>>> > >> >> >>>>> > >> >> Regards, >>>>> > >> >> Vijay >>>>> > >> > >>>>> > >>>>> > >>>>> > >>>>> > -- >>>>> > Gavin >>> >>> >>> >>> -- >>> Gavin > > > > -- > Gavin