Bug 2133297
| Summary: | [OSP17] Tripleo doesn't set the right permission to path "/home/stack/.tripleo/" during undercloud installation | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Ravi Singh <ravsingh> |
| Component: | python-tripleoclient | Assignee: | Takashi Kajinami <tkajinam> |
| Status: | CLOSED ERRATA | QA Contact: | David Rosenfeld <drosenfe> |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 17.0 (Wallaby) | CC: | bshephar, hbrock, jslagle, mburns, rhayakaw, tkajinam, yatanaka |
| Target Milestone: | ga | Keywords: | Reopened, Triaged |
| Target Release: | 17.1 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | python-tripleoclient-16.5.1-1.20230214000856.b780e6d.el9ost | Doc Type: | Bug Fix |
| Doc Text: |
Before this update, the `openstack undercloud install` command launched the `openstack tripleo deploy` command, which created the `/home/stack/.tripleo/history` file with `root:root` as the owner. Subsequent deploy commands failed because of permission errors. With this update, the command creates the file with the `stack` user as the owner, and deploy commands succeed without permission errors.
|
Story Points: | --- |
| Clone Of: | Environment: | ||
| Last Closed: | 2023-08-16 01:12:25 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
Ravi Singh
2022-10-09 17:37:02 UTC
Can you be a bit more specific about how you hit this error? Were any tripleo commands run before the undercloud install? The steps to reproduce indicate you can't install the undercloud at all. 17.0 has undergone extensive testing, so I would like to understand better what happened in your environment to hit this error. I don't remember any extra commands executed apart from mentioned in official but unfortunately, my machine got re-provisioned & in the new setup, I am not able to reproduce this issue. I will close this bug & will re-open if the issue encountered again. Hello, DFG:DF team, I'm hitting the same error on my RHOSP 17.0 GA environment. Our document[1] tell us to execute the following command with "sudo". [1]https://access.redhat.com/documentation/en-us/red_hat_openstack_platform/17.0/html/director_installation_and_usage/assembly_preparing-for-director-installation#proc_preparing-container-images_preparing-for-director-installation $ sudo openstack tripleo container image prepare default \ --local-push-destination \ --output-env-file containers-prepare-parameter.yaml That's why the following file/directory are created with root owner. [stack@undercloud ~]$ ll -a : drwxr-xr-x. 2 root root 21 Oct 20 10:59 .tripleo : -rw-r--r--. 1 root root 1192 Oct 20 10:59 containers-prepare-parameter.yaml : Therefore, "openstack undercloud install" fails due to permission issue. [stack@undercloud ~]$ openstack undercloud install Unable to write into TripleO history file: /home/stack/.tripleo, [Errno 13] Permission denied: '/home/stack/.tripleo/history' I think there are three options to solve this issue. (1)Modify our document[1] to execute the following command after "sudo openstack tripleo container image prepare" as mentioned in Bug 2058492. $ sudo chown -R stack. /home/stack/.tripleo/ (2)Modify python-tripleoclient to create /home/stack/.tripleo directory and subordinate files with 777 or 666 permissions (3)Remove "sudo" from our document[1]. But I'm not sure if we can remove "sudo" safely from "openstack tripleo container image prepare" command. Upstream document[2] says that sudo is essential, but I succeeded to deploy RHOSP 17.0-beta without sudo as far as I tested before. [2]https://docs.openstack.org/project-deploy-guide/tripleo-docs/latest/deployment/container_image_prepare.html#running-container-image-prepare Would you give me your thoughts? I think the problem here is that we honor SUDO_USER when locating the home directory but do not honor it when creating files/directories under it. So what we likely need is to make ~/.tripleo and ~/.tripleo/history owned by SUDO_USER instead of root. IIUC the fix for https://review.opendev.org/c/openstack/python-tripleoclient/+/847093 fixes the owner but that happens AFTER the command attempts to modify the history file. Bulk moving target milestone to GA after the release of Beta on 14th June '23. 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.1 (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-2023:4577 |