openstack undercloud install fails with CalledProcessError: Command '['find', '/home/stack/.ssh', '-exec', 'ls', '-lZ', '{}', ';']' returned non-zero exit status 1

Solution In Progress - Updated -

Issue

  • We are trying to install the undercloud with the below undercloud.conf file parameters and were facing the below issue. On making the changes on the undercloud.py file the undercloud installation was successful.
local_ip = 192.168.15.10/24
undercloud_public_host = 192.168.15.11
undercloud_admin_host = 192.168.15.12
undercloud_nameservers = 10.135.2.13
overcloud_domain_name = localdomain
local_interface = ens224
masquerade_network = 192.168.15.0/24
generate_service_certificate = false
undercloud_ntp_servers = 10.135.2.13
undercloud_hostname = vm-os-dir.localdomain
clean_nodes = true
overcloud_domain_name = localdomain
enable_ui = true
  • We have also enabled SeLinux to Enforcing mode:
 [stack@vm-os-dir ~]$ getenforce
Enforcing
  • openstack undercloud install fails with the following:
2020-01-21 23:31:31,838 DEBUG: GET call to compute for http://192.168.15.10:8774/v2.1/os-keypairs/default used request id req-a894c03d-1109-4f30-b0c3-4a46a5b78701
2020-01-21 23:31:31,846 ERROR: find failed: find: Failed to change directory: Permission denied
find: Failed to change directory: Permission denied
find: Failed to change directory: Permission denied
find: failed to restore initial working directory: Permission denied

2020-01-21 23:31:31,846 DEBUG: An exception occurred
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 2447, in install
    _post_config(instack_env, upgrade)
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 2117, in _post_config
    _ensure_ssh_selinux_permission()
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 1730, in _ensure_ssh_selinux_permission
    ['find', ssh_path, '-exec', 'ls', '-lZ', '{}', ';'])
  File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 641, in _run_command
    env=env).decode('utf-8')
  File "/usr/lib64/python2.7/subprocess.py", line 575, in check_output
    raise CalledProcessError(retcode, cmd, output=output)
CalledProcessError: Command '['find', '/home/stack/.ssh', '-exec', 'ls', '-lZ', '{}', ';']' returned non-zero exit status 1
2020-01-21 23:31:31,860 ERROR:
#############################################################################
Undercloud install failed.

Reason: Command '['find', '/home/stack/.ssh', '-exec', 'ls', '-lZ', '{}', ';']' returned non-zero exit status 1

See the previous output for details about what went wrong.  The full install
log can be found at /home/stack/.instack/install-undercloud.log.

#############################################################################
  • We made the changes on the undercloud.py file on line: 1730 to get the undercloud installation successfully running:
 ['find', ssh_path, '-exec', 'ls', '-lZa', '{}', ';']) 

where we added an 'a' for -lZ as it was not getting the .ssh directory.

  • After fixing that line we were able to install the undercloud successfully:
2020-01-22 11:14:36,658 INFO:
#############################################################################
Undercloud install complete.

The file containing this installation's passwords is at
/home/stack/undercloud-passwords.conf.

There is also a stackrc file at /home/stack/stackrc.

These files are needed to interact with the OpenStack services, and should be
secured.

#############################################################################

Environment

  • Red Hat OpenStack Platform 13.0 (RHOSP)

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content