Bug 2058492

Summary: [OSP17] Tripleo doesn't set the right permission to path "/home/stack/.tripleo/" during undercloud installation
Product: Red Hat OpenStack Reporter: Pradipta Kumar Sahoo <psahoo>
Component: python-tripleoclientAssignee: James Slagle <jslagle>
Status: CLOSED ERRATA QA Contact: David Rosenfeld <drosenfe>
Severity: medium Docs Contact:
Priority: medium    
Version: 17.1 (Wallaby)CC: cjeanner, hbrock, jschluet, jslagle, mburns, ravsingh
Target Milestone: betaKeywords: Triaged
Target Release: 17.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: python-tripleoclient-16.4.1-0.20220701161515.a6cfbca.el9ost Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-21 12:19:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Pradipta Kumar Sahoo 2022-02-25 06:30:45 UTC
Description of problem:
Tripleo doesn't set the right permission to path "/home/stack/.tripleo/" during undercloud installation

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux release 9.0 Beta (Plow)
Puddle: RHOS-17.0-RHEL-9-20220214.n.1

How reproducible:
Scale lab test

Steps to Reproduce:
1. Execute: openstack undercloud install 

2. Error:
Unable to write into TripleO history file: /home/stack/.tripleo, [Errno 13] Permission denied: '/home/stack/.tripleo/history'


3. Workaround steps:
sudo chown -R stack. /home/stack/.tripleo/

4. Then deployment command able write the history:
$ ll /home/stack/.tripleo/history
-rw-r--r-- 1 stack stack 501 Feb 25 01:20 /home/stack/.tripleo/history

$ ll /home/stack/.tripleo/history
-rw-r--r-- 1 stack stack 501 Feb 25 01:20 /home/stack/.tripleo/history


Actual results: Failed the deployment command


Expected results: Set the correct user permission

Comment 1 Cédric Jeanneret 2022-02-25 12:37:25 UTC
Guess we could change rights/ownership here:
https://opendev.org/openstack/python-tripleoclient/src/branch/stable/train/tripleoclient/utils.py#L564

But we'd also need to ensure the actual file(s) created here have the same ownership/rights, else it will fail as well. Knowing most of the runs are launched as root (via sudo), a quick check on the UID might help.

Comment 5 David Rosenfeld 2022-07-28 20:09:06 UTC
History file is writeable to deployment user:

ls -la /home/stack/.tripleo/
total 8
drwx------.  2 stack stack   21 Jul 28 14:48 .
drwx------. 10 stack stack 4096 Jul 28 15:05 ..
-rw-rw-r--.  1 stack stack  369 Jul 28 14:48 history

Comment 9 errata-xmlrpc 2022-09-21 12:19:32 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Release of components for Red Hat OpenStack Platform 17.0 (Wallaby)), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:6543