Ask Your Question
0

Mistral: unable to create an execution

asked 2014-03-11 04:44:20 -0500

avi gravatar image

updated 2014-03-11 06:30:18 -0500

I installed Mistral on my Linux ubuntu (12.04) system by cloning mistral, mistralclient and mistral-extra git repositories and launching sudo python setup.py install to install them and all their dependencies.

I already have an Havana openstack installation so I point mistral to use its rabbitmq and connect to its keystone server (although I think it is noticed in the code that only V3 API is used while mine listens on V2). But for now I set auth_enable under pecan, with False to bypass authentication.

I then launch the following commands in separate shell terminals:

python mistral/cmd/api.py --config-file etc/mistral.conf
python mistral/cmd/task_executor.py --config-file etc/mistral.conf

and finally I try to run the one of the tests exposed in mistral-extra project:

?~/mistral-extra/examples/vm_job$ run.py

But I get the following exception:

Traceback (most recent call last):
  File "run.py", line 78, in <module>
    main()
  File "run.py", line 74, in main
    create_execution(WORKBOOK_NAME, "runJob", CONTEXT)
  File "run.py", line 65, in create_execution
    execution = CLIENT.executions.create(wb_name, task_name, context)
  File "/usr/local/lib/python2.7/dist-packages/mistralclient/api/executions.py", line 51, in create
    data['context'] = self._get_context_as_str(context)
  File "/usr/local/lib/python2.7/dist-packages/mistralclient/api/executions.py", line 38, in _get_context_as_str
    raise ex.IllegalArgumentException(msg + str(e))
mistralclient.exceptions.IllegalArgumentException: Context must be a dictionary or json compatible string.Expecting property name: line 1 column 1 (char 1)

Does the example work ? Can you please help me to solve this out ?

Please note that using mistral CLI I can see that the workbook is successfully loaded:

weit@flex01-vm3:~/mistral-extra/examples/vm_job$ mistral  workbook-list
Starting new HTTP connection (1): localhost
+-----------------+------------------+------+
| Name            | Description      | Tags |
+-----------------+------------------+------+
| vm_job_workbook | My test workbook | test |
+-----------------+------------------+------+

Also, I can not create an execution from via mistral CLI. It seems to fail on parsing the context:

weit@flex01-vm3:~/mistral-extra/examples/vm_job$ mistral execution-create vm_job_workbook runJob '''{"test" : 45}'''
Context must be a dictionary or json compatible string.Expecting property name: line 1 column 1 (char 1)

Any help is highly appreciated.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-03-13 05:43:09 -0500

Renat gravatar image

updated 2014-03-13 05:45:10 -0500

Hi,

Thank you for your interest in our project!

Not sure which version of Mistral you cloned (seems like 2-3 days ago) but basically lots of things are in progress now in the project. Particularly, "vm_job" example in mistral-extra doesn't work yet properly and our current development focus is actually to make it work. It should happen soon.

As for the second problem (Context must be a dictionary...) please update to the latest version and it should work.

Please let us know if we can help you with anything else.

Renat

edit flag offensive delete link more

Comments

Hi Renat, yes, I cloned Mistral several days ago. I will look into it once again perhaps re-clone it. Thanks.

avi gravatar imageavi ( 2014-03-20 04:13:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-03-11 04:44:20 -0500

Seen: 200 times

Last updated: Mar 13 '14