Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1359472 - One or more undefined variables 'deployment_type'
Summary: One or more undefined variables 'deployment_type'
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.1
Hardware: Unspecified
OS: Unspecified
unspecified
urgent
Target Milestone: ---
: ---
Assignee: Samuel Munilla
QA Contact: liujia
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-07-24 01:38 UTC by Luis Pabón
Modified: 2016-11-08 22:25 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-08-18 19:29:33 UTC


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1639 normal SHIPPED_LIVE OpenShift Enterprise atomic-openshift-utils bug fix and enhancement update 2016-08-18 23:26:45 UTC

Description Luis Pabón 2016-07-24 01:38:32 UTC
Description of problem:
While installing from a RHEL7.2 system to atomic 7.2 systems, I got the following error:
TASK: [openshift_facts | Gather Cluster facts and set is_containerized if needed] ***
fatal: [192.168.122.90] => One or more undefined variables: 'deployment_type' is undefined
fatal: [192.168.122.100] => One or more undefined variables: 'deployment_type' is undefined
fatal: [192.168.122.101] => One or more undefined variables: 'deployment_type' is undefined
fatal: [192.168.122.102] => One or more undefined variables: 'deployment_type' is undefined

FATAL: all hosts have already failed -- aborting


[root@localhost ~]# cat ~/.config/openshift/hosts 

[OSEv3:children]

[OSEv3:vars]
ansible_config=/usr/share/atomic-openshift-utils/ansible.cfg
ansible_log_path=/tmp/ansible.log
ansible_ssh_user=root
openshift_master_default_subdomain=cloudapps.example.com
deployment_type=openshift-enterprise

[masters]
192.168.122.90  openshift_ip=192.168.122.90 openshift_public_ip=192.168.122.90 openshift_hostname=192.168.122.90 openshift_public_hostname=192.168.122.90 containerized=True

[nodes]
192.168.122.90  openshift_ip=192.168.122.90 openshift_public_ip=192.168.122.90 openshift_hostname=192.168.122.90 openshift_public_hostname=192.168.122.90 containerized=True openshift_schedulable=False
192.168.122.100  openshift_ip=192.168.122.100 openshift_public_ip=192.168.122.100 openshift_hostname=192.168.122.100 openshift_public_hostname=192.168.122.100 containerized=True
192.168.122.101  openshift_ip=192.168.122.101 openshift_public_ip=192.168.122.101 openshift_hostname=192.168.122.101 openshift_public_hostname=192.168.122.101 containerized=True
192.168.122.102  openshift_ip=192.168.122.102 openshift_public_ip=192.168.122.102 openshift_hostname=192.168.122.102 openshift_public_hostname=192.168.122.102 containerized=True

[nfs]
192.168.122.90  openshift_ip=192.168.122.90 openshift_public_ip=192.168.122.90 openshift_hostname=192.168.122.90 openshift_public_hostname=192.168.122.90 containerized=True

# cat ~/.config/openshift/installer.cfg.yml

Version-Release number of selected component (if applicable):
[root@localhost ~]# rpm -qa | grep openshift
openshift-ansible-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-playbooks-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-docs-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-filter-plugins-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-roles-3.2.13-1.git.0.0afa976.el7.noarch
atomic-openshift-utils-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-lookup-plugins-3.2.13-1.git.0.0afa976.el7.noarch

ansible_callback_facts_yaml: /root/.config/openshift/.ansible/callback_facts.yaml
ansible_config: /usr/share/atomic-openshift-utils/ansible.cfg
ansible_inventory_path: /root/.config/openshift/hosts
ansible_log_path: /tmp/ansible.log
ansible_ssh_user: root
deployment:
  hosts:
  - connect_to: 192.168.122.90
    containerized: true
    hostname: 192.168.122.90
    ip: 192.168.122.90
    public_hostname: 192.168.122.90
    public_ip: 192.168.122.90
    roles:
    - master
    - node
    - storage
  - connect_to: 192.168.122.100
    containerized: true
    hostname: 192.168.122.100
    ip: 192.168.122.100
    public_hostname: 192.168.122.100
    public_ip: 192.168.122.100
    roles:
    - node
  - connect_to: 192.168.122.101
    containerized: true
    hostname: 192.168.122.101
    ip: 192.168.122.101
    public_hostname: 192.168.122.101
    public_ip: 192.168.122.101
    roles:
    - node
  - connect_to: 192.168.122.102
    containerized: true
    hostname: 192.168.122.102
    ip: 192.168.122.102
    public_hostname: 192.168.122.102
    public_ip: 192.168.122.102
    roles:
    - node
  master_routingconfig_subdomain: cloudapps.example.com
  proxy_exclude_hosts: ''
  proxy_http: ''
  proxy_https: ''
  roles: {}
variant: openshift-enterprise
variant_version: '3.2'
version: v2


====

I keep adding 'masters' and 'nodes' to section [OSEv3:children], and once I run the installer, it removes them

Comment 1 Luis Pabón 2016-07-24 03:50:31 UTC
Able to workaround by downgrading to 3.2.9 and removing the 'storage' setting from .config/openshift/installer.cfg.yml

Comment 2 Samuel Munilla 2016-07-27 14:18:08 UTC
Some inventory variables were being written out of order. https://github.com/openshift/openshift-ansible/pull/2226 is open to address this.

Comment 4 liujia 2016-08-05 07:17:48 UTC
Host Info:
host-194:RHEL-7.2(only one host for this test)
host-193:Atomic-725(only one host for this test)

Version:
Package from latest:http://download.lab.bos.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift/3.2/latest/x86_64/os
Build Time:2016-08-04.2

Verify Steps:
on host-194
1, "yum update" to update package to the latest
2, ensure
-the version is updated to 3.2.18-1.git.0.2015d79.el7 which is the same as the latest build version.
-there is no file located ~/.config/openshift/hosts
3, "atomic-openshift-installer install" to start quick installation
4, according to the hints to complete the installation, but it failed(this is another issue which is in confirming)
5, check the hosts file as follows:

[OSEv3:children]
nodes
masters
nfs
etcd

[OSEv3:vars]
ansible_log_path=/tmp/ansible.log
ansible_config=/usr/share/atomic-openshift-utils/ansible.cfg
ansible_ssh_user=root
deployment_type=openshift-enterprise

[nodes]
openshift-194.lab.eng.nay.redhat.com  openshift_schedulable=True ansible_connection=local

[masters]
openshift-194.lab.eng.nay.redhat.com  ansible_connection=local

[nfs]
openshift-194.lab.eng.nay.redhat.com  ansible_connection=local

[etcd]
openshift-194.lab.eng.nay.redhat.com  ansible_connection=local

6, redo step3-4
7, check the hosts file as follows:

[OSEv3:children]
nodes
masters
nfs
etcd

[OSEv3:vars]
ansible_log_path=/tmp/ansible.log
ansible_config=/usr/share/atomic-openshift-utils/ansible.cfg
ansible_ssh_user=root
deployment_type=openshift-enterprise

[nodes]
openshift-193.lab.eng.nay.redhat.com  containerized=True openshift_schedulable=True

[masters]
openshift-193.lab.eng.nay.redhat.com  containerized=True

[nfs]
openshift-193.lab.eng.nay.redhat.com  containerized=True

[etcd]
openshift-193.lab.eng.nay.redhat.com  containerized=True


Verify result:
it can produce hosts file with correct info of section [OSEv3:children] when quick install use the latest install tool.

Comment 5 liujia 2016-08-09 07:21:59 UTC
Host Info:
host-194:RHEL-7.2(only one host for this test)
host-193:Atomic-725(only one host for this test)

Version:
RepoURL:http://download.eng.bos.redhat.com/rcm-guest/puddles/RHAOS/AtomicOpenShift-errata/3.2/latest/RH7-RHAOS-3.2/x86_64/os/
Build Time:2016-08-08.1
atomic-openshift-utils-3.2.19-1.git.0.fad29ad.el7.noarch.rpm

Verify Steps:
on host-194
1, "atomic-openshift-installer install" to start quick installation
2, according to the hints to complete the installation,
3, check the hosts file as follows:

[OSEv3:children]
nodes
nfs
masters
etcd

[OSEv3:vars]
ansible_config=/usr/share/atomic-openshift-utils/ansible.cfg
ansible_log_path=/tmp/ansible.log
ansible_ssh_user=root
deployment_type=openshift-enterprise

[nodes]
openshift-194.lab.eng.nay.redhat.com  openshift_ip=x.x.x.194 openshift_public_ip=x.x.x.194 openshift_hostname=openshift-194.lab.eng.nay.redhat.com openshift_public_hostname=openshift-194.lab.eng.nay.redhat.com openshift_schedulable=True ansible_connection=local

[nfs]
openshift-194.lab.eng.nay.redhat.com  openshift_ip=x.x.x.194 openshift_public_ip=x.x.x.194 openshift_hostname=openshift-194.lab.eng.nay.redhat.com openshift_public_hostname=openshift-194.lab.eng.nay.redhat.com ansible_connection=local

6, rm all files in ~/.config/openshift,redo step3-4,but choose host which is atomic and container install.
7, check the hosts file as follows:

[OSEv3:children]
nodes
masters
nfs
etcd

[OSEv3:vars]
ansible_log_path=/tmp/ansible.log
ansible_config=/usr/share/atomic-openshift-utils/ansible.cfg
ansible_ssh_user=root
deployment_type=openshift-enterprise

[nodes]
openshift-193.lab.eng.nay.redhat.com  openshift_ip=x.x.x.193 openshift_public_ip=x.x.x.193 openshift_hostname=openshift-193.lab.eng.nay.redhat.com openshift_public_hostname=openshift-193.lab.eng.nay.redhat.com containerized=True openshift_schedulable=True

[masters]
openshift-193.lab.eng.nay.redhat.com  openshift_ip=x.x.x.193 openshift_public_ip=x.x.x.193 openshift_hostname=openshift-193.lab.eng.nay.redhat.com openshift_public_hostname=openshift-193.lab.eng.nay.redhat.com containerized=True

[nfs]
openshift-193.lab.eng.nay.redhat.com  openshift_ip=x.x.x.193  openshift_public_ip=x.x.x.193 openshift_hostname=openshift-193.lab.eng.nay.redhat.com openshift_public_hostname=openshift-193.lab.eng.nay.redhat.com containerized=True

[etcd]
openshift-193.lab.eng.nay.redhat.com  openshift_ip=x.x.x.193 openshift_public_ip=x.x.x.193 openshift_hostname=openshift-193.lab.eng.nay.redhat.com openshift_public_hostname=openshift-193.lab.eng.nay.redhat.com containerized=True

8. diff two files(openshift_ansible.py) from rcm's build(last verify on version 2016-08-04.2) and errata's latest build, there is no difference.

Verify result:
it can produce hosts file with correct info of section [OSEv3:children] when quick install.

Comment 7 errata-xmlrpc 2016-08-18 19:29:33 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/RHBA-2016:1639


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