Bug 1358951
| Summary: | Error loading config, no such key: 'deployment' when using previously valid answers file | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | John Matthews <jmatthew> |
| Component: | Installer | Assignee: | Samuel Munilla <smunilla> |
| Status: | CLOSED ERRATA | QA Contact: | liujia <jiajliu> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 3.2.0 | CC: | aos-bugs, cjonagam, dgao, dymurray, green, jiajliu, jokerman, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2016-09-27 09:41:19 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: | |
| Embargoed: | |||
| Bug Depends On: | |||
| Bug Blocks: | 1358952 | ||
|
Description
John Matthews
2016-07-21 21:44:44 UTC
saw the same issue. +1 *** Bug 1367645 has been marked as a duplicate of this bug. *** 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 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.
Good catch! https://github.com/openshift/openshift-ansible/pull/2350 to move over variant and variant_version 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. 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 |