Hide Forgot
Description of problem: While applying this script: ``` python -c "import base64, json, sys; python -c "import base64, json, sys; ignition = json.load(sys.stdin); ignition = json.load(sys.stdin); files = ignition['storage'].get('files', []); storage = ignition.get('storage', {}); files.append({'path': '/etc/hostname', 'mode': 420, 'contents': {'source': 'data:text/plain;charset=utf-8;base64,' + base64.standard_b64encode(b'$MASTER_HOSTNAME').decode().strip()}}); files = storage.get('files', []); ignition['storage']['files'] = files; files.append({'path': '/etc/hostname', 'mode': 420, 'contents': {'source': 'data:text/plain;charset=utf-8;base64,' + base64.standard_b64encode(b'$MASTER_HOSTNAME').decode().strip(), 'verification': {}}, 'filesystem': 'root'}); storage['files'] = files; ignition['storage'] = storage json.dump(ignition, sys.stdout)" <master.ign ``` Python fails with: ``` Traceback (most recent call last): File "<string>", line 3, in <module> KeyError: 'storage' ``` The 'storage' property does not seem to be present any more in the master ignition file.
*** Bug 1876835 has been marked as a duplicate of this bug. ***
Verified $ python -c "import base64, json, sys; ignition = json.load(sys.stdin); storage = ignition.get('storage', {}); files = storage.get('files', []); files.append({'path': '/etc/hostname', 'mode': 420, 'contents': {'source': 'data:text/plain;charset=utf-8;base64,' + base64.standard_b64encode(b'$MASTER_HOSTNAME').decode().strip()}}); storage['files'] = files; ignition['storage'] = storage json.dump(ignition, sys.stdout)" <master.ign {"ignition": {"config": {"merge": [{"source": "https://192.168.0.5:22623/config/master"}]}, "security": {"tls": {"certificateAuthorities": [{"source": "data:text/plain;charset=utf-8;base64,xxxxxxxxx"}]}}, "version": "3.1.0"}, "storage": {"files": [{"path": "/etc/hostname", "mode": 420, "contents": {"source": "data:text/plain;charset=utf-8;base64,"}}]}}
@wjiang Can you verify this downstream, too? https://github.com/openshift/openshift-docs/pull/25605
*** Bug 1876843 has been marked as a duplicate of this bug. ***
Moving to QE again, as this needs to be verified in the downstream docs, too. https://github.com/openshift/openshift-docs/pull/25605
The Doc look good from the QE perspective, so move to verified.
Change merged into 4.6 release + master branches.
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 (OpenShift Container Platform 4.6 GA Images), 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-2020:4196