overcloud re-deploy fails with PermissionError

Bug #1874432 reported by Rabi Mishra
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Fix Released
Rabi Mishra

Bug Description

Looks like we're trying to change acl[1] for ansible-playbook-command.sh as current user where as it's owned by mistral user[2].

[1] https://github.com/openstack/python-tripleoclient/blob/master/tripleoclient/utils.py#L644
[2] https://github.com/openstack/tripleo-ansible/blob/master/tripleo_ansible/playbooks/cli-grant-local-access.yaml#L38-L39


/usr/share/ansible/tripleo-playbooks/cli-grant-local-access.yaml:34 -----------
Check for required inputs ----------------------------------------------- 0.29s
/usr/share/ansible/tripleo-playbooks/cli-grant-local-access.yaml:24 -----------
Temporary directory [ /tmp/tripleo2musqho6 ] cleaned up
Ansible execution success. playbook: /usr/share/ansible/tripleo-playbooks/cli-grant-local-access.yaml
Temporary directory [ /tmp/tripleo5e8rsika ] cleaned up
Checking for blacklisted hosts from stack: overcloud
Retrieving configuration for stack: overcloud
Generating configuration under the directory: /tmp/tripleo-0ai0bzyt-config
Getting deployment data from Heat...
The TripleO configuration has been successfully generated into: /tmp/tripleo-0ai0bzyt-config
Snapshotting /tmp/tripleo-0ai0bzyt-config
Created commit 32db3d535e07a1e0f743d29a958435809d2b0d32
Downloading configuration for stack: overcloud
Retrieving keyfile for stack: overcloud
Generating information for stack: overcloud
Executing deployment playbook for stack: overcloud
Running Ansible playbook with timeout 231m: /var/lib/mistral/overcloud/deploy_steps_playbook.yaml, Working directory: /var/lib/mistral/overcloud/deploy_steps_playbook.yaml, Playbook directory: /tmp/tripleo3oywx_dv
Temporary directory [ /tmp/tripleo0clr93xn ] cleaned up
Temporary directory [ /tmp/tripleo3oywx_dv ] cleaned up
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
  File "/usr/lib/python3.6/site-packages/tripleoclient/workflows/deployment.py", line 496, in config_download
  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'
END return value: 1

Revision history for this message
Rabi Mishra (rabi) wrote :
Changed in tripleo:
status: Triaged → In Progress
Changed in tripleo:
milestone: none → victoria-1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.opendev.org/721573
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=191438f7435aa19e9656a2052bbb6fa5ce7b6b32
Submitter: Zuul
Branch: master

commit 191438f7435aa19e9656a2052bbb6fa5ce7b6b32
Author: Rabi Mishra <email address hidden>
Date: Tue Apr 21 16:13:07 2020 +0530

    Don't use mistral directory as WORK_DIR for config-download

    As part of mistral removal all config-downloaded playbooks
    are run from tripleoclient. This changes the download location
    to $HOME/config-download.

    Documentation for default location will be changed along with
    all doc changes for mistral removal.

    Closes-Bug: #1874432
    Depends-On: https://review.opendev.org/721568/
    Change-Id: Ib4c9c47baabd64f008c4f61e4fa8c37a311350a3

Changed in tripleo:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.