Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Mistral: unable to create an execution

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 |
+-----------------+------------------+------+

Thanks a lot. Please let me know if you need any other information.

Mistral: unable to create an execution

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 |
+-----------------+------------------+------+

Thanks 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 lot. Please let me know if you need any other information.dictionary or json compatible string.Expecting property name: line 1 column 1 (char 1)

Any help is highly appreciated.