tripleo.ansible-generate-inventory fails when used during deployment/update

Bug #1741875 reported by Christian Schwede
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Unassigned

Bug Description

Generating an Ansible inventory using tripleo.ansible-generate-inventory fails when used during deployment/update. It does work properly when used in Mistral and the the workflow is triggered on the CLI, but when used either in Mistral or directly in TripleO it fails with an authentication error due to usage of a scoped token.

This is somewhat unfortunate, because one needs to manually generate an inventory for Ansible and can't use the builtin tripleo-ansible-inventory which sets some other useful host variables.

stderr: u'Error creating inventory: You are not authorized to perform the requested action: Using trust-scoped token to create another token. Create a new trust-scoped token instead. (HTTP 403) (Request-ID: req-9fd6679c-3009-4ee5-b4d8-edb008306ab1)\n' execute /usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py:443
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor [req-ece5ecd1-5e5d-441d-8782-3b5b1c889ce3 f6137b2272494b2abf615e078a2a77be 989bade5dea74a13921dde733d574a94 - default default] Failed to run action [action_ex_id=a3da64ad-2537-4621-9996-4a256b5422ed, action_cls='<class 'mistral.actions.action_factory.AnsibleGenerateInventoryAction'>', attributes='{}', params='{}']
 Unexpected error while running command.
Stderr: u'Error creating inventory: You are not authorized to perform the requested action: Using trust-scoped token to create another token. Create a new trust-scoped token instead. (HTTP 403) (Request-ID: req-9fd6679c-3009-4ee5-b4d8-edb008306ab1)\n': ProcessExecutionError: Unexpected error while running command.
Stderr: u'Error creating inventory: You are not authorized to perform the requested action: Using trust-scoped token to create another token. Create a new trust-scoped token instead. (HTTP 403) (Request-ID: req-9fd6679c-3009-4ee5-b4d8-edb008306ab1)\n'
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor Traceback (most recent call last):
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor File "/usr/lib/python2.7/site-packages/mistral/executors/default_executor.py", line 110, in run_action
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor result = action.run(action_ctx)
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor File "/usr/lib/python2.7/site-packages/tripleo_common/actions/ansible.py", line 551, in run
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor log_errors=processutils.LogErrors.ALL)
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor File "/usr/lib/python2.7/site-packages/oslo_concurrency/processutils.py", line 419, in execute
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor cmd=sanitized_cmd)
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor ProcessExecutionError: Unexpected error while running command.
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor Command: /usr/bin/tripleo-ansible-inventory --static-inventory /tmp/ansible-mistral-actionDeqUz6/tripleo-ansible-inventory --ansible_ssh_user tripleo-admin
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor Exit code: 1
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor Stdout: u''
2018-01-08 10:37:42.373 18337 ERROR mistral.executors.default_executor Stderr: u'Error creating inventory: You are not authorized to perform the requested action: Using trust-scoped token to create another token. Create a new trust-scoped token instead. (HTTP 403) (Request-ID: req-9fd6679c-3009-4ee5-b4d8-edb008306ab1)\n'

Revision history for this message
Christian Schwede (cschwede) wrote :
Changed in tripleo:
status: New → Triaged
milestone: none → rocky-3
milestone: rocky-3 → queens-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tripleo-common (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/533233

Changed in tripleo:
milestone: queens-3 → queens-rc1
Changed in tripleo:
milestone: queens-rc1 → rocky-1
Changed in tripleo:
milestone: rocky-1 → rocky-2
Changed in tripleo:
milestone: rocky-2 → rocky-3
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tripleo-common (master)

Change abandoned by Christian Schwede (<email address hidden>) on branch: master
Review: https://review.openstack.org/533233
Reason: No longer needed.

Changed in tripleo:
milestone: rocky-3 → rocky-rc1
Changed in tripleo:
milestone: rocky-rc1 → stein-1
Changed in tripleo:
milestone: stein-1 → stein-2
Changed in tripleo:
milestone: stein-2 → stein-3
Changed in tripleo:
milestone: stein-3 → stein-rc1
Changed in tripleo:
milestone: stein-rc1 → train-1
Changed in tripleo:
milestone: train-1 → train-2
Revision history for this message
Luke Short (ekultails) wrote :

I have tested and verified that this is no longer an issue when using config-download on >= Queens.

Changed in tripleo:
status: Triaged → 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.