-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update 0003-cluster-wide-machineconfigs.yaml.template #6
base: master
Are you sure you want to change the base?
Conversation
Hello @willhaines, thanks for the PR, I'm confused by this problem you're raising, as we're using this template almost verbatim in our nightly CI testing, see there: but we never had any issue once valid keys are properly deployed ... how would you suggest handling the |
Hi @kpouget, Apologies for not being more of an expert here, but my assumption is that the order of files returned by g_dir_read_name is not randomized, but likely to be the same each time it is executed in the same environment, but may be different in another environment. In our case, the solution directly from the blog was working several months ago, but now after many updates to both OKD and the UBI images, we see the error above every time when building a Dockerfile that installs packages on top of a UBI image. On our registered RHEL systems, the entitlement.pem
entitlement-key.pem
In the blog, this could be achieved with the following commands:
FWIW, I am also able to replicate this behavior with podman on Fedora 34 and the following Dockerfile
If you're running licensed OpenShift, maybe differing kernels and/or glib versions account for the lack of problems in your CI testing. Unfortunately, I cannot think of a good test case to force |
thanks for the additional information, at least now I understand the difference between I tried to replicate the issue with this command, which should be equivalent to what you described, but it works as expected:
HOWEVER, this doesn't work:
I think we've got something to fix here, thanks for point it out ;-) |
🛈 If accepted, this would require changes to the blog post content.
The librhsm library included in
ubi8
,ubi8-minimal
, and possibly others can become "confused" by bothentitlement.pem
andentitlement-key.pem
including the same content. This library is used bydnf
andmicrodnf
.From rhsm-context.c, it will search the entitlement directory in an indeterminate order for the first
*.pem
file containing a section bounded by-----BEGIN ENTITLEMENT DATA-----
and-----END ENTITLEMENT DATA-----
. Then, in rhsm-entitlement-certificate.c it will assume that the key is in an adjacent file with-key
appended to the basename.In a cluster configured per the original blog, if librhsm first sees
entitlement.pem
, everything will be okay. If, however, librhsm seesentitlement-key.pem
first, it will fail with the following error message, looking forentitlement-key-key.pem