| Summary: | [quick install] The variables defined in host level (installer.cfg.yml) aren't applied to inventory_hosts | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Gan Huang <ghuang> |
| Component: | Installer | Assignee: | Samuel Munilla <smunilla> |
| Status: | CLOSED ERRATA | QA Contact: | liujia <jiajliu> |
| Severity: | medium | Docs Contact: | |
| Priority: | high | ||
| Version: | 3.3.0 | CC: | aos-bugs, bleanhar, jokerman, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| 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 16:13:03 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: | |
https://github.com/openshift/openshift-ansible/pull/2426 opened to fix. blocked verify by bug1383004 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
+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 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 |
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: