Bug 1689451

Summary: undercloud install failed while add IronicDefaultDeployInterface: direct
Product: Red Hat OpenStack Reporter: Yuri Obshansky <yobshans>
Component: python-tripleoclientAssignee: Emilien Macchi <emacchi>
Status: CLOSED ERRATA QA Contact: Sasha Smolyak <ssmolyak>
Severity: high Docs Contact:
Priority: high    
Version: 15.0 (Stein)CC: agurenko, emacchi, hbrock, hjensas, jslagle, mburns, osp-e2e-qe
Target Milestone: betaKeywords: Triaged
Target Release: 15.0 (Stein)   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: python-tripleoclient-11.3.1-0.20190411050351.ef0e508.el8ost Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-09-21 11:20:49 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:

Description Yuri Obshansky 2019-03-15 23:07:23 UTC
Description of problem:
Undercloud install failed while undercloud.conf has entry for IronicDefaultDeployInterface: direct as separate yaml file

[stack@site-undercloud-0 ~]$ cat undercloud_custom_env.yaml
parameter_defaults:
   IronicDefaultDeployInterface: direct


[stack@site-undercloud-0 ~]$ cat undercloud.conf
[DEFAULT]
local_interface = eth0
local_ip = 192.168.24.1/24
undercloud_ntp_servers=clock.redhat.com
hieradata_override = /home/stack/hiera_override.yaml
container_images_file=/home/stack/containers-prepare-parameter.yaml
container_insecure_registries=brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888
undercloud_service_certificate = /etc/pki/instack-certs/undercloud.pem
enable_routed_networks = true
subnets = leaf0,leaf1,leaf2
local_subnet = leaf0
custom_env_files = /home/stack/undercloud_custom_env.yaml

[leaf0]
cidr = 192.168.24.0/24
dhcp_start = 192.168.24.10
dhcp_end = 192.168.24.90
inspection_iprange = 192.168.24.100,192.168.24.190
gateway = 192.168.24.254
masquerade = False

[leaf1]
cidr = 192.168.34.0/24
dhcp_start = 192.168.34.10
dhcp_end = 192.168.34.90
inspection_iprange = 192.168.34.100,192.168.34.190
gateway = 192.168.34.254
masquerade = False

[leaf2]
cidr = 192.168.44.0/24
dhcp_start = 192.168.44.10
dhcp_end = 192.168.44.90
inspection_iprange = 192.168.44.100,192.168.44.190
gateway = 192.168.44.254
masquerade = False

Failed with error:
2019-03-15 22:38:49.560 14551 INFO tripleoclient.v1.undercloud_preflight.UndercloudSetup [  ] Checking Hostname...
2019-03-15 22:38:49.674 14551 INFO tripleoclient.v1.undercloud_preflight.UndercloudSetup [  ] Checking Memory...
2019-03-15 22:38:49.674 14551 INFO tripleoclient.v1.undercloud_preflight.UndercloudSetup [  ] Checking Disk space...
2019-03-15 22:38:54.018 14551 INFO tripleoclient.v1.undercloud_preflight.UndercloudSetup [  ] Checking Sysctl...
2019-03-15 22:38:54.019 14551 INFO tripleoclient.v1.undercloud_preflight.UndercloudSetup [  ] Checking Password file...
2019-03-15 22:38:54.019 14551 INFO tripleoclient.v1.undercloud_preflight.UndercloudSetup [  ] Checking Deprecated now invalid options...
2019-03-15 22:38:54.019 14551 INFO tripleoclient.v1.undercloud_preflight.UndercloudSetup [  ] Checking Custom env file...
2019-03-15 22:38:54.024 14551 ERROR tripleoclient.v1.undercloud.InstallUndercloud [  ] Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 29, 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 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud.py", line 128, in take_action
    dry_run=parsed_args.dry_run)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud_config.py", line 692, in prepare_undercloud_deploy
    undercloud_preflight.check(verbose_level, upgrade)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud_preflight.py", line 476, in check
    _validate_env_files_paths()
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud_preflight.py", line 357, in _validate_env_files_paths
    name='process-templates-dry-run', cwd=tht_path, wait=False)
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/undercloud_preflight.py", line 60, in _run_live_command
    universal_newlines=True)
  File "/usr/lib64/python3.6/subprocess.py", line 729, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.6/subprocess.py", line 1364, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'python': 'python'

Version-Release number of selected component (if applicable):
[stack@site-undercloud-0 ~]$ rpm -qa "*tripleo*"
openstack-tripleo-image-elements-10.2.1-0.20190312231236.1bde610.el8ost.noarch
openstack-tripleo-puppet-elements-10.1.1-0.20190313023721.7903181.el8ost.noarch
openstack-tripleo-heat-templates-10.3.1-0.20190314080339.05f1ae0.el8ost.noarch
ansible-tripleo-ipsec-9.0.1-0.20190220162047.f60ad6c.el8ost.noarch
ansible-role-tripleo-modify-image-1.0.1-0.20190226075404.9014df9.el8ost.noarch
openstack-tripleo-common-containers-10.4.1-0.20190313060345.1377727.el8ost.noarch
python3-tripleoclient-heat-installer-11.2.1-0.20190313150340.969e01a.el8ost.noarch
openstack-tripleo-validations-10.2.1-0.20190218150113.e6490b3.el8ost.noarch
python3-tripleoclient-11.2.1-0.20190313150340.969e01a.el8ost.noarch
puppet-tripleo-10.3.0-0.20190313021639.73b547b.el8ost.noarch
python3-tripleo-common-10.4.1-0.20190313060345.1377727.el8ost.noarch
openstack-tripleo-common-10.4.1-0.20190313060345.1377727.el8ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Create custom yaml file with 
parameter_defaults:
   IronicDefaultDeployInterface: direct
2. Add to undercloud.conf entry with path those yaml file
custom_env_files = /home/stack/undercloud_custom_env.yaml
3. Start openstack undercloud install 

Actual results:
FileNotFoundError: [Errno 2] No such file or directory: 'python': 'python'

Expected results:
No error


Additional info:

Comment 1 James Slagle 2019-03-18 13:57:28 UTC
looks like it's specific to when custom_env_files are included, there is a hardcoded 'python' in tripleoclient that needs to be fixed.

Comment 4 Yuri Obshansky 2019-04-17 20:43:29 UTC
Verified on openstack-tripleo-heat-templates-10.4.1-0.20190403221322.0d98720.el8ost.noarch
It is not reproducible.

Comment 7 errata-xmlrpc 2019-09-21 11:20:49 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, 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-2019:2811