overcloud deploy command fails with Traceback when executed by root

Bug #1918560 reported by Takashi Kajinami on 2021-03-10
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Undecided
Takashi Kajinami

Bug Description

Description
===========
When the "openstack overcloud deploy" command is executed by root, the command fails with the following Traceback.

~~~
Deploying overcloud configuration
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 32, 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 185, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_deploy.py", line 1085, in take_action
    utils.copy_clouds_yaml(user)
  File "/usr/lib/python3.6/site-packages/tripleoclient/utils.py", line 2045, in copy_clouds_yaml
    clouds_user_id = os.stat(clouds_home_dir).st_uid
FileNotFoundError: [Errno 2] No such file or directory: '/home/root'
[Errno 2] No such file or directory: '/home/root'
~~~

It seems that there is a wrong assumption about home directory in the logic to generate clouds.yaml.

Steps to reproduce
==================
Run "openstack overcloud deploy" command by root

Expected result
===============
The command succeeds without error
(or it should be blocked if needed)

Actual result
=============
The command fails with the Traceback

Environment
===========
This issue was initially observed in stable/train but the same logic still exists in master.

Logs & Configs
==============
N/A

Revision history for this message
Takashi Kajinami (kajinamit) wrote :

Seems like the issue was fixed by the following commit.
This change was backported to Ussuri and later but not yet backported to Train.
 https://review.opendev.org/c/openstack/python-tripleoclient/+/760440

Changed in tripleo:
assignee: nobody → Takashi Kajinami (kajinamit)
status: New → In Progress
Revision history for this message
yatin (yatinkarel) wrote :
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.5.0

This issue was fixed in the openstack/python-tripleoclient 12.5.0 release.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers