Error:Access denied for user 'nova'@'%' to database 'nova_api_cell0'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Compute (nova) |
Invalid
|
Undecided
|
Unassigned |
Bug Description
Description
===========
My Openstack controller and compute node are installed on centOS7.
Everything is fine until I run "su -s /bin/sh -c "nova-manage db sync" nova" as indicated in the online Doc:https:/
+++++++
[root@server ~]# su -s /bin/sh -c "nova-manage db sync" nova
ERROR: Could not access cell0.
Has the nova_api database been created?
Has the nova_cell0 database been created?
Has "nova-manage api_db sync" been run?
Has "nova-manage cell_v2 map_cell0" been run?
Is [api_database]
Is the cell0 database connection URL correct?
Error: (pymysql.
+++++++
I'm sure nova_api and nova_cell0 has been created, and "nova-manage api_db sync" and "nova-manage cell_v2 map_cell0" ran successfully. Also in nova.conf, [api_database]
But I logged into the mysql,show databases and there is no such database nova_api_cell0.
I then moved on to next steps. All are fine until launching an instance. Error below.
+++++++
[root@server ~]# openstack server list
Unexpected API Error. Please report this at http://
<class 'sqlalchemy.
+++++++
I also found the same error "Access denied for user 'nova'@'%' to database 'nova_api_cell0'" in nova.api.log
Can someone tell me why I run into this error? Many thanks in advance.
Environment
===========
root@server ~]# rpm -qa | grep nova
openstack-
openstack-
python-
openstack-
openstack-
openstack-
openstack-
openstack-
python2-
nova.conf:
==================
[root@server ~]# grep -v '^#' /etc/nova/nova.conf | grep -v '^$' driver= nova.virt. firewall. NoopFirewallDri ver apis=osapi_ compute, metadata //openstack: aaa123@ server keystone //nova: aaa123@ server/ nova_api //nova: aaa123@ server/ nova storage_ encryption] server: 9292 authtoken] server: 5000 server: 35357 server: 9696 server: 35357 metadata_ proxy = true proxy_shared_ secret = aaa123 /var/lib/ nova/tmp _amqp] _kafka] _notifications] _rabbit] _zmq] server: 35357/v3 dynamic_ auth] listen= $my_ip proxyclient_ address= $my_ip
[DEFAULT]
use_neutron = True
my_ip=192.168.56.10
firewall_
enabled_
transport_url = rabbit:
[api]
auth_strategy=
[api_database]
connection = mysql+pymysql:
[barbican]
[cache]
[cells]
[cinder]
[cloudpipe]
[conductor]
[console]
[consoleauth]
[cors]
[cors.subdomain]
[crypto]
[database]
connection = mysql+pymysql:
[ephemeral_
[filter_scheduler]
[glance]
api_servers = http://
[guestfs]
[healthcheck]
[hyperv]
[image_file_url]
[ironic]
[key_manager]
[keystone_
auth_uri = http://
auth_url = http://
memcached_servers = server:11211
auth_type = password
project_domain_name = default
user_domain_name = default
project_name = service
username = nova
password = aaa123
[libvirt]
[matchmaker_redis]
[metrics]
[mks]
[neutron]
url = http://
auth_url = http://
auth_type = password
project_domain_name = default
user_domain_name = default
region_name = RegionOne
project_name = service
username = neutron
password = aaa123
service_
metadata_
[notifications]
[osapi_v21]
[oslo_concurrency]
lock_path=
[oslo_messaging
[oslo_messaging
[oslo_messaging
[oslo_messaging
[oslo_messaging
[oslo_middleware]
[oslo_policy]
[pci]
[placement]
os_region_name = RegionOne
project_domain_name = Default
project_name = service
auth_type = password
user_domain_name = Default
auth_url = http://
username = placement
password = aaa123
[quota]
[rdp]
[remote_debug]
[scheduler]
[serial_console]
[service_user]
[spice]
[ssl]
[trusted_computing]
[upgrade_levels]
[vendordata_
[vmware]
[vnc]
enabled=true
vncserver_
vncserver_
[workarounds]
[wsgi]
[xenserver]
[xvp]
databases:
==================
MariaDB [(none)]> show databases; ------- ------- + ------- ------- + ------- ------- +
+------
| Database |
+------
| glance |
| information_schema |
| keystone |
| mysql |
| neutron |
| nova |
| nova_api |
| nova_cell0 |
| performance_schema |
| test |
+------
10 rows in set (0.00 sec)