← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1769635] [NEW] Error:Access denied for user 'nova'@'%' to database 'nova_api_cell0'

 

Public bug reported:

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://docs.openstack.org/ocata/install-guide-rdo/nova-controller-install.html, I got the error below.
++++++++++++++++++++++++++++++++++++++++++
[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]/connection set in nova.conf?
Is the cell0 database connection URL correct?
Error: (pymysql.err.OperationalError) (1044, u"Access denied for user 'nova'@'%' to database 'nova_api_cell0'")
++++++++++++++++++++++++++++++++++++++++++

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]/connection is correctly set.
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://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
<class 'sqlalchemy.exc.OperationalError'> (HTTP 500) (Request-ID: req-3f7b8ee6-1939-442e-99a7-883cfc178cdd)
++++++++++++++++++++++++++++++++++++++++++

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-nova-common-15.1.0-1.el7.noarch
openstack-nova-conductor-15.1.0-1.el7.noarch
python-nova-15.1.0-1.el7.noarch
openstack-nova-scheduler-15.1.0-1.el7.noarch
openstack-nova-novncproxy-15.1.0-1.el7.noarch
openstack-nova-api-15.1.0-1.el7.noarch
openstack-nova-placement-api-15.1.0-1.el7.noarch
openstack-nova-console-15.1.0-1.el7.noarch
python2-novaclient-7.1.2-1.el7.noarch

** Affects: nova
     Importance: Undecided
         Status: New

** Attachment added: "nova.api.log"
   https://bugs.launchpad.net/bugs/1769635/+attachment/5135422/+files/nova.api.log

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1769635

Title:
  Error:Access denied for user 'nova'@'%' to database 'nova_api_cell0'

Status in OpenStack Compute (nova):
  New

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://docs.openstack.org/ocata/install-guide-rdo/nova-controller-install.html, I got the error below.
  ++++++++++++++++++++++++++++++++++++++++++
  [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]/connection set in nova.conf?
  Is the cell0 database connection URL correct?
  Error: (pymysql.err.OperationalError) (1044, u"Access denied for user 'nova'@'%' to database 'nova_api_cell0'")
  ++++++++++++++++++++++++++++++++++++++++++

  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]/connection is correctly set.
  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://bugs.launchpad.net/nova/ and attach the Nova API log if possible.
  <class 'sqlalchemy.exc.OperationalError'> (HTTP 500) (Request-ID: req-3f7b8ee6-1939-442e-99a7-883cfc178cdd)
  ++++++++++++++++++++++++++++++++++++++++++

  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-nova-common-15.1.0-1.el7.noarch
  openstack-nova-conductor-15.1.0-1.el7.noarch
  python-nova-15.1.0-1.el7.noarch
  openstack-nova-scheduler-15.1.0-1.el7.noarch
  openstack-nova-novncproxy-15.1.0-1.el7.noarch
  openstack-nova-api-15.1.0-1.el7.noarch
  openstack-nova-placement-api-15.1.0-1.el7.noarch
  openstack-nova-console-15.1.0-1.el7.noarch
  python2-novaclient-7.1.2-1.el7.noarch

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1769635/+subscriptions


Follow ups