Ask Your Question
0

Cinder and Nova keep creating .sqlite files?

asked 2014-04-15 04:06:34 -0500

Matteo gravatar image

updated 2014-04-15 04:12:30 -0500

I asked a question a few weeks ago. I had the problem that cinder and nova weren't able to write into my mysql db. The logs said that the attempts failed while trying to write into a readonly database. That wasn't the problem though. I've figured out that cinder and nova keep creating their .sqlite files in /var/lib/cinder|nova/ after running the command

cinder|nova-manage db sync

The result is that tables for cinder and nova aren't created. How can I solve this problem?

my api-paste.inis look like this (switching cinder for nova in the ini for nova and of course using a different password)

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
service_protocol = http
service_host = keystone01
service_port = 5000
auth_host = keystone01
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = 70c36bed72a866d7b701
signing_dir = /var/lib/cinder

and that's how the configs look like:

[DEFAULT]
rootwrap_config = /etc/cinder/rootwrap.conf
api_paste_confg = /etc/cinder/api-paste.ini
iscsi_helper = tgtadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
state_path = /var/lib/cinder
lock_path = /var/lock/cinder
volumes_dir = /var/lib/cinder/volumes
rpc_backend = cinder.openstack.common.rpc.impl_kombu
rabbit_host = rabbitmq01
rabbit_port = 5672
rabbit_userid = guest
rabbit_password = 57b3f5450c826b0118f0
volume_driver=cinder.volume.drivers.rbd.RBDDriver
rbd_pool=volumes
rbd_ceph_conf=/etc/ceph/ceph.conf
rbd_flatten_volume_from_snapshot=false
rbd_max_clone_depth=5
glance_api_version=2
rbd_user=cinder
rbd_secret_uuid=605e6b61-65b7-490c-aec1-c75c2892bfd8
backup_driver=cinder.backup.drivers.ceph
backup_ceph_conf=/etc/ceph/ceph.conf
backup_ceph_user=cinder-backup
backup_ceph_chunk_size=134217728
backup_ceph_pool=backups
backup_ceph_stripe_unit=0
backup_ceph_stripe_count=0
restore_discard_excess_bytes=true
[database]
connection = mysql://cinder:60f3945e2c4af64ab142@sqldb01/cinder

here passwords and user differs in nova again.

best regards Matteo

edit retag flag offensive close merge delete

Comments

Did you follow the installation guide for mysql?

http://docs.openstack.org/havana/inst...

Check your mysql configuration:

  • you must create the databases

    CREATE DATABASE cinder;

  • you must enable the mysql user from localhost and remote machines using:

    GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'localhost' IDENTIFIED BY 'cinderPWD';

    GRANT ALL PRIVILEGES ON cinder.* TO 'cinder'@'%' IDENTIFIED BY 'cinderPWD';

Antonio G. gravatar imageAntonio G. ( 2014-04-15 04:51:00 -0500 )edit

It seems that it isn't the manage db sync command particular. The sqlite file is created everytime if it not exist. I managed to figure out that nova-consoleauth is responsible for creating the file over and over if it's not there. When I stop the service the file keeps deleted. When I start db sync with consoleauth deactivated the sqlfile is wirten again though.

The DATABASE exist and I have rights with nova in mysql to create tables. I think mysql permissions aren't the thing what's wrong here.

Matteo gravatar imageMatteo ( 2014-04-15 05:11:23 -0500 )edit

Ok, so the problem may reside in your conf files. Please pastebin them ( paste.openstack.org ) in order to have a look to your configuration.

For nova please paste nova.conf and api-paste.ini, for cinder cinder.conf.

Antonio G. gravatar imageAntonio G. ( 2014-04-15 05:48:32 -0500 )edit

Sure I can do this.

  • Cinder.conf: http://paste.openstack.org/show/75759/
  • cinder api-paste.ini: http://paste.openstack.org/show/75760/
  • nova.conf: http://paste.openstack.org/show/75763/
  • nova api-paste.ini: http://paste.openstack.org/show/75764/
Matteo gravatar imageMatteo ( 2014-04-15 07:01:10 -0500 )edit
1

It seems correct. I only see minor differences in my configuration;

You could try:

  • move the [keystone_authtoken] part before [database] one in nova.conf.

You could also try adding these lines to your nova.conf file:

backend=mysql
connection_trace=True
connection_debug=100

as stated in http://docs.openstack.org/havana/conf...

Then retry db init with debug option enabled:

nova-manage -d db sync

Let us know...

Antonio G. gravatar imageAntonio G. ( 2014-04-15 08:42:29 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-04-17 05:06:53 -0500

Matteo gravatar image

The problem wasn't cinder neither was nova. The problem was my ubuntu version. I'm running OpenStack on a 13.04 Ubuntu Server. But for 13.04 there aren't the most current packages available and the command

add-apt-repository cloud-archive:havana

doesn't work. I had to run following command to add the repository

echo deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/havana main >> /etc/apt/sources.list.d/havana.list

After running the command and updating the required packages there weren't any sqlite files created anymore.

Perhaps the package repository should be available for 13.04 as well.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

3 followers

Stats

Asked: 2014-04-15 04:06:34 -0500

Seen: 803 times

Last updated: Apr 17 '14