Audit-template-create with long name returns "Internal Server Error (HTTP 500)"
See the sequence below (first is fine, second crashes with one more char in name).
root@cli:~# watcher audit-template-create -d desc 01234567890123456789012345678901234567890123456789012345678 SERVERS_CONSOLIDATION
+----------------+-------------------------------------------------------------+
| Property | Value |
+----------------+-------------------------------------------------------------+
| goal | SERVERS_CONSOLIDATION |
| extra | {} |
| description | desc |
| name | 01234567890123456789012345678901234567890123456789012345678 |
| host_aggregate | None |
| uuid | c15a5cf5-71bd-4c89-bf59-951c10488794 |
+----------------+-------------------------------------------------------------+
root@cli:~# watcher audit-template-create -d desc 012345678901234567890123456789012345678901234567890123456789 SERVERS_CONSOLIDATION
Internal Server Error (HTTP 500)
ptas@devstack02:~$ watcher audit-template- create -d desc 012345678901234 567890123456789 012345678901234 567890123456789 DUMMY ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ---+ ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ---+ 567890123456789 012345678901234 567890123456789 | 083e-439d- 94bb-2234d5c02e a0 | ------- ---+--- ------- ------- ------- ------- ------- ------- ------- ------- ---+ create -d desc 012345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 012345678901234 567890123456789 DUMMY
+------
| Property | Value |
+------
| goal | DUMMY |
| extra | {} |
| description | desc |
| name | 012345678901234
| host_aggregate | None |
| uuid | 9232893d-
+------
ptas@devstack02:~$ watcher audit-template-
Internal Server Error (HTTP 500)
============== watcher-api log ======= ======= =======
2015-12-07 00:02:23.830 64559 ERROR oslo_db. sqlalchemy. exc_filters [req-53f851f9- 4853-4081- 9aa2-a40b1092c5 62 watcher admin - - -] DBAPIError exception wrapped from (DataError) (1406, "Data too long for column 'name' at row 1") 'INSERT INTO audit_templates (created_at, updated_at, deleted_at, deleted, uuid, name, description, host_aggregate, goal, extra, version) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)' (datetime. datetime( 2015, 12, 7, 0, 2, 23, 821978), None, None, 0, '3dcd71aa- 0743-4d4b- a672-41a23f9636 b2', '01234567890123 456789012345678 901234567890123 456789012345678 901234567890123 456789012345678 901234567890123 456789012345678 9', 'desc', None, 'DUMMY', '{}', None) sqlalchemy. exc_filters Traceback (most recent call last): sqlalchemy. exc_filters File "/usr/local/ lib/python2. 7/dist- packages/ sqlalchemy/ engine/ base.py" , line 1063, in _execute_context sqlalchemy. exc_filters context) sqlalchemy. exc_filters File "/usr/local/ lib/python2. 7/dist- packages/ sqlalchemy/ engine/ default. py", line 442, in do_execute sqlalchemy. exc_filters cursor. execute( statement, parameters) sqlalchemy. exc_filters File "/usr/lib/ python2. 7/dist- packages/ MySQLdb/ cursors. py", line 174, in execute sqlalchemy. exc_filters self.errorhandl er(self, exc, value) sqlalchemy. exc_filters File "/usr/lib/ python2. 7/dist- packages/ MySQLdb/ connections. py", line 36, in defaulterrorhandler sqlalchemy. exc_filters raise errorclass, errorvalue sqlalchemy. exc_filters DataError: (1406, "Data too long for column 'name' at row 1")
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:02:23.830 64559 ERROR oslo_db.
2015-12-07 00:0...