Comment 13 for bug 1649341

Revision history for this message
Steven Hardy (shardy) wrote :

It seems that simple_cell_setup is not idempotent if there's permissions issues with the DB:

[stack@instack ~]$ sudo nova-manage cell_v2 simple_cell_setup --transport-url "rabbit://55f7b1c2b4ee0e8a4f8311de334c6b71d13c1b45:1cf85a15b3fb0d86ec3bda2dedd3b8952ad6d72a@192.0.2.1//"
error: (pymysql.err.OperationalError) (1044, u"Access denied for user 'nova_api'@'192.0.2.1' to database 'nova_api_cell0'")
[stack@instack ~]$ sudo nova-manage cell_v2 simple_cell_setup --transport-url "rabbit://55f7b1c2b4ee0e8a4f8311de334c6b71d13c1b45:1cf85a15b3fb0d86ec3bda2dedd3b8952ad6d72a@192.0.2.1//"
Already setup, nothing to do.

In this case I forgot to grant the nova_api user access to the new nova_api_cell0 DB and got the above confusing result.

The fix is:

1. Create a new database nova_api_cell0
2. Grant the nova_api user all privileges on the new DB
3. Run sudo nova-manage cell_v2 simple_cell_setup --transport-url "rabbit://55f7b1c2b4ee0e8a4f8311de334c6b71d13c1b45:1cf85a15b3fb0d86ec3bda2dedd3b8952ad6d72a@192.0.2.1//"
4. sudo /usr/bin/nova-manage api_db sync