Bug 1358951 - Error loading config, no such key: 'deployment' when using previously valid answers file
Summary: Error loading config, no such key: 'deployment' when using previously valid a...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 3.2.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Samuel Munilla
QA Contact: liujia
URL:
Whiteboard:
: 1367645 (view as bug list)
Depends On:
Blocks: qci-ocp
TreeView+ depends on / blocked
 
Reported: 2016-07-21 21:44 UTC by John Matthews
Modified: 2016-09-27 09:41 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-09-27 09:41:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1358930 0 urgent CLOSED OSE Deployment Failure during post_install.yml: configure iptables to allow for NFS shares: stderr: iptables: No chain/t... 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHBA-2016:1933 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Internal Links: 1358930

Description John Matthews 2016-07-21 21:44:44 UTC
Description of problem:

We saw OSE 3.2 deployments failing in QuickStart Cloud Installer due to a change in the answer file format.

This change was noticed on evening of 7/20. 
(This was seen with the QuickStart Cloud Installer under RHCS)

Below is a sample of what we see:

# atomic-openshift-installer -u -c /tmp/atomic-openshift-installer.answers.cfg.yml install
Error loading config, no such key: 'deployment'


Version-Release number of selected component (if applicable):

rpm -qf /usr/bin/atomic-openshift-installer
atomic-openshift-utils-3.2.13-1.git.0.0afa976.el7.noarch

How reproducible:
Always


Additional info:


# atomic-openshift-installer -u -c /tmp/atomic-openshift-installer.answers.cfg.yml install
Error loading config, no such key: 'deployment'

[root@jwm1-ose-master1 /]# rpm -qf /usr/bin/atomic-openshift-installer
atomic-openshift-utils-3.2.13-1.git.0.0afa976.el7.noarch

[root@jwm1-ose-master1 /]# cat /tmp/atomic-openshift-installer.answers.cfg.yml
ansible_config: /usr/share/atomic-openshift-utils/ansible.cfg
ansible_log_path: /tmp/ansible.log
ansible_ssh_user: root
hosts:
- connect_to: jwm1-ose-node1.example.com
  hostname: jwm1-ose-node1.example.com
  ip: 192.168.155.16
  node: true
  public_hostname: jwm1-ose-node1.example.com
  public_ip: 192.168.155.16

- connect_to: jwm1-ose-master1.example.com
  hostname: jwm1-ose-master1.example.com
  ip: 192.168.155.14
  master: true
  node: true
  public_hostname: jwm1-ose-master1.example.com
  public_ip: 192.168.155.14

variant: openshift-enterprise
variant_version: '3.2'
version: v1

[root@jwm1-ose-master1 /]# rpm -qa | grep ansible
openshift-ansible-lookup-plugins-3.2.13-1.git.0.0afa976.el7.noarch
ansible-1.9.4-1.el7aos.noarch
openshift-ansible-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
openshift-ansible-docs-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-playbooks-3.2.13-1.git.0.0afa976.el7.noarch

[root@jwm1-ose-master1 /]# rpm -qa | grep openshift
openshift-ansible-lookup-plugins-3.2.13-1.git.0.0afa976.el7.noarch
atomic-openshift-utils-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-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
openshift-ansible-docs-3.2.13-1.git.0.0afa976.el7.noarch
openshift-ansible-playbooks-3.2.13-1.git.0.0afa976.el7.noarch


[root@jwm1-ose-master1 /]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.2 (Maipo)

Comment 1 cjonagam 2016-08-11 21:43:52 UTC
saw the same issue. +1

Comment 2 Scott Dodson 2016-08-17 13:33:12 UTC
*** Bug 1367645 has been marked as a duplicate of this bug. ***

Comment 3 openshift-github-bot 2016-08-23 20:18:27 UTC
Commits pushed to master at https://github.com/openshift/openshift-ansible

https://github.com/openshift/openshift-ansible/commit/c38bd418e0940deb5fb3f57583d1e6d0019962cf
Bug 1358951 - Error loading config, no such key: 'deployment' when using previously valid answers file

Update the quick installer to automatically convert from the old config file format to
the new format.

https://github.com/openshift/openshift-ansible/commit/57a794122c0e1a8cc3b4b5fe9613f8d3aaf7f760
Merge pull request #2334 from smunilla/BZ1358951

Bug 1358951 - Error loading config, no such key: 'deployment' when using ing previously valid answers file

Comment 5 liujia 2016-08-24 05:52:37 UTC
Version:
atomic-openshift-utils-3.3.14-1.git.0.ed5ec69.el7.noarch

Verify Steps:
1.edit installer.cfg file with the same format as the bug described.
ansible_config: /usr/share/atomic-openshift-utils/ansible.cfg
ansible_log_path: /tmp/ansible.log
ansible_ssh_user: root
hosts:
- connect_to: openshift-190.lab.eng.nay.redhat.com
  hostname: 192.168.0.189
  ip: 192.168.0.189
  node: true
  public_hostname: openshift-190.lab.eng.nay.redhat.com
  public_ip: 10.66.147.190

- connect_to: openshift-194.lab.eng.nay.redhat.com
  hostname: 192.168.0.15
  ip: 192.168.0.15
  master: true
  node: true
  public_hostname: openshift-194.lab.eng.nay.redhat.com
  public_ip: 10.66.147.194

variant: openshift-enterprise
variant_version: '3.2'
version: v1
2.run "atomic-openshift-installer -u -c /root/installer.cfg.yml install"

Verify Result:
It still fail for missing ['variant'] which indeed included in the installer.cfg.yml with error:
Traceback (most recent call last):
  File "/usr/bin/atomic-openshift-installer", line 9, in <module>
    load_entry_point('ooinstall==3.0.0', 'console_scripts', 'oo-install')()
  File "/usr/lib/python2.7/site-packages/click/core.py", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/lib/python2.7/site-packages/click/core.py", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/click/core.py", line 464, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 975, in install
    error_if_missing_info(oo_cfg)
  File "/usr/lib/python2.7/site-packages/ooinstall/cli_installer.py", line 518, in error_if_missing_info
    if not oo_cfg.settings['variant']:
KeyError: 'variant'

Additional info:
I edit oo_config.py to add some print info about loaded_config's value to ensure if there is ['variant'] in oo_cfg.settings before and after call func self._upgrade_v1_config()
before
{'version': 'v1', 'hosts': [{'node': True, 'public_ip': '10.66.147.190', 'connect_to': 'openshift-190.lab.eng.nay.redhat.com', 'ip': '192.168.0.189', 'public_hostname': 'openshift-190.lab.eng.nay.redhat.com', 'hostname': '192.168.0.189'}, {'node': True, 'public_ip': '10.66.147.194', 'master': True, 'connect_to': 'openshift-194.lab.eng.nay.redhat.com', 'ip': '192.168.0.15', 'public_hostname': 'openshift-194.lab.eng.nay.redhat.com', 'hostname': '192.168.0.15'}], 'ansible_log_path': '/tmp/ansible.log', 'ansible_config': '/usr/share/atomic-openshift-utils/ansible.cfg', 'variant': 'openshift-enterprise', 'variant_version': '3.2', 'ansible_ssh_user': 'root'}

after
{'deployment': {'variables': {}, 'ansible_ssh_user': 'root', 'hosts': [{'roles': ['node'], 'connect_to': 'openshift-190.lab.eng.nay.redhat.com', 'ip': '192.168.0.189', 'hostname': '192.168.0.189', 'preconfigured': None, 'public_ip': '10.66.147.190', 'containerized': None, 'public_hostname': 'openshift-190.lab.eng.nay.redhat.com'}, {'roles': ['master', 'node'], 'connect_to': 'openshift-194.lab.eng.nay.redhat.com', 'ip': '192.168.0.15', 'hostname': '192.168.0.15', 'preconfigured': None, 'public_ip': '10.66.147.194', 'containerized': None, 'public_hostname': 'openshift-194.lab.eng.nay.redhat.com'}], 'roles': {'node': '', 'master': ''}}}

i think the bug need to be assigned.

Comment 6 Samuel Munilla 2016-08-24 18:40:42 UTC
Good catch!

https://github.com/openshift/openshift-ansible/pull/2350 to move over variant and variant_version

Comment 8 liujia 2016-08-26 05:21:55 UTC
Version:
atomic-openshift-utils-3.3.15-1.git.0.a9fd72e.el7.noarch

Verify Steps:
1.edit installer.cfg file with the same format as the bug described.
2.run "atomic-openshift-installer -u -c /root/installer.cfg.yml install"

Verify result:
it will update installer.cfg.yml with correct format which compatible with ose3.3 and install ose3.3 successfully.

Comment 10 errata-xmlrpc 2016-09-27 09:41:19 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:1933


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