Have helpful error messages when DB tables were not created

Bug #704908 reported by Hisaki Ohara
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Wishlist
Vish Ishaya

Bug Description

At revno 583, when executing nova-manage to create user admin, it's failing with a traceback as follows:
(full trace back is attached.)

$ bin/nova-manage --sql_connection="sqlite:///./nova.sqlite" user admin admin admin admin
<snip>
sqlalchemy.exc.OperationalError: (OperationalError) no such table: users u'INSERT INTO users (created_at, updated_at, deleted_at, deleted, id, name, access_key, secret_key, is_admin) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)' ('2011-01-19 13:57:29.414614', None, None, False, 'admin', None, 'admin', 'admin', True)

It seems that any tables in database are not created.

This issue does not happen by reverting to revno 580.
Revno 581 added db command in nova-manage. I'm not sure whether the change in revno 581 asks us to do something for db initialization before creating user admin.

Regards,
Hisaki Ohara

Related branches

Revision history for this message
Hisaki Ohara (hisaki) wrote :
Revision history for this message
Ricardo Carrillo Cruz (rcarrillocruz) wrote :

I also had this issue this morning. Tried to clean up sqlite db by hand, but nothing.
Issue appears to be that tables are not created in the DB at all.

Regards

Ricardo Carrililo Cruz (rcc)

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

I set up 583 and can confirm the DB is no longer automatically set up. Maybe a fallback from the db-migration merge ?

Changed in nova:
importance: Undecided → Critical
status: New → Confirmed
summary: - "nova-manage user admin" is failing due to no tables
+ Database tables no longer created on startup
Revision history for this message
Vish Ishaya (vishvananda) wrote : Re: [Bug 704908] Re: "nova-manage user admin" is failing due to no tables

Yes. You now need to run nova-manage db sync to create the tables. The
various docs and install guides need to be updated to reflect this. We also
need to catch the error in admin create and print helpful instructions.
On Jan 19, 2011 7:41 AM, "Ricardo Carrillo Cruz" <email address hidden>
wrote:
> I also had this issue this morning. Tried to clean up sqlite db by hand,
but nothing.
> Issue appears to be that tables are not created in the DB at all.
>
>
> Regards
>
> Ricardo Carrililo Cruz (rcc)
>
> --
> 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/704908
>
> Title:
> "nova-manage user admin" is failing due to no tables
>
> Status in OpenStack Compute (Nova):
> New
>
> Bug description:
> At revno 583, when executing nova-manage to create user admin, it's
failing with a traceback as follows:
> (full trace back is attached.)
>
> $ bin/nova-manage --sql_connection="sqlite:///./nova.sqlite" user admin
admin admin admin
> <snip>
> sqlalchemy.exc.OperationalError: (OperationalError) no such table: users
u'INSERT INTO users (created_at, updated_at, deleted_at, deleted, id, name,
access_key, secret_key, is_admin) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)'
('2011-01-19 13:57:29.414614', None, None, False, 'admin', None, 'admin',
'admin', True)
>
> It seems that any tables in database are not created.
>
> This issue does not happen by reverting to revno 580.
> Revno 581 added db command in nova-manage. I'm not sure whether the change
in revno 581 asks us to do something for db initialization before creating
user admin.
>
> Regards,
> Hisaki Ohara
>
>

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

Thanks for the info. I downgraded importance and created bug 705073 to cover potential integration in Ubuntu packaging.

summary: - Database tables no longer created on startup
+ Have helpful error messages when DB tables were not created
Changed in nova:
assignee: nobody → Vish Ishaya (vishvananda)
importance: Critical → Wishlist
status: Confirmed → In Progress
Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → 2011.1
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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