euca-add-keypair fails with MySQL chosen in nova.sh

Bug #711439 reported by quasimotoca
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Vish Ishaya

Bug Description

Hi:
1) I'm running Ubuntu Server 10.04.1 LTS fresh install on bare metal.
2) I Installed OpenStack via nova.sh script no problem (Trunk Revision 643)
3) Jump to screen 8 and do: euca-add-keypair mykey > mykey.priv

I get the following stack trace in mykey.priv:

Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error
BotoServerError: 500 Internal Server Error
Traceback (most recent call last):
  File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
    result = self.application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__
    return app(environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/novademo/nova/nova/api/ec2/__init__.py", line 60, in __call__
    rv = req.get_response(self.application)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 918, in get_response
    application, catch_exc_info=False)
  File "/usr/lib/pymodules/python2.6/webob/request.py", line 886, in call_application
    app_iter = application(self.environ, start_response)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
    resp = self.call_func(req, *args, **self.kwargs)
  File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
    return self.func(req, *args, **kwargs)
  File "/home/novademo/nova/nova/api/ec2/__init__.py", line 171, in __call__
    req.path)
  File "/home/novademo/nova/nova/auth/manager.py", line 260, in authenticate
    user = self.get_user_from_access_key(access_key)
  File "/home/novademo/nova/nova/auth/manager.py", line 606, in get_user_from_access_key
    user_dict = drv.get_user_from_access_key(access_key)
  File "/home/novademo/nova/nova/auth/dbdriver.py", line 53, in get_user_from_access_key
    user = db.user_get_by_access_key(context.get_admin_context(), access)
  File "/home/novademo/nova/nova/db/api.py", line 827, in user_get_by_access_key
    return IMPL.user_get_by_access_key(context, access_key)
  File "/home/novademo/nova/nova/db/sqlalchemy/api.py", line 96, in wrapper
    return f(*args, **kwargs)
  File "/home/novademo/nova/nova/db/sqlalchemy/api.py", line 1706, in user_get_by_access_key
    filter_by(deleted=can_read_deleted(context)).\
  File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/query.py", line 1496, in first
    ret = list(self[0:1])
  File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/query.py", line 1405, in __getitem__
    return list(res)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/query.py", line 1565, in __iter__
    return self._execute_and_instances(context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/query.py", line 1570, in _execute_and_instances
    mapper=self._mapper_zero_or_none())
  File "/usr/lib/pymodules/python2.6/sqlalchemy/orm/session.py", line 735, in execute
    clause, params or {})
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1157, in execute
    params)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1237, in _execute_clauseelement
    return self.__execute_context(context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1268, in __execute_context
    context.parameters[0], context=context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
    context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
    context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1268, in __execute_context
    context.parameters[0], context=context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1367, in _cursor_execute
    context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/base.py", line 1360, in _cursor_execute
    context)
  File "/usr/lib/pymodules/python2.6/sqlalchemy/engine/default.py", line 288, in do_execute
    cursor.execute(statement, parameters)
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, us
ers.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.access_key = ? AND users.deleted = ? \n LIMIT 1 OFFSET 0' ('admin', False)

Note 1: nova.sqlite works fine.
Note 2: users table does exist in nova database in MySQL.

Cheers,
Dave

Related branches

Revision history for this message
quasimotoca (smoothsoft) wrote :
Revision history for this message
Thierry Carrez (ttx) wrote :

Marking invalid as per OP comment

Changed in nova:
status: New → Invalid
Revision history for this message
Abu Shohel Ahmed (shohel-csdu) wrote :

I have faced related problems running Nova Compute using nova.sh script with mysql db ( Although i have not found the same problem for sqlite). The problem is "OperationalError no such table: users ..." -- when i run euca-describe-keypair after the installation. Finally, got rid of by making some small changes in the script.

I have added '--flagfile=$NOVA_DIR/bin/nova.conf' in the nova.sh for each components in the following example way

    * nova-api
    * nova-compute
    * nova-objectstore
    * nova-volume
    * nova-scheduler

e.g.
screen_it api "$NOVA_DIR/bin/nova-api --flagfile=$NOVA_DIR/bin/nova.conf"

Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 711439] Re: euca-add-keypair fails with MySQL chosen in nova.sh
Download full text (5.9 KiB)

Looks like nova-api has lost its call to default_flagfile

Vish

On Feb 25, 2011, at 7:42 AM, Shohel wrote:

> I have faced related problems running Nova Compute using nova.sh script with mysql db ( Although i have not found the same problem for sqlite). The problem is "OperationalError no such table: users ..." -- when i run euca-describe-keypair after the installation. Finally, got rid of by making some small changes in the script.
>
> I have added '--flagfile=$NOVA_DIR/bin/nova.conf' in the nova.sh for each components in the following example way
>
> * nova-api
> * nova-compute
> * nova-objectstore
> * nova-volume
> * nova-scheduler
>
> e.g.
> screen_it api "$NOVA_DIR/bin/nova-api --flagfile=$NOVA_DIR/bin/nova.conf"
>
> --
> You received this bug notification because you are a member of Nova Bug
> Team, which is subscribed to OpenStack Compute (nova).
> https://bugs.launchpad.net/bugs/711439
>
> Title:
> euca-add-keypair fails with MySQL chosen in nova.sh
>
> Status in OpenStack Compute (Nova):
> Invalid
>
> Bug description:
> Hi:
> 1) I'm running Ubuntu Server 10.04.1 LTS fresh install on bare metal.
> 2) I Installed OpenStack via nova.sh script no problem (Trunk Revision 643)
> 3) Jump to screen 8 and do: euca-add-keypair mykey > mykey.priv
>
> I get the following stack trace in mykey.priv:
>
> Warning: failed to parse error message from AWS: <unknown>:1:0: syntax error
> BotoServerError: 500 Internal Server Error
> Traceback (most recent call last):
> File "/usr/lib/pymodules/python2.6/eventlet/wsgi.py", line 336, in handle_one_response
> result = self.application(self.environ, start_response)
> File "/usr/lib/pymodules/python2.6/paste/urlmap.py", line 203, in __call__
> return app(environ, start_response)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
> resp = self.call_func(req, *args, **self.kwargs)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
> return self.func(req, *args, **kwargs)
> File "/home/novademo/nova/nova/api/ec2/__init__.py", line 60, in __call__
> rv = req.get_response(self.application)
> File "/usr/lib/pymodules/python2.6/webob/request.py", line 918, in get_response
> application, catch_exc_info=False)
> File "/usr/lib/pymodules/python2.6/webob/request.py", line 886, in call_application
> app_iter = application(self.environ, start_response)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 147, in __call__
> resp = self.call_func(req, *args, **self.kwargs)
> File "/usr/lib/pymodules/python2.6/webob/dec.py", line 208, in call_func
> return self.func(req, *args, **kwargs)
> File "/home/novademo/nova/nova/api/ec2/__init__.py", line 171, in __call__
> req.path)
> File "/home/novademo/nova/nova/auth/manager.py", line 260, in authenticate
> user = self.get_user_from_access_key(access_key)
> File "/home/novademo/nova/nova/auth/manager.py", line 606, in get_user_from_access_key
> user_dict = drv.get_user_from_access_key(access_key)
> File "/home/novademo/nova/nova/auth/dbdriver.py", line 53, in get_user_from_access_key
> ...

Read more...

Changed in nova:
status: Invalid → In Progress
importance: Undecided → High
assignee: nobody → Vish Ishaya (vishvananda)
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.2
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.