tempest failed because of audit name

Bug #1744231 reported by licanwei
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
watcher
Fix Released
Undecided
licanwei

Bug Description

2018-01-18 10:30:34.309040 | primary | watcher_tempest_plugin.tests.api.admin.test_action_plan.TestCreateDeleteExecuteActionPlan.test_create_action_plan
2018-01-18 10:30:34.309583 | primary | -----------------------------------------------------------------------------------------------------------------
2018-01-18 10:30:34.309630 | primary |
2018-01-18 10:30:34.309698 | primary | Captured traceback:
2018-01-18 10:30:34.309773 | primary | ~~~~~~~~~~~~~~~~~~~
2018-01-18 10:30:34.309871 | primary | Traceback (most recent call last):
2018-01-18 10:30:34.310455 | primary | File "/opt/stack/new/tempest/.tox/tempest/local/lib/python2.7/site-packages/watcher_tempest_plugin/tests/api/admin/test_action_plan.py", line 35, in test_create_action_plan
2018-01-18 10:30:34.310622 | primary | _, audit = self.create_audit(audit_template['uuid'])
2018-01-18 10:30:34.311055 | primary | File "/opt/stack/new/tempest/.tox/tempest/local/lib/python2.7/site-packages/watcher_tempest_plugin/tests/api/admin/base.py", line 180, in create_audit
2018-01-18 10:30:34.311234 | primary | state=state, interval=interval, parameters=parameters)
2018-01-18 10:30:34.311571 | primary | File "/opt/stack/new/tempest/.tox/tempest/local/lib/python2.7/site-packages/watcher_tempest_plugin/services/infra_optim/base.py", line 38, in wrapper
2018-01-18 10:30:34.311683 | primary | return f(*args, **kwargs)
2018-01-18 10:30:34.312052 | primary | File "/opt/stack/new/tempest/.tox/tempest/local/lib/python2.7/site-packages/watcher_tempest_plugin/services/infra_optim/v1/json/client.py", line 139, in create_audit
2018-01-18 10:30:34.312212 | primary | return self._create_request('audits', audit)
2018-01-18 10:30:34.312639 | primary | File "/opt/stack/new/tempest/.tox/tempest/local/lib/python2.7/site-packages/watcher_tempest_plugin/services/infra_optim/base.py", line 152, in _create_request
2018-01-18 10:30:34.312779 | primary | resp, body = self.post(uri, body=body)
2018-01-18 10:30:34.312973 | primary | File "tempest/lib/common/rest_client.py", line 279, in post
2018-01-18 10:30:34.313207 | primary | return self.request('POST', url, extra_headers, headers, body, chunked)
2018-01-18 10:30:34.313382 | primary | File "tempest/lib/common/rest_client.py", line 668, in request
2018-01-18 10:30:34.313534 | primary | self._error_checker(resp, resp_body)
2018-01-18 10:30:34.313719 | primary | File "tempest/lib/common/rest_client.py", line 845, in _error_checker
2018-01-18 10:30:34.313810 | primary | message=message)
2018-01-18 10:30:34.313959 | primary | tempest.lib.exceptions.ServerFault: Got server fault
2018-01-18 10:30:34.317129 | primary | Details: {"error_message": "{\"debuginfo\": null, \"faultcode\": \"Server\", \"faultstring\": \"(pymysql.err.DataError) (1406, u\\\"Data too long for column 'name' at row 1\\\") [SQL: u'INSERT INTO audits (created_at, updated_at, deleted_at, deleted, uuid, name, audit_type, state, parameters, `interval`, goal_id, strategy_id, scope, auto_trigger, next_run_time) VALUES (%(created_at)s, %(updated_at)s, %(deleted_at)s, %(deleted)s, %(uuid)s, %(name)s, %(audit_type)s, %(state)s, %(parameters)s, %(interval)s, %(goal_id)s, %(strategy_id)s, %(scope)s, %(auto_trigger)s, %(next_run_time)s)'] [parameters: {'auto_trigger': 0, 'next_run_time': None, 'uuid': 'f596e59b-aaa9-4f93-961e-09fe1373ca34', 'parameters': '{}', 'deleted': 0, 'strategy_id': None, 'interval': None, 'audit_type': u'ONESHOT', 'updated_at': None, 'state': 'PENDING', 'goal_id': 2, 'scope': '[]', 'deleted_at': None, 'created_at': datetime.datetime(2018, 1, 18, 10, 27, 43, 809145), 'name': u'Tempest Audit Template 4ea6e267-50eb-4416-b954-03e009b571a0-2018-01-18T10:27:43.786953'}]\"}"}

licanwei (li-canwei2)
Changed in watcher:
assignee: nobody → licanwei (li-canwei2)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to watcher (master)

Fix proposed to branch: master
Review: https://review.openstack.org/535676

Changed in watcher:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to watcher (master)

Reviewed: https://review.openstack.org/535676
Committed: https://git.openstack.org/cgit/openstack/watcher/commit/?id=6d03c4c54370bb0ca91c4cec4ac929ab6a4275eb
Submitter: Zuul
Branch: master

commit 6d03c4c54370bb0ca91c4cec4ac929ab6a4275eb
Author: licanwei <email address hidden>
Date: Fri Jan 19 00:56:04 2018 -0800

    check audit name length

    No more than 63 characters

    Change-Id: I52adbd7e9f12dd4a8b6977756d788ee0e5d6391a
    Closes-Bug: #1744231

Changed in watcher:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/watcher 1.7.0

This issue was fixed in the openstack/watcher 1.7.0 release.

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.