nova-manage project zipfile IRT anne

Asked by janson on 2011-02-23

I am trying to install bexar on centos5.5,
when execute this command:
nova-manage project zipfile IRT anne
to create nova.zip file,but an error occurs like this:

(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1397, in _cursor_execute
(nova.root): TRACE: context)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/default.py", line 299, in do_execute
(nova.root): TRACE: cursor.execute(statement, parameters)
(nova.root): TRACE: OperationalError: (OperationalError) no such table: users u'SELECT users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.deleted_at AS users_deleted_at, users.deleted AS users_deleted, users.id AS users_id, users.name AS users_name, users.access_key AS users_access_key, users.secret_key AS users_secret_key, users.is_admin AS users_is_admin \nFROM users \nWHERE users.id = ? AND users.deleted = ? \n LIMIT 1 OFFSET 0' ('anne', False)
(nova.root): TRACE:

any ideas ???

Question information

Language:
English Edit question
Status:
Solved
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Solved by:
janson
Solved:
2011-02-28
Last query:
2011-02-28
Last reply:
2011-02-25
Christian Berendt (berendt) said : #1

paste your --sql_connection flag. you created a new database and synced it with nova-manage db sync..?

janson (janson071) said : #2

--sql_connection=mysql://root@172.28.139.46/nova

what's the problem ???

Christian Berendt (berendt) said : #3

Have you created the database and synced the database to the latest revision? If not, run "nova-manage db sync" first.

(nova.root): TRACE: OperationalError: (OperationalError) no such table: users u'SELECT users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.deleted_at AS users_deleted_at, users.deleted AS users_deleted, users.id AS users_id, users.name AS users_name, users.access_key AS users_access_key, users.secret_key AS users_secret_key, users.is_admin AS users_is_admin \nFROM users \nWHERE users.id = ? AND users.deleted = ? \n LIMIT 1 OFFSET 0' ('anne', False)

You're missing the tables users. And without this table it should not be possible to create new users, too. Have you successfully created the user "anne" and the project "IRT"? Login to the MySQL database and try "show tables;", "select * from users;" and "select * from projects;". Is this working? Also try a "nova-manage user list" and "nova-manage project list".

janson (janson071) said : #4

mysql> show tables
    -> ;
+-------------------------------------+
| Tables_in_nova |
+-------------------------------------+
| auth_tokens |
| certificates |
| console_pools |
| consoles |
| export_devices |
| fixed_ips |
| floating_ips |
| instance_actions |
| instances |
| iscsi_targets |
| key_pairs |
| migrate_version |
| networks |
| projects |
| quotas |
| security_group_instance_association |
| security_group_rules |
| security_groups |
| services |
| user_project_association |
| user_project_role_association |
| user_role_association |
| users |
| volumes |
+-------------------------------------+

mysql> select * from users;
+---------------------+------------+------------+---------+--------+------+--------------------------------------+--------------------------------------+----------+
| created_at | updated_at | deleted_at | deleted | id | name | access_key | secret_key | is_admin |
+---------------------+------------+------------+---------+--------+------+--------------------------------------+--------------------------------------+----------+
| 2011-02-23 02:12:40 | NULL | NULL | 0 | anne | NULL | 65c6033a-761a-4bd9-a183-60cf885f9a66 | 79fac423-863c-472d-9021-9fbe0dc3bd3f | 1 |
| 2011-02-23 02:30:10 | NULL | NULL | 0 | janson | NULL | 4b36f3c4-c685-490a-aeb7-dddf0d2b1af0 | fa579674-71eb-406c-9740-b7f61691190c | 1 |
+---------------------+------------+------------+---------+--------+------+--------------------------------------+--------------------------------------+----------+

mysql> select * from projects;
+---------------------+------------+------------+---------+------+------+-------------+-----------------+
| created_at | updated_at | deleted_at | deleted | id | name | description | project_manager |
+---------------------+------------+------------+---------+------+------+-------------+-----------------+
| 2011-02-23 02:15:41 | NULL | NULL | 0 | IRT | IRT | IRT | anne |
| 2011-02-23 02:32:16 | NULL | NULL | 0 | PRO1 | PRO1 | PRO1 | janson |
+---------------------+------------+------------+---------+------+------+-------------+-----------------+
2 rows in set (0.00 sec)

but when execute "nova-manage user list " and "nova-manage project list " :

[root@localhost ~]# nova-manage user list
2011-02-28 09:27:37,661 CRITICAL nova.root [-] (OperationalError) no such table: users u'SELECT users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.deleted_at AS users_deleted_at, users.deleted AS users_deleted, users.id AS users_id, users.name AS users_name, users.access_key AS users_access_key, users.secret_key AS users_secret_key, users.is_admin AS users_is_admin \nFROM users \nWHERE users.deleted = ?' (False,)
(nova.root): TRACE: Traceback (most recent call last):
(nova.root): TRACE: File "/usr/bin/nova-manage", line 5, in <module>
(nova.root): TRACE: pkg_resources.run_script('nova==2011.1', 'nova-manage')
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 464, in run_script
(nova.root): TRACE: self.require(requires)[0].run_script(script_name, ns)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1197, in run_script
(nova.root): TRACE: execfile(script_filename, namespace, namespace)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 694, in <module>
(nova.root): TRACE: main()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 686, in main
(nova.root): TRACE: fn(*argv)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/EGG-INFO/scripts/nova-manage", line 325, in list
(nova.root): TRACE: for user in self.manager.get_users():
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/auth/manager.py", line 613, in get_users
(nova.root): TRACE: user_list = drv.get_users()
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/auth/dbdriver.py", line 64, in get_users
(nova.root): TRACE: for user in db.user_get_all(context.get_admin_context())]
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/api.py", line 842, in user_get_all
(nova.root): TRACE: return IMPL.user_get_all(context)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/nova-2011.1-py2.6.egg/nova/db/sqlalchemy/api.py", line 1752, in user_get_all
(nova.root): TRACE: filter_by(deleted=can_read_deleted(context)).\
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1492, in all
(nova.root): TRACE: return list(self)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1604, in __iter__
(nova.root): TRACE: return self._execute_and_instances(context)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/query.py", line 1609, in _execute_and_instances
(nova.root): TRACE: mapper=self._mapper_zero_or_none())
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/orm/session.py", line 701, in execute
(nova.root): TRACE: clause, params or {})
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1194, in execute
(nova.root): TRACE: params)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1274, in _execute_clauseelement
(nova.root): TRACE: return self.__execute_context(context)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1305, in __execute_context
(nova.root): TRACE: context.parameters[0], context=context)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1404, in _cursor_execute
(nova.root): TRACE: context)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/base.py", line 1397, in _cursor_execute
(nova.root): TRACE: context)
(nova.root): TRACE: File "/usr/lib/python2.6/site-packages/sqlalchemy/engine/default.py", line 299, in do_execute
(nova.root): TRACE: cursor.execute(statement, parameters)
(nova.root): TRACE: OperationalError: (OperationalError) no such table: users u'SELECT users.created_at AS users_created_at, users.updated_at AS users_updated_at, users.deleted_at AS users_deleted_at, users.deleted AS users_deleted, users.id AS users_id, users.name AS users_name, users.access_key AS users_access_key, users.secret_key AS users_secret_key, users.is_admin AS users_is_admin \nFROM users \nWHERE users.deleted = ?' (False,)
(nova.root): TRACE:

janson (janson071) said : #5

now it's OK,
thank you to all of you!

Chris St. John (cstjohn-1) said : #6

We were running into the same type of issue (OperationalError) on a 'euca-describe-groups' - turned out that the nova user was in an incorrect group (actually in no group, needs to be in the nova group) and therefore did not have access to read the nova.conf file. Just something to keep in mind if future openstackers run into this type of error.

Fredric M (fredric-m) said : #7

Thanks Chris for taking the time to write that, it saved me even more hours of fault-searching.