yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #01573
[Bug 1145609] Re: nova-manage db archive_deleted_rows doesn't check for negative max_rows
** Changed in: nova
Status: Fix Committed => Fix Released
** Changed in: nova
Milestone: None => grizzly-rc1
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1145609
Title:
nova-manage db archive_deleted_rows doesn't check for negative
max_rows
Status in OpenStack Compute (Nova):
Fix Released
Bug description:
From latest devstack on 2013-3-4
box:~/devstack$ sudo nova-manage db archive_deleted_rows --max_rows -5
Command failed, please check log for more info
2013-03-05 00:49:41.631 CRITICAL nova [req-ee44b54f-27b5-473b-8349-4ab42f95d725 None None] (ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-5' at line 4") 'SELECT aggregate_metadata.created_at, aggregate_metadata.updated_at, aggregate_metadata.deleted_at, aggregate_metadata.id, aggregate_metadata.aggregate_id, aggregate_metadata.`key`, aggregate_metadata.value, aggregate_metadata.deleted \nFROM aggregate_metadata \nWHERE aggregate_metadata.deleted != %s ORDER BY aggregate_metadata.id \n LIMIT %s' (0, -5)
2013-03-05 00:49:41.631 8904 TRACE nova Traceback (most recent call last):
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/local/bin/nova-manage", line 7, in <module>
2013-03-05 00:49:41.631 8904 TRACE nova execfile(__file__)
2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1247, in <module>
2013-03-05 00:49:41.631 8904 TRACE nova main()
2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 1239, in main
2013-03-05 00:49:41.631 8904 TRACE nova fn(*fn_args, **fn_kwargs)
2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/bin/nova-manage", line 800, in archive_deleted_rows
2013-03-05 00:49:41.631 8904 TRACE nova db.archive_deleted_rows(admin_context, max_rows)
2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/nova/db/api.py", line 1705, in archive_deleted_rows2013-03-05 00:49:41.631 8904 TRACE nova return IMPL.archive_deleted_rows(context, max_rows=max_rows)
2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 95, in wrapper
2013-03-05 00:49:41.631 8904 TRACE nova return f(*args, **kwargs)
2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 4779, in archive_deleted_rows
2013-03-05 00:49:41.631 8904 TRACE nova max_rows=max_rows - rows_archived)
2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 95, in wrapper2013-03-05 00:49:41.631 8904 TRACE nova return f(*args, **kwargs)2013-03-05 00:49:41.631 8904 TRACE nova File "/opt/stack/nova/nova/db/sqlalchemy/api.py", line 4751, in archive_deleted_rows_for_table
2013-03-05 00:49:41.631 8904 TRACE nova rows = conn.execute(query).fetchall()
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1449, in execute
2013-03-05 00:49:41.631 8904 TRACE nova params)
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1584, in _execute_clauseelement
2013-03-05 00:49:41.631 8904 TRACE nova compiled_sql, distilled_params
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1698, in _execute_context
2013-03-05 00:49:41.631 8904 TRACE nova context)
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/base.py", line 1691, in _execute_context
2013-03-05 00:49:41.631 8904 TRACE nova context)
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/local/lib/python2.7/dist-packages/sqlalchemy/engine/default.py", line 331, in do_execute
2013-03-05 00:49:41.631 8904 TRACE nova cursor.execute(statement, parameters)
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/lib/python2.7/dist-packages/MySQLdb/cursors.py", line 174, in execute
2013-03-05 00:49:41.631 8904 TRACE nova self.errorhandler(self, exc, value)
2013-03-05 00:49:41.631 8904 TRACE nova File "/usr/lib/python2.7/dist-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2013-03-05 00:49:41.631 8904 TRACE nova raise errorclass, errorvalue
2013-03-05 00:49:41.631 8904 TRACE nova ProgrammingError: (ProgrammingError) (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-5' at line 4") 'SELECT aggregate_metadata.created_at, aggregate_metadata.updated_at, aggregate_metadata.deleted_at, aggregate_metadata.id, aggregate_metadata.aggregate_id, aggregate_metadata.`key`, aggregate_metadata.value, aggregate_metadata.deleted \nFROM aggregate_metadata \nWHERE aggregate_metadata.deleted != %s ORDER BY aggregate_metadata.id \n LIMIT %s' (0, -5)
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1145609/+subscriptions