When I ran Tuskar-ui first-time, Tuakar got following mysql error . I think the column 'contents' should be long enough when created in tuskar syncdb script. Or there shoud be more elegant way to fix this.
My fix:
alter table stored_file modify column contents varchar(1024) not NUll;
ERROR LOG:
192.0.2.19 - - [11/Sep/2014 05:50:49] "GET /v2/plans HTTP/1.1" 200 2
2014-09-11 05:50:49.590 12115 ERROR oslo.db.sqlalchemy.exc_filters [-] DBAPIError exception wrapped from (DataError) (1406, "Data too long for column 'contents' at row 1") 'INSERT INTO stored_file (created_at, updated_at, uuid, contents, object_type, name, version) VALUES (%s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2014, 9, 11, 5, 50, 49, 589797), None, '36c1d63e-b458-43d9-8635-24e7e12588b6', '{"environment_file_uuid": "c7dcebc3-2b60-4dcc-b0f7-a784affc51e9", "master_template_uuid": "522e6cf6-8ee5-4757-a505-f4581081bbae"}', 'deployment_plan', 'overcloud', None)
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters Traceback (most recent call last):
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters context)
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters cursor.execute(statement, parameters)
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters self.errorhandler(self, exc, value)
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters raise errorclass, errorvalue
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters DataError: (1406, "Data too long for column 'contents' at row 1")
2014-09-11 05:50:49.590 12115 TRACE oslo.db.sqlalchemy.exc_filters
2014-09-11 05:50:49.594 12115 ERROR wsme.api [-] Server-side error: "(DataError) (1406, "Data too long for column 'contents' at row 1") 'INSERT INTO stored_file (created_at, updated_at, uuid, contents, object_type, name, version) VALUES (%s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2014, 9, 11, 5, 50, 49, 589797), None, '36c1d63e-b458-43d9-8635-24e7e12588b6', '{"environment_file_uuid": "c7dcebc3-2b60-4dcc-b0f7-a784affc51e9", "master_template_uuid": "522e6cf6-8ee5-4757-a505-f4581081bbae"}', 'deployment_plan', 'overcloud', None)". Detail:
Traceback (most recent call last):
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/wsmeext/pecan.py", line 82, in callfunction
result = f(self, *args, **kwargs)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/tuskar/api/controllers/v2/plans.py", line 125, in post
description)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/tuskar/manager/plan.py", line 71, in create_plan
environment_uuid=environment_file.uuid,
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/tuskar/storage/stores.py", line 331, in create
plan_file = super(DeploymentPlanStore, self).create(name, contents)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/tuskar/storage/stores.py", line 142, in create
return self._driver.create(self, name, contents)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/tuskar/storage/drivers/sqlalchemy.py", line 139, in create
return self._create(store, name, contents, version)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/tuskar/storage/drivers/sqlalchemy.py", line 100, in _create
return self._upsert(store, stored_file)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/tuskar/storage/drivers/sqlalchemy.py", line 72, in _upsert
session.commit()
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 776, in commit
self.transaction.commit()
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 377, in commit
self._prepare_impl()
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 357, in _prepare_impl
self.session.flush()
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 1919, in flush
self._flush(objects)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2037, in _flush
transaction.rollback(_capture_exception=True)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 60, in __exit__
compat.reraise(exc_type, exc_value, exc_tb)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/session.py", line 2001, in _flush
flush_context.execute()
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 372, in execute
rec.execute(self)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/unitofwork.py", line 526, in execute
uow
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 65, in save_obj
mapper, table, insert)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/orm/persistence.py", line 570, in _emit_insert_statements
execute(statement, multiparams)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 729, in execute
return meth(self, multiparams, params)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/sql/elements.py", line 321, in _execute_on_connection
return connection._execute_clauseelement(self, multiparams, params)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 826, in _execute_clauseelement
compiled_sql, distilled_params
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 958, in _execute_context
context)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1156, in _handle_dbapi_exception
util.raise_from_cause(newraise, exc_info)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 951, in _execute_context
context)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 436, in do_execute
cursor.execute(statement, parameters)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/MySQLdb/cursors.py", line 205, in execute
self.errorhandler(self, exc, value)
File "/home/stack/tuskar/.tox/py27/local/lib/python2.7/site-packages/MySQLdb/connections.py", line 36, in defaulterrorhandler
raise errorclass, errorvalue
DBError: (DataError) (1406, "Data too long for column 'contents' at row 1") 'INSERT INTO stored_file (created_at, updated_at, uuid, contents, object_type, name, version) VALUES (%s, %s, %s, %s, %s, %s, %s)' (datetime.datetime(2014, 9, 11, 5, 50, 49, 589797), None, '36c1d63e-b458-43d9-8635-24e7e12588b6', '{"environment_file_uuid": "c7dcebc3-2b60-4dcc-b0f7-a784affc51e9", "master_template_uuid": "522e6cf6-8ee5-4757-a505-f4581081bbae"}', 'deployment_plan', 'overcloud', None)
192.0.2.19 - - [11/Sep/2014 05:50:49] "POST /v2/plans HTTP/1.1" 500 540
This has been fixed by the change in https:/ /bugs.launchpad .net/tuskar/ +bug/1365848