Make sure std.javascript raises ActionException if its javascript does
Bug #1471737 reported by
Renat Akhmerov
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mistral |
Invalid
|
Medium
|
Nikolay Makhotkin | ||
Liberty |
Invalid
|
Medium
|
Nikolay Makhotkin |
Bug Description
Make sure std.javascript raises ActionException if its javascript does. Need to test and fix if needed.
Changed in mistral: | |
milestone: | none → liberty-2 |
assignee: | nobody → Nikolay Makhotkin (nmakhotkin) |
Changed in mistral: | |
milestone: | 1.0.0 → none |
To post a comment you must log in.
PyV8 throws an exception and an ActionException is thrown:
2015-07-06 11:27:52.355 9549 INFO workflow_trace [-] Action execution 'nova.servers_get' [RUNNING -> ERROR, error = Failed to run action [action_ ex_id=e2aa2076- ee2a-465e- b834-e89971d1b5 d7, action_cls='<class 'mistral...] (execution_id=e3 2f33-4193- bc30-f9b5d13fc1 fb) engine. default_ executor [-] Failed to run action [action_ ex_id=c71c6b0b- 1769-4fb6- a4c4-7d92072b3f 67, action_cls='<class 'mistral. actions. action_ factory. NovaAction' >', attributes= '{u'client_ metho 5b08-4424- ba4a-9d919bd1f8 ff'}'] servers. get failed: <class 'novaclient. exceptions. NotFound' >: Instance could not be found engine. default_ executor Traceback (most recent call last): engine. default_ executor File "/usr/lib/ python2. 7/site- packages/ mistral/ engine/ default_ executor. py", line 52, in run_action engine. default_ executor result = action.run() engine. default_ executor File "/usr/lib/ python2. 7/site- packages/ mistral/ actions/ openstack/ base.py" , line 78, in run engine. default_ executor (self._ _class_ _.__name_ _, self.client_ method_ name, e_str) engine. default_ executor ActionException: NovaAction. servers. get failed: <class 'novaclient. exceptions. NotFound' >: Instance could not be found engine. default_ executor
9156cc-
2015-07-06 11:27:52.364 9571 ERROR mistral.
d_name': u'servers.get'}', params='{u'server': u'd1433867-
NovaAction.
2015-07-06 11:27:52.364 9571 TRACE mistral.
2015-07-06 11:27:52.364 9571 TRACE mistral.
2015-07-06 11:27:52.364 9571 TRACE mistral.
2015-07-06 11:27:52.364 9571 TRACE mistral.
2015-07-06 11:27:52.364 9571 TRACE mistral.
2015-07-06 11:27:52.364 9571 TRACE mistral.
2015-07-06 11:27:52.364 9571 TRACE mistral.
This is the workflow:
---
version: '2.0'
test_exception:
type: direct
tasks:
js_task:
action: std.javascript
input:
context: <% $ %>
script: throw "JavaScript custom exception"
on-success:
- success
on-error:
- error
error:
action: std.noop
success:
action: std.noop
This is the task-list:
+------ ------- ------- ------- ------- ----+-- ------- +------ ------- ---+--- ------- ------- ------- ------- ------- +------ ---+ ------- ------- ------- ------- ----+-- ------- +------ ------- ---+--- ------- ------- ------- ------- ------- +------ ---+ eff8-49dd- a149-8b3b20414c d8 | js_task | test_exception | 77d7dfb2- 92c5-4b65- 8477-f22c14b390 a4 | ERROR | 5fe1-4920- 8044-beb4b14fc0 85 | error | test_exception | 77d7dfb2- 92c5-4b65- 8477-f22c14b390 a4 | SUCCESS | ------- ------- ------- ------- ----+-- ------- +------ ------- ---+--- ------- ------- ------- ------- ------- +------ ---+
| ID | Name | Workflow name | Execution ID | State |
+------
| 223aec2b-
| 6d89e1bc-
+------