cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Olivier Lamy <ol...@apache.org>
Subject Re: Cloudstack dev Noob start :-)
Date Wed, 12 Jul 2017 11:42:26 GMT
Hi
Yes I dropped all databases.
But I was trying to create manually by myself all the databases and initial
schemas manually..
Well finally reading the thread "Developer Guide - Current Setup Guide"
helped me and I found what I missed to do :-) (sorry for the noise)

As a starter I'd like to know if you have any issue flagged as
"starter/noob" level? (just some easy issue I could have a look to discover
the code)
Thanks!

Cheers
Olivier

On 11 July 2017 at 00:56, Daan Hoogland <daan.hoogland@gmail.com> wrote:

> Oliver, I am pretty sure you where having a mysql version error at
> first. This one is new to me. Did you fully remove mysql and the cloud
> database and then install mariadb? Maybe you can drop all tables and
> run the mvn command for installing a db instead of the create db
> script. just for checking
>
> On Mon, Jul 10, 2017 at 9:39 AM, Olivier Lamy <olamy@apache.org> wrote:
> > Hi
> > Looks more to be a permission issue
> > Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
> ALTER
> > command denied to user 'cloud'@'localhost' for table 'account'
> >
> > When running create-database script I get this warning.
> >
> > sql> GRANT ALL ON cloud.* to cloud@`%` identified by 'cloud'
> > [2017-07-07 09:47:56] [HY000][1287] Using GRANT statement to modify
> > existing user's properties other than privileges is deprecated and will
> be
> > removed in future release. Use ALTER USER statement for this operation.
> >
> > Anyway I changed to MariaBD and made some progress :-)  but still an
> error.
> >
> > My steps:
> >
> > * running the following scripts to create databases: create-database.sql,
> > create-database-premium.sql, create-database-simulator.sql.
> >
> > * running the following scripts to create base schemas:
> create-schema.sql,
> > create-schema-premium.sql, create-schema-simulator.sql
> >
> > * start the ui with mvn -pl :cloud-client-ui jetty:run
> >
> > But now it fail with (stack trace truncated but full available here:
> > https://gist.github.com/olamy/b13e5f831b933829dd2ced7ddb5dc59b
> >
> > INFO  [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Cleanup upgrade
> > Upgrade441to442 to upgrade from 4.4.1-4.4.2 to 4.4.2
> >
> > ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:) Error executing: ALTER
> > TABLE `cloud`.`guest_os_hypervisor` ADD FOREIGN KEY (`guest_os_id`)
> > REFERENCES `cloud`.`guest_os`(`id`)
> >
> > ERROR [c.c.u.d.ScriptRunner] (main:null) (logid:)
> > com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViol
> ationException:
> > Cannot add or update a child row: a foreign key constraint fails
> > (`cloud`.`#sql-882f_27`, CONSTRAINT `#sql-882f_27_ibfk_1` FOREIGN KEY
> > (`guest_os_id`) REFERENCES `guest_os` (`id`))
> >
> > ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to
> execute
> > upgrade script:
> > /Users/olamy/dev/sources/open-sources/cloudstack/cloudstack/
> client/target/utilities/scripts/db/db/schema-442to450.sql
> >
> > com.mysql.jdbc.exceptions.jdbc4.MySQLIntegrityConstraintViol
> ationException:
> > Cannot add or update a child row: a foreign key constraint fails
> > (`cloud`.`#sql-882f_27`, CONSTRAINT `#sql-882f_27_ibfk_1` FOREIGN KEY
> > (`guest_os_id`) REFERENCES `guest_os` (`id`))
> >
> > ERROR [c.c.u.DatabaseUpgradeChecker] (main:null) (logid:) Unable to
> upgrade
> > the database
> >
> > com.cloud.utils.exception.CloudRuntimeException: Unable to execute
> upgrade
> > script:
> > /Users/olamy/dev/sources/open-sources/cloudstack/cloudstack/
> client/target/utilities/scripts/db/db/schema-442to450.sql
> >
> > Not sure what to do here :-(
> >
> > On 6 July 2017 at 19:22, Wido den Hollander <wido@widodh.nl> wrote:
> >
> >>
> >> > Op 6 juli 2017 om 9:02 schreef Olivier Lamy <olamy@apache.org>:
> >> >
> >> >
> >> > Hi,
> >> > Long time I didn't participate here.
> >> > I'd like to do some hacking.
> >> > I'm not clear on the process for noob :-)
> >> > I ran sql scripts:
> >> > * create-database.sql
> >> > * create-schema.sql
> >> >
> >> > Then I start with mvn -pl :cloud-client-ui jetty:run
> >> > But I got the this error (see stacktrace below)
> >> > I use osx, mysql 5.7.18_1 installed with brew
> >> >
> >> > Thanks a lot for your help
> >> >
> >> > Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to
> >> > upgrade the database
> >> >
> >> > at
> >> > com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpg
> >> radeChecker.java:438)
> >> >
> >> > at
> >> > com.cloud.upgrade.DatabaseUpgradeChecker.check(DatabaseUpgra
> >> deChecker.java:509)
> >> >
> >> > at
> >> > org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLif
> >> eCycle.checkIntegrity(CloudStackExtendedLifeCycle.java:65)
> >> >
> >> > at
> >> > org.apache.cloudstack.spring.lifecycle.CloudStackExtendedLif
> >> eCycle.start(CloudStackExtendedLifeCycle.java:55)
> >> >
> >> > at
> >> > org.springframework.context.support.DefaultLifecycleProcesso
> >> r.doStart(DefaultLifecycleProcessor.java:173)
> >> >
> >> > ... 70 more
> >> >
> >> > Caused by: com.cloud.utils.exception.CloudRuntimeException: Unable to
> >> > execute upgrade script:
> >> > /Users/olamy/dev/sources/open-sources/cloudstack/cloudstack/
> >> client/target/utilities/scripts/db/db/schema-410to420.sql
> >> >
> >> > at
> >> > com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseU
> >> pgradeChecker.java:331)
> >> >
> >> > at
> >> > com.cloud.upgrade.DatabaseUpgradeChecker.upgrade(DatabaseUpg
> >> radeChecker.java:425)
> >> >
> >> > ... 74 more
> >> >
> >> > Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException:
> >> ALTER
> >> > command denied to user 'cloud'@'localhost' for table 'account'
> >> >
> >>
> >> I see a access denied. Could you check the access credentials of the
> user
> >> in MySQL?
> >>
> >> Wido
> >>
> >> > at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:185)
> >> >
> >> > at com.cloud.utils.db.ScriptRunner.runScript(ScriptRunner.java:87)
> >> >
> >> > at
> >> > com.cloud.upgrade.DatabaseUpgradeChecker.runScript(DatabaseU
> >> pgradeChecker.java:322)
> >> > Cheers
> >> > --
> >> > Olivier Lamy
> >> > http://twitter.com/olamy | http://linkedin.com/in/olamy
> >>
> >
> >
> >
> > --
> > Olivier Lamy
> > http://twitter.com/olamy | http://linkedin.com/in/olamy
>
>
>
> --
> Daan
>



-- 
Olivier Lamy
http://twitter.com/olamy | http://linkedin.com/in/olamy

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message