create workflow fails on data too long for column definition

Bug #1603941 reported by Michal Gershenzon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
High
Michal Gershenzon

Bug Description

The size of the definition column of table workflows is too small.
Big workflows fail to be created in mistral.

I wanted to add an example workflow, but there is a line limit in paste.openstack.org.
So this is a workflow with two tasks (in order to reproduce the error, add 6 more tasks similar to the given two):
http://paste.openstack.org/show/536093/

To fix this the column size should be changed (migration should also be handled).

Workaround to fix DB locally:
mysql
use mistral
alter table workflow_definitions_v2 modify definition mediumtext;
alter table workflow_definitions_v2 modify spec mediumtext;

Partial log:
  File "/usr/local/lib/python2.7/dist-packages/pymysql/connections.py", line 394, in check_error
    err.raise_mysql_exception(self._data)
  File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 120, in raise_mysql_exception
    _check_mysql_exception(errinfo)
  File "/usr/local/lib/python2.7/dist-packages/pymysql/err.py", line 112, in _check_mysql_exception
    raise errorclass(errno, errorvalue)
DBError: (pymysql.err.DataError) (1406, u"Data too long for column 'definition' at row 1") [SQL: u'INSERT INTO workflow_definitions_v2 (created_at, updated_at, scope, project_id, id, name, definition, spec, tags, is_system) VALUES (%(created_at)s, %(updated_at)s, %(scope)s, %(project_id)s, %(id)s, %(name)s, %(definition)s, %(spec)s, %(tags)s, %(is_system)s)'] [parameters: {'definition': u'---\nversion: \'2.0\'\n\ntoo_big_wf:\n type: direct\n\n tasks:\n noop_task_1:\n action: std.noop\n publish: \n just: "Lorem ipsum dolor sit amet, qui fugit vitae expetendis ea. Eius adhuc eam id. Ei eruditi lucilius moderatius usu, sea solum errem deserunt no."\n publish: "Lorem ipsum dolor sit amet, qui fugit vitae expetendis ea. Eius adhuc eam id. Ei eruditi lucilius moderatius usu, sea solum errem deserunt no."\n things: "Lorem ipsum dolor sit amet, qui fugit vitae expetendis ea. Eius adhuc eam id. Ei eruditi lucilius moderatius usu, sea solum errem deserunt no."\n to: "Lorem ipsum dolor sit amet, qui fugit vitae expetendis ea. Eius adhuc eam id. Ei eruditi lucilius moderatius usu, sea solum errem deserunt no."\n add: "Lorem ip

Changed in mistral:
milestone: none → newton-3
assignee: nobody → Michal Gershenzon (michal-gershenzon)
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Michal Gershenzon (michal-gershenzon) wrote :

same for executions_v2 spec

Revision history for this message
Michal Gershenzon (michal-gershenzon) wrote :

to fix executions_v2 spec:
alter table executions_v2 modify spec mediumtext;

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to mistral (master)

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

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

Reviewed: https://review.openstack.org/350183
Committed: https://git.openstack.org/cgit/openstack/mistral/commit/?id=6872dd8c55ebe980286fcd972262b0257461f18e
Submitter: Jenkins
Branch: master

commit 6872dd8c55ebe980286fcd972262b0257461f18e
Author: Michal Gershenzon <email address hidden>
Date: Tue Aug 2 17:57:43 2016 +0000

    DB migration to three execution tables and increase some columns

    DB migration script add tables:
    * action_executions_v2
    * workflow_executions_v2
    * task_executions_v2

    In addition to adding the new table, this commit also increases the size of
    different all the definitions to medium text and the name length of workflows
    from 80 to 255.

    Still needs to be done:
    * delete the old executions_v2 table
    * maybe migrating the data in the old executions_v2

    Change-Id: Ia3a54f047dee36e535e7fbea46924c3230feb0c8
    Closes-Bug: #1603941

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

This issue was fixed in the openstack/mistral 3.0.0.0b3 development milestone.

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.