Ask Your Question
0

Caught error: (ProgrammingError) (1146, "Table 'cinder.volumes' doesn't exist")

asked 2014-06-11 09:14:43 -0500

jscheponik gravatar image

So I am having issues with getting cinder volumes to create. I run the command and the volume sits and creating indefinitely. I see this error in cinder-api.log:

 ERROR cinder.api.middleware.fault [req-57d935ef-1268-4749-adcb-ab409ecdd72c 1a7896d255cf403a8a6ef4f06834d990 0d788298788f4128bbb1a6f3a1b39034 - - -] Caught error: (ProgrammingError) (1146, "Table 'cinder.volumes' doesn't exist") 'SELECT anon_1.volumes_created_at AS anon_1_volumes_created_at, anon_1.volumes_updated_at AS anon_1_volumes_updated_at, anon_1.volumes_deleted_at AS anon_1_volumes_deleted_at, anon_1.volumes_id AS anon_1_volumes_id, anon_1.volumes__name_id AS anon_1_volumes__name_id, anon_1.volumes_ec2_id AS anon_1_volumes_ec2_id, anon_1.volumes_user_id AS anon_1_volumes_user_id, anon_1.volumes_project_id AS anon_1_volumes_project_id, anon_1.volumes_snapshot_id AS anon_1_volumes_snapshot_id, anon_1.volumes_host AS anon_1_volumes_host, anon_1.volumes_size AS anon_1_volumes_size, anon_1.volumes_availability_zone AS anon_1_volumes_availability_zone, anon_1.volumes_instance_uuid AS anon_1_volumes_instance_uuid, anon_1.volumes_attached_host AS anon_1_volumes_attached_host, anon_1.volumes_mountpoint AS anon_1_volumes_mountpoint, anon_1.volumes_attach_time AS anon_1_volumes_attach_time, anon_1.volumes_status AS anon_1_volumes_status, anon_1.volumes_attach_status AS anon_1_volumes_attach_status, anon_1.volumes_migration_status AS anon_1_volumes_migration_status, anon_1.volumes_scheduled_at AS anon_1_volumes_scheduled_at, anon_1.volumes_launched_at AS anon_1_volumes_launched_at, anon_1.volumes_terminated_at AS anon_1_volumes_terminated_at, anon_1.volumes_display_name AS anon_1_volumes_display_name, anon_1.volumes_display_description AS anon_1_volumes_display_description, anon_1.volumes_provider_location AS anon_1_volumes_provider_location, anon_1.volumes_provider_auth AS anon_1_volumes_provider_auth, anon_1.volumes_provider_geometry AS anon_1_volumes_provider_geometry, anon_1.volumes_volume_type_id AS anon_1_volumes_volume_type_id, anon_1.volumes_source_volid AS anon_1_volumes_source_volid, anon_1.volumes_encryption_key_id AS anon_1_volumes_encryption_key_id, anon_1.volumes_deleted AS anon_1_volumes_deleted, anon_1.volumes_bootable AS anon_1_volumes_bootable, volume_admin_metadata_1.created_at AS volume_admin_metadata_1_created_at, volume_admin_metadata_1.updated_at AS volume_admin_metadata_1_updated_at, volume_admin_metadata_1.deleted_at AS volume_admin_metadata_1_deleted_at, volume_admin_metadata_1.deleted AS volume_admin_metadata_1_deleted, volume_admin_metadata_1.id AS volume_admin_metadata_1_id, volume_admin_metadata_1.`key` AS volume_admin_metadata_1_key, volume_admin_metadata_1.value AS volume_admin_metadata_1_value, volume_admin_metadata_1.volume_id AS volume_admin_metadata_1_volume_id, volume_types_1.created_at AS volume_types_1_created_at, volume_types_1.updated_at AS volume_types_1_updated_at, volume_types_1.deleted_at AS volume_types_1_deleted_at, volume_types_1.deleted AS volume_types_1_deleted, volume_types_1.id AS volume_types_1_id, volume_types_1.name AS volume_types_1_name, volume_types_1.qos_specs_id AS volume_types_1_qos_specs_id, volume_metadata_1.created_at AS volume_metadata_1_created_at, volume_metadata_1.updated_at AS volume_metadata_1_updated_at, volume_metadata_1.deleted_at AS volume_metadata_1_deleted_at, volume_metadata_1.deleted AS volume_metadata_1_deleted, volume_metadata_1.id AS volume_metadata_1_id, volume_metadata_1.`key` AS volume_metadata_1_key, volume_metadata_1.value AS volume_metadata_1_value, volume_metadata_1.volume_id AS volume_metadata_1_volume_id \nFROM (SELECT volumes.created_at AS volumes_created_at, volumes.updated_at AS volumes_updated_at, volumes.deleted_at AS volumes_deleted_at, volumes.id AS volumes_id, volumes._name_id AS volumes__name_id, volumes.ec2_id AS volumes_ec2_id, volumes.user_id AS volumes_user_id, volumes.project_id AS volumes_project_id, volumes.snapshot_id AS volumes_snapshot_id, volumes.host AS volumes_host, volumes.size AS volumes_size, volumes.availability_zone AS volumes_availability_zone, volumes.instance_uuid AS volumes_instance_uuid, volumes.attached_host AS volumes_attached_host, volumes.mountpoint AS volumes_mountpoint, volumes.attach_time AS volumes_attach_time, volumes.status AS volumes_status, volumes.attach_status AS volumes_attach_status, volumes.migration_status AS volumes_migration_status, volumes.scheduled_at AS volumes_scheduled_at, volumes.launched_at AS volumes_launched_at, volumes.terminated_at AS volumes_terminated_at, volumes.display_name AS volumes_display_name, volumes.display_description AS volumes_display_description, volumes.provider_location AS volumes_provider_location, volumes.provider_auth AS volumes_provider_auth, volumes.provider_geometry AS volumes_provider_geometry, volumes.volume_type_id AS volumes_volume_type_id, volumes.source_volid AS volumes_source_volid, volumes.encryption_key_id AS volumes_encryption_key_id, volumes.deleted AS volumes_deleted, volumes.bootable AS volumes_bootable \nFROM volumes \nWHERE volumes.deleted = false AND volumes.id = %s \n LIMIT %s) AS anon_1 LEFT OUTER JOIN volume_admin_metadata AS volume_admin_metadata_1 ON volume_admin_metadata_1.volume_id = anon_1.volumes_id AND volume_admin_metadata_1.deleted = false LEFT OUTER JOIN volume_types AS volume_types_1 ON anon_1.volumes_volume_type_id = volume_types_1.id AND volume_types_1.deleted = false LEFT OUTER JOIN volume_metadata AS volume_metadata_1 ON volume_metadata_1.volume_id = anon_1.volumes_id AND volume_metadata_1.deleted = false' ('6184acce-8841-44da-acca-0225b5695d9a', 1)
2014-06-11 09:49:16.744 28831 TRACE cinder.api.middleware.fault     self.errorhandler(self, exc, value)
2014-06-11 09:49:16.744 28831 TRACE cinder.api.middleware.fault   File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler ...
(more)
edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-06-11 10:56:16 -0500

Cristi Falcas gravatar image

Is this a new install? If not, someone probably deleted that table.

Check like this:

cat /etc/cinder/cinder.conf | grep -i "^sql_connection"

mysql -u cinder -p -e "use cinder;show tables"

At the promp put the password.

Also, you could try to run this command to create all tables:

cinder-manage db sync

edit flag offensive delete link more

Comments

Yes it is a fresh install.

cat /etc/cinder/cinder.conf | grep -i "^sql_connection" returns nothing

Table exists:

osadmin@controller:/tmp$ mysql -u cinder -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 167
Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)

Copyright (c) 2000, 2014, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql> use cinder;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> show tables;
+--------------------------+
| Tables_in_cinder         |
+--------------------------+
| backups                  |
| encryption               |
| iscsi_targets            |
| migrate_version          |
| quality_of_service_specs |
| quota_classes            |
| quota_usages             |
| quotas                   |
| reservations             |
| services                 |
| snapshot_metadata        |
| snapshots                |
| transfers                |
| volume_admin_metadata    |
| volume_glance_metadata   |
| volume_metadata          |
| volume_type_extra_specs  |
| volume_types             |
| volumes ...
(more)
jscheponik gravatar imagejscheponik ( 2014-06-11 12:50:52 -0500 )edit

could you show me your /etc/cinder/cinder.conf ?

ChengJia gravatar imageChengJia ( 2014-09-20 02:13:19 -0500 )edit
0

answered 2015-11-16 01:00:43 -0500

br gravatar image

updated 2015-11-16 01:01:47 -0500

please check whether database is properly cofigured in /etc/cinder/cinder.conf

[database] ... sql_connection = mysql://cinder:CINDER_DBPASS@controller/cinder and restart cinder services. For me sql_connection was placed under default section and after moving to [database] section it worked properly

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

1 follower

Stats

Asked: 2014-06-11 09:14:43 -0500

Seen: 2,137 times

Last updated: Nov 16 '15