Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1368414 - [quick install] The variables defined in host level (installer.cfg.yml) aren't applied to inventory_hosts
[quick install] The variables defined in host level (installer.cfg.yml) aren'...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer (Show other bugs)
3.3.0
Unspecified Unspecified
high Severity medium
: ---
: ---
Assigned To: Samuel Munilla
liujia
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-19 06:24 EDT by Gan Huang
Modified: 2016-10-27 12:13 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Previously, additional configuration variables needed to be defined by setting 'other_variables' in the quick installer configuration file. Now the quick installer has been updated to include any variables defined in the hosts section.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-10-27 12:13:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2122 normal SHIPPED_LIVE OpenShift Container Platform atomic-openshift-utils bug fix update 2016-10-27 16:11:30 EDT

  None (edit)
Description Gan Huang 2016-08-19 06:24:43 EDT
Description of problem:
The variables defined in host level (installer.cfg.yml) aren't applied to inventory_hosts

Version-Release number of selected component (if applicable):
atomic-openshift-utils-3.3.12-1.git.0.b26c8c2.el7.noarch

How reproducible:
100%


Steps to Reproduce:
1.Prepare insaller.cfg.yml including ansible_ssh_private_key_file defined.
#cat installer.cfg.yml
<--snip-->
  hosts:
  - connect_to: openshift-127.lab.eng.nay.redhat.com
    ansible_ssh_private_key_file: "/root/.ssh/libra.pem"
    hostname: openshift-127.lab.eng.nay.redhat.com
    ip: 192.168.2.157
    node_labels: '{''region'': ''infra''}'
    public_hostname: openshift-127.lab.eng.nay.redhat.com
    public_ip: 10.66.147.127
    roles:
    - master
    - etcd
    - node
<--snip-->
2.atomic-openshift-installer -c installer.cfg.yml -u install
3.

Actual results:
The variable of ansible_ssh_private_key_file isn't applied to generated inventory_hosts
#cat /hosts
<--snip-->
[nodes]
openshift-127.lab.eng.nay.redhat.com  openshift_ip=192.168.2.157 openshift_public_ip=10.66.147.127 openshift_hostname=openshift-127.lab.eng.nay.redhat.com openshift_public_hostname=openshift-127.lab.eng.nay.redhat.com openshift_node_labels="{'region': 'infra'}" openshift_schedulable=False

[masters]
openshift-127.lab.eng.nay.redhat.com  openshift_ip=192.168.2.157 openshift_public_ip=10.66.147.127 openshift_hostname=openshift-127.lab.eng.nay.redhat.com openshift_public_hostname=openshift-127.lab.eng.nay.redhat.com
<--snip-->

Expected results:
Should be designed as https://github.com/openshift/openshift-ansible/pull/1778#issuecomment-224001553

Additional info:
Comment 1 Samuel Munilla 2016-09-09 16:44:17 EDT
https://github.com/openshift/openshift-ansible/pull/2426 opened to fix.
Comment 3 liujia 2016-10-11 00:31:27 EDT
blocked verify by bug1383004
Comment 4 liujia 2016-10-20 05:30:35 EDT
Version:

Steps:
1.Prepare insaller.cfg.yml including ansible_ssh_private_key_file defined.
#cat installer.cfg.yml
<--snip-->
deployment:
  ansible_ssh_user: root
  hosts:
  - connect_to: openshift-118.lab.eng.nay.redhat.com
    ansible_ssh_private_key_file: "/root/libra.pem"
    hostname: 192.168.2.164
    ip: 192.168.2.164
    public_hostname: 10.66.147.118
    public_ip: 10.66.147.118
    roles:
    - master
    - etcd
    - node
    - storage
<--snip-->

2.atomic-openshift-installer -c installer.cfg.yml -u install

Result:
It will generate right hosts:
[nodes]
openshift-118.x.x.x  openshift_public_ip=10.66.147.118 openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118 openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x ansible_ssh_private_key_file=/root/libra.pem openshift_schedulable=False

openshift-128.x.x.x  openshift_public_ip=10.66.147.128 openshift_ip=192.168.2.183 openshift_public_hostname=10.66.147.128 openshift_hostname=192.168.2.183 connect_to=openshift-128.x.x.x openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True

[nfs]
openshift-118.x.x.x  openshift_public_ip=10.66.147.118 openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118 openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x ansible_ssh_private_key_file=/root/libra.pem

[masters]
openshift-118.x.x.x  openshift_public_ip=10.66.147.118 openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118 openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x ansible_ssh_private_key_file=/root/libra.pem

[etcd]
openshift-118.x.x.x  openshift_public_ip=10.66.147.118 openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118 openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x ansible_ssh_private_key_file=/root/libra.pem
Comment 5 liujia 2016-10-20 05:38:00 EDT
+Version:
atomic-openshift-utils-3.3.38-1.git.0.2637ed5.el7.noarch

(In reply to liujia from comment #4)
> Version:
> 
> Steps:
> 1.Prepare insaller.cfg.yml including ansible_ssh_private_key_file defined.
> #cat installer.cfg.yml
> <--snip-->
> deployment:
>   ansible_ssh_user: root
>   hosts:
>   - connect_to: openshift-118.lab.eng.nay.redhat.com
>     ansible_ssh_private_key_file: "/root/libra.pem"
>     hostname: 192.168.2.164
>     ip: 192.168.2.164
>     public_hostname: 10.66.147.118
>     public_ip: 10.66.147.118
>     roles:
>     - master
>     - etcd
>     - node
>     - storage
> <--snip-->
> 
> 2.atomic-openshift-installer -c installer.cfg.yml -u install
> 
> Result:
> It will generate right hosts:
> [nodes]
> openshift-118.x.x.x  openshift_public_ip=10.66.147.118
> openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118
> openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x
> ansible_ssh_private_key_file=/root/libra.pem openshift_schedulable=False
> 
> openshift-128.x.x.x  openshift_public_ip=10.66.147.128
> openshift_ip=192.168.2.183 openshift_public_hostname=10.66.147.128
> openshift_hostname=192.168.2.183 connect_to=openshift-128.x.x.x
> openshift_node_labels="{'region': 'infra'}" openshift_schedulable=True
> 
> [nfs]
> openshift-118.x.x.x  openshift_public_ip=10.66.147.118
> openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118
> openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x
> ansible_ssh_private_key_file=/root/libra.pem
> 
> [masters]
> openshift-118.x.x.x  openshift_public_ip=10.66.147.118
> openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118
> openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x
> ansible_ssh_private_key_file=/root/libra.pem
> 
> [etcd]
> openshift-118.x.x.x  openshift_public_ip=10.66.147.118
> openshift_ip=192.168.2.164 openshift_public_hostname=10.66.147.118
> openshift_hostname=192.168.2.164 connect_to=openshift-118.x.x.x
> ansible_ssh_private_key_file=/root/libra.pem
Comment 7 errata-xmlrpc 2016-10-27 12:13:03 EDT
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/RHBA-2016:2122

Note You need to log in before you can comment on or make changes to this bug.