The playbook re-execution script should be moved to the users home folder

Bug #1869762 reported by Kevin Carter
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
In Progress
Undecided
Kevin Carter

Bug Description

When executing tripleoclient commands the client provides the ability to re-execute a given ansible command via the `ansible-playbook-command.sh` script. This script original was owned and created by mistral, however, with the removal of mistral there is no expectation that the user (generally stack) has 100% to all files and folders owned by mistral and its respective container. We should move the write path for the script `ansible-playbook-command.sh` to the users designated output directory so that we're not making the assumption the client is able to write into a container path.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.opendev.org/716017

Changed in tripleo:
assignee: nobody → Kevin Carter (kevin-carter)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-tripleoclient (master)

Change abandoned by Kevin Carter (cloudnull) (<email address hidden>) on branch: master
Review: https://review.opendev.org/716017

Revision history for this message
Noam Angel (noama) wrote :

altought https://review.opendev.org/#/c/712223 is merged seems like your change or other fix is still needed

Grant privileges to the execution user ---------------------------------- 1.42s
Ensure access path exists ----------------------------------------------- 0.81s
Check for required inputs ----------------------------------------------- 0.47s
523241 1587294858.97590: RUNNING CLEANUP
Checking for blacklisted hosts from stack: overcloud
Retrieving configuration for stack: overcloud
Downloading configuration for stack: overcloud
Retrieving keyfile for stack: overcloud
Generating information for stack: overcloud
Executing deployment playbook for stack: overcloud
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 34, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 187, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 1052, in take_action
    deployment_timeout=timeout
  File "/usr/lib/python3.6/site-packages/tripleoclient/workflows/deployment.py", line 496, in config_download
    timeout=deployment_timeout,
  File "/usr/lib/python3.6/site-packages/tripleoclient/utils.py", line 644, in run_ansible_playbook
    os.chmod(command_path, 0o750)
PermissionError: [Errno 1] Operation not permitted: '/var/lib/mistral/overcloud/ansible-playbook-command.sh'
[Errno 1] Operation not permitted: '/var/lib/mistral/overcloud/ansible-playbook-command.sh'

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.