[Openstack] [Nova] Error when creating an instance

Diop Samba samba.diop at nagra.com
Tue Mar 18 17:34:58 UTC 2014


Hi Stefan,

It looks like your nova db has been setup unproperly.
I've exatly the same settings (1 controller, 1 network and 2 computes).

I check my nova DB :

mysql> use nova;
mysql> desc reservations;
+------------+--------------+------+-----+---------+----------------+
| Field      | Type         | Null | Key | Default | Extra          |
+------------+--------------+------+-----+---------+----------------+
| created_at | datetime     | YES  |     | NULL    |                |
| updated_at | datetime     | YES  |     | NULL    |                |
| deleted_at | datetime     | YES  |     | NULL    |                |
| id         | int(11)      | NO   | PRI | NULL    | auto_increment |
| uuid       | varchar(36)  | NO   | MUL | NULL    |                |
| usage_id   | int(11)      | NO   | MUL | NULL    |                |
| project_id | varchar(255) | YES  | MUL | NULL    |                |
| resource   | varchar(255) | YES  |     | NULL    |                |
| delta      | int(11)      | NO   |     | NULL    |                |
| expire     | datetime     | YES  |     | NULL    |                |
| deleted    | int(11)      | YES  |     | NULL    |                |
| user_id    | varchar(255) | YES  | MUL | NULL    |                |
+------------+--------------+------+-----+---------+----------------+
12 rows in set (0.00 sec)
mysql>

As you got this message :
, "Unknown column 'reservations.user_id' in 'field list'") 'SELECT reservations.created_at AS reservations_created_at, reservations


1-      I will suggest to verify your DB version :
[ctl]# nova-manage db version
216
[ctl]#

2-      drop the nova DB and create again then

3-      create your nova db  again

4-      then sync again
[ctl]# nova-manage db sync

Hope that will help

---
Samba.


From: Stefan Apostoaie [mailto:iosstef at gmail.com]
Sent: mardi 18 mars 2014 17:42
To: openstack at lists.openstack.org
Subject: [Openstack] [Nova] Error when creating an instance

Hello,

I encountered an issue on a clean openstack havana install (one controller node, two compute nodes, and one network node)  when creating multiple instances. Some instances were created but other entered in the error state. Looking in the logs I noticed that the openstack-nova-scheduler had some database related errors (logs can be found bellow). Has anyone encountered this issue? What is causing this?

Regards,
Stefan

The error in the nova-scheduler log:
Error during SchedulerManager._expire_reservations: (OperationalError) (1054, "Unknown column 'reservations.user_id' in 'field list'") 'SELECT reservations.created_at AS reservations_created_at, reservations.updated_at AS reservations_updated_at, reservations.deleted_at AS reservations_deleted_at, reservations.deleted AS reservations_deleted, reservations.id<http://reservations.id> AS reservations_id, reservations.uuid AS reservations_uuid, reservations.usage_id AS reservations_usage_id, reservations.project_id AS reservations_project_id, reservations.user_id AS reservations_user_id, reservations.resource AS reservations_resource, reservations.delta AS reservations_delta, reservations.expire AS reservations_expire \nFROM reservations INNER JOIN quota_usages ON quota_usages.id<http://quota_usages.id> = reservations.usage_id \nWHERE reservations.deleted = %s AND reservations.expire < %s' (0, datetime.datetime(2014, 3, 18, 12, 58, 8, 784970))
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task Traceback (most recent call last):
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.6/site-packages/nova/openstack/common/periodic_task.py", line 180, in run_periodic_tasks
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task task(self, context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.6/site-packages/nova/scheduler/manager.py", line 273, in _expire_reservations
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task QUOTAS.expire(context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.6/site-packages/nova/quota.py", line 1368, in expire
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task self._driver.expire(context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.6/site-packages/nova/quota.py", line 609, in expire
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task db.reservation_expire(context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.6/site-packages/nova/db/api.py", line 1112, in reservation_expire
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task return IMPL.reservation_expire(context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 108, in wrapper
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task return f(*args, **kwargs)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib/python2.6/site-packages/nova/db/sqlalchemy/api.py", line 3337, in reservation_expire
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task for reservation in reservation_query.join(models.QuotaUsage).all():
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2115, in all
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task return list(self)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2227, in _iter_
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task return self._execute_and_instances(context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/orm/query.py", line 2242, in _execute_and_instances
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task result = conn.execute(querycontext.statement, self._params)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1449, in execute
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task params)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task compiled_sql, distilled_params
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1698, in _execute_context
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/base.py", line 1691, in _execute_context
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task context)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/SQLAlchemy-0.7.8-py2.6-linux-x86_64.egg/sqlalchemy/engine/default.py", line 331, in do_execute
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task cursor.execute(statement, parameters)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/MySQLdb/cursors.py", line 173, in execute
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task self.errorhandler(self, exc, value)
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task File "/usr/lib64/python2.6/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task raise errorclass, errorvalue
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task OperationalError: (OperationalError) (1054, "Unknown column 'reservations.user_id' in 'field list'") 'SELECT reservations.created_at AS reservations_created_at, reservations.updated_at AS reservations_updated_at, reservations.deleted_at AS reservations_deleted_at, reservations.deleted AS reservations_deleted, reservations.id<http://reservations.id> AS reservations_id, reservations.uuid AS reservations_uuid, reservations.usage_id AS reservations_usage_id, reservations.project_id AS reservations_project_id, reservations.user_id AS reservations_user_id, reservations.resource AS reservations_resource, reservations.delta AS reservations_delta, reservations.expire AS reservations_expire \nFROM reservations INNER JOIN quota_usages ON quota_usages.id<http://quota_usages.id> = reservations.usage_id \nWHERE reservations.deleted = %s AND reservations.expire < %s' (0, datetime.datetime(2014, 3, 18, 12, 58, 8, 784970))
2014-03-18 05:58:08.827 24056 TRACE nova.openstack.common.periodic_task
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack/attachments/20140318/f01dccbb/attachment.html>


More information about the Openstack mailing list