openstack actions don't work from workflow created by trigger

Bug #1707953 reported by Nikolay Makhotkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mistral
Fix Released
Critical
Adriano Petrich

Bug Description

Assume workflow

---
version: '2.0'

test_cron_trigger:
  tasks:
    test:
      action: cinder.volumes_list

1. Create cron-trigger with this workflow
2. Get error during workflow execution:
  CinderAction.volumes.list failed: Authorization failed: You are not authorized to perform the requested action. (HTTP 403)

Changed in mistral:
milestone: pike-3 → pike-rc1
Revision history for this message
Ritesh Paiboina (rsritesh) wrote :

Hi,
I am getting the following failed error: ""Could not find trust: 45a4cbc7777d4441abef9b16eb8b3696 "" ,

 is it the same error you are getting too ? ??

My Workflow:
----------------------------------------------------------------
version: "2.0"

test_cron_trigger:
  type: direct

  tasks:
    test:
      action: cinder.volumes_list

----------------------------------------------------------------

mistral workflow-create 1707953.yaml

mistral cron-trigger-create test-cron test_cron_trigger --first-time '2017-08-08 09:24'

ritesh@smiley:~$ mistral execution-get-output 662a9a75-96c1-43e4-bb46-45e9450ed235
{
    "result": "Failure caused by error in tasks: test\n\n test [task_ex_id=02b74b5b-dc6b-4b35-ba63-f4b0c24bb927] -> Failed to run action [action_ex_id=fb8738f9-22b0-4ae9-a09e-adf261299e4b, action_cls='<class 'mistral.actions.action_factory.CinderAction'>', attributes='{u'client_method_name': u'volumes.list'}', params='{}']\n CinderAction.volumes.list failed: Could not find trust: 45a4cbc7777d4441abef9b16eb8b3696. (HTTP 404) (Request-ID: req-18efe81b-cbe2-4145-9964-64110b6d7e66)\n [action_ex_id=fb8738f9-22b0-4ae9-a09e-adf261299e4b, idx=0]: Failed to run action [action_ex_id=fb8738f9-22b0-4ae9-a09e-adf261299e4b, action_cls='<class 'mistral.actions.action_factory.CinderAction'>', attributes='{u'client_method_name': u'volumes.list'}', params='{}']\n CinderAction.volumes.list failed: Could not find trust: 45a4cbc7777d4441abef9b16eb8b3696. (HTTP 404) (Request-ID: req-18efe81b-cbe2-4145-9964-64110b6d7e66)\n"
}

ritesh@smiley:~$ cinder list
+----+--------+------+------+-------------+----------+-------------+
| ID | Status | Name | Size | Volume Type | Bootable | Attached to |
+----+--------+------+------+-------------+----------+-------------+
+----+--------+------+------+-------------+----------+-------------+

Changed in mistral:
assignee: nobody → Adriano Petrich (apetrich)
Revision history for this message
Adriano Petrich (apetrich) wrote :
Download full text (11.2 KiB)

I think there were two issues and one of them was fixed.

I tried it today as it stands and it fails, but with

2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic [-] Failed to process cron trigger CronTrigger {'workflow_params': {}, 'name': u'test-cron', 'workflow_name': u'test_cron_trigger', 'pattern': u'0 0 30 2 0', 'created_at': '2017-08-23 08:16:24', 'updated_at': None, 'workflow_input': {}, 'workflow_params_hash': u'4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945', 'workflow_id': u'32a4a3f2-e0c8-4ede-8a8c-676a85cb00fc', 'first_execution_time': '2017-08-23 08:21:00', 'remaining_executions': 1, 'workflow_input_hash': u'4f53cda18c2baa0c0354bb5f9a3ecbe5ed12ab4d8e11ba873c2f11161202b945', 'scope': u'private', 'project_id': u'1f180b5ba33449b4af981495062379e7', 'id': u'7f2c745d-521b-4529-92a3-76e9ee1ac665', 'trust_id': u'ef593465c37542899f76ea9ba04402a3', 'next_execution_time': '2017-08-23 08:21:00'}: AuthorizationFailure: Authentication cannot be scoped to multiple targets. Pick one of: project, domain, trust or unscoped
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic Traceback (most recent call last):
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/mistral/services/periodic.py", line 46, in process_cron_triggers_v2
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic trigger.trust_id, trigger.project_id
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/mistral/services/security.py", line 65, in create_context
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic client = keystone.client_for_trusts(trust_id)
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/mistral/utils/openstack/keystone.py", line 141, in client_for_trusts
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic return _admin_client(trust_id=trust_id)
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/mistral/utils/openstack/keystone.py", line 105, in _admin_client
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic trust_id=trust_id
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/keystoneclient/v3/client.py", line 246, in __init__
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic self.authenticate()
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/positional/__init__.py", line 101, in inner
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic return wrapped(*args, **kwargs)
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/keystoneclient/httpclient.py", line 581, in authenticate
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic resp = self.get_raw_token_from_identity_service(**kwargs)
2017-08-23 09:05:19.361 5984 ERROR mistral.services.periodic File "/usr/lib/python2.7/site-packages/keystoneclient/v3/client.py", line 322, in get_raw_token_from_identity_service
2017-08-23 09:05:19.361 59...

Changed in mistral:
status: Confirmed → Fix Committed
Changed in mistral:
milestone: pike-rc1 → pike-rc2
Changed in mistral:
milestone: pike-rc2 → queens-1
Changed in mistral:
status: Fix Committed → Fix Released
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.