Audit-template-create with long name returns "Internal Server Error (HTTP 500)"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| watcher |
Low
|
Unassigned |
Bug Description
Audit-template-
See the sequence below (first is fine, second crashes with one more char in name).
root@cli:~# watcher audit-template-
+------
| Property | Value |
+------
| goal | SERVERS_
| extra | {} |
| description | desc |
| name | 012345678901234
| host_aggregate | None |
| uuid | c15a5cf5-
+------
root@cli:~# watcher audit-template-
Internal Server Error (HTTP 500)
Changed in watcher: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in watcher: | |
assignee: | nobody → Lin Yang (lin-a-yang) |
Changed in watcher: | |
assignee: | Lin Yang (lin-a-yang) → nobody |
Zhenzan Zhou (zhenzan-zhou) wrote : | #1 |
Changed in watcher: | |
assignee: | nobody → Zhenzan Zhou (zhenzan-zhou) |
Changed in watcher: | |
milestone: | none → mitaka-3 |
Changed in watcher: | |
assignee: | Zhenzan Zhou (zhenzan-zhou) → Taylor Peoples (tpeoples) |
Changed in watcher: | |
milestone: | mitaka-3 → mitaka-rc-final |
Changed in watcher: | |
milestone: | mitaka-rc-final → newton-1 |
daniel.pawlik (daniel-pawlik) wrote : | #2 |
I don't see any problem:
watcher audit-template-
result:
+------
| Property | Value |
+------
| goal | TEST_GOAL |
| extra | {} |
| description | None |
| name | 012345678901234
| host_aggregate | None |
| uuid | 3c8ce644-
+------
Changed in watcher: | |
status: | Confirmed → Triaged |
Changed in watcher: | |
milestone: | newton-1 → newton-2 |
Jean-Emile DARTOIS (jed56) wrote : | #3 |
tpeoples: are still working on this ?
Changed in watcher: | |
assignee: | Taylor Peoples (tpeoples) → nobody |
Zhai, Edwin (edwin-zhai) wrote : | #4 |
I can't reproduce it with latest code.
Let's close it and reopen in future if needed.
Changed in watcher: | |
status: | Triaged → Won't Fix |
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...