[one-users] OpenNbula 3.0 migration: problem with onedb

Ruben Diez rdiez at cesga.es
Tue Oct 18 04:01:15 PDT 2011


Yes: it is populated:

mysql> select * from user_pool where oid=0;
+-----+-----------+------------------------------------------+---------+
| oid | user_name | password                                 | enabled |
+-----+-----------+------------------------------------------+---------+
|   0 | oneadmin  | 8944aada99d6d0122494dd0ac8129db653bc1f4a |       1 |
+-----+-----------+------------------------------------------+---------+
1 row in set (0.00 sec)


Carlos Martín Sánchez escribió:
> Hi,
>
> Is the DB in the new machine correctly populated?
> Can you manually perform a "select * from user_pool where oid=0;" ?
>
> I'm asking because the '-p' option of the mysql commands needs the 
> password right next to it, without any space; i.e. '-popennebula' 
> instead of '-p opennebula'
>
>
> In case any other user is in a similar situation, you can use the 
> onedb command to move the DB to the new mysql server using "onedb 
> backup" and "onedb restore".
>
> Regards.
> --
> Carlos Martín, MSc
> Project Engineer
> OpenNebula - The Open Source Toolkit for Cloud Computing
> www.OpenNebula.org 
> <http://www.opennebula.org/> | cmartin at opennebula.org 
> <mailto:cmartin at opennebula.org>
>
>
> On Tue, Oct 18, 2011 at 12:35 PM, Ruben Diez <rdiez at cesga.es 
> <mailto:rdiez at cesga.es>> wrote:
>
>     Hi:
>
>     We are attempt to migrate OpenNebula from 2.1.80 to 3.0....
>
>     But the new 3.0 OpenNebula was installed in a new machine.
>
>     For database migration, we have followed these steps:
>
>     1- In the old machine, we made a dump of the database:
>
>     mysqldump -h localhost -u oneadmin -p opennebula
>     >opennebula_2_database.mysq
>
>     2- In the new machine, we create the oneadmin user, an empty
>     opennebula database and grant privileges to user oneadmin on
>     database opennebula:
>
>     mysql> create user 'oneadmin'@'localhost' identified by 'XXXXX';
>     mysql> create database opennebula;
>     mysql> grant all privileges on opennebula.* to 'oneadmin'@'localhost';
>
>     3- Now, in the new machine, we restore the 2.1 version database:
>
>     mysql -h localhost -u oneadmin -p opennebula
>     <opennebula_2_database.mysql
>
>     4- The configuration of the database is set in the oned.conf file:
>
>     DB = [ backend = "mysql",
>           server  = "localhost",
>           port    = 0,
>           user    = "oneadmin",
>           passwd  = "XXXXX",
>           db_name = "opennebula" ]
>
>     5- Now, we attempt the database conversion: but it fails:
>
>     #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v                  
>                  Database schema does not look to be created by
>     OpenNebula: table user_pool is missing or empty.
>
>
>     We attempt to avoid oned.conf file, but also fails:
>
>     #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v  -u oneadmin -d
>     opennebula   MySQL Password:
>     MySQL option DBNAME is needed
>
>     #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v  -u root -d opennebula
>     MySQL Password:
>     MySQL option DBNAME is needed
>
>     #oneadmin at onesrv04:/srv/cloud$ onedb upgrade -v -P 3306 -S
>     localhost -u oneadmin -d opennebula
>     MySQL Password:
>     MySQL option DBNAME is needed
>
>
>     Any ideas about why the database migration fails??
>
>     Regards....
>
>     _______________________________________________
>     Users mailing list
>     Users at lists.opennebula.org <mailto:Users at lists.opennebula.org>
>     http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>
>




More information about the Users mailing list