Introduction
Butane (current version as of writing this document v0.18.0)is a tool to create ignition configurations from text based configuration files. When running Redhat Openshift Butane can be used to create MachineConfig definitions to configure Red Hat Enterprise Linux CoreOS (RHCOS) running on the nodes for the configured MachineConfigPool objects of the cluster.
The problem
With the introduction of the version v4.10.0 of the openshift variant of the Butane specification gzip compression for the output of the file contents .spec.config.storage.files[*].contents.source
has been introduced and enabled by default for inline and local file data.
For example the following Butane file:
|
|
will result in the following yaml file being generated:
|
|
As you can see the source for the content of the file /etc/containers/registries.conf is gzip compressed and base64 encoded in the yaml file. The content is correctly saved to the source: field what can be verified by running: echo "H4sIAAAAAAAC/3TNsYrDMB......" | base64 -d |gunzip
.
However if you apply the generated MachineConfig .yaml file (tested this on v4.13.12 but saw the same issue on v4.12 clusters as well) the affected MachineConfigPool will be stuck in degraded state:
|
|
Checking the status of the affected MachineConfigPool (oc get mcp master -o yaml
) will show the following error message:
|
|
So obviously Openshift is having difficulties applying the MachineConfig of the source is gzip encrypted.
Circumvention
Unfortunately I did not find a solution for the issue so far (just found a similar bug 2032565 from end of 2021 on the RedHat site which states that the reported issue has been fixed).
To get the MachineConfig working I’ve determined the following circumvention namely to specify an older version of the openshift variant in the Butane file. I.e. instead of:
|
|
we specify
|
|
in the Butane file.
This results then in the following MachineConfig file:
|
|
which we could successfully apply.