-
Bug
-
Resolution: Done
-
Major
-
rhel-9.2.0.z
-
None
-
librhsm-0.0.3-8.el9
-
None
-
Moderate
-
ZStream
-
rhel-sst-cs-software-management
-
ssg_core_services
-
20
-
None
-
False
-
-
Yes
-
None
-
Approved Blocker
-
-
Pass
-
Enabled
-
Automated
-
Bug Fix
-
-
Done
-
-
All
-
None
What were you trying to do that didn't work?
When running entitled builds using SharedSecret objects according to https://docs.openshift.com/container-platform/4.13/cicd/builds/running-entitled-builds.html#builds-running-entitled-builds-with-sharedsecret-objects_running-entitled-builds with rhcos container, rpm-ostree can not access to the repos. The workaround is remove /etc/rhsm-host.
Please provide the package NVR for which bug is seen:
librhsm-0.0.3-7.el9.x86_64
How reproducible:
100%
Steps to reproduce
1. Create 4.13.1 cluster
2. Enable TechPreviewNoUpgrade FeatureGate featureset refer to doc
$ oc get FeatureGate cluster -ojson | jq '.spec' { "featureSet": "TechPreviewNoUpgrade" }
Check etc-pki-entitlement secret was created
$ oc get secret --namespace openshift-config-managed etc-pki-entitlement Opaque 2 6m16s
3. Create test namespace
$ oc new-project entitlement-test $ oc project Using project "entitlement-test" on server "https://api.ci-ln-v6y7jf2-76ef8.aws-2.ci.openshift.org:6443".
4. Create SharedSecret
# cat my-entitlement.yaml apiVersion: sharedresource.openshift.io/v1alpha1 kind: SharedSecret metadata: name: my-entitlement spec: secretRef: name: etc-pki-entitlement namespace: openshift-config-managed $ oc apply -f my-entitlement.yaml $ oc get sharedsecret NAME AGE my-entitlement 18s
5. Create Role and RoleBinding
# cat my-role-shared.yaml apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: shared-resource-my-share namespace: entitlement-test rules: - apiGroups: - sharedresource.openshift.io resources: - sharedsecrets resourceNames: - my-entitlement verbs: - use $ oc apply -f my-role-shared.yaml $ oc create rolebinding shared-resource-my-share --role=shared-resource-my-share --serviceaccount=entitlement-test:builder rolebinding.rbac.authorization.k8s.io/shared-resource-my-share created
6. Create BuildConfig
$ cat my-csi-bc-coreos.yaml apiVersion: build.openshift.io/v1 kind: BuildConfig metadata: name: my-csi-bc-coreos namespace: entitlement-test spec: runPolicy: Serial source: dockerfile: | # oc adm release info 4.13.1 --image-for=rhel-coreos FROM quay.io/openshift-release-dev/ocp-v4.0-art-dev@sha256:d2aa8899d6ec5cd40bbe7b843027148b768f0a5b8ab091aa46958c4893814306 RUN ls -la /etc/pki/entitlement/ RUN sleep infinity RUN rpm-ostree install libreswan strategy: type: Docker dockerStrategy: volumes: - mounts: - destinationPath: "/etc/pki/entitlement" name: entitlement-pv source: csi: driver: csi.sharedresource.openshift.io readOnly: true volumeAttributes: sharedSecret: my-entitlement type: CSI $ oc apply -f my-csi-bc-coreos.yaml buildconfig.build.openshift.io/my-csi-bc-coreos created $ oc start-build my-csi-bc-coreos -F
Expected results
Entitled builds can access the repo successfully.
Actual results
Entitled builds can not access the repo with error:
bash-5.1# rpm-ostree install libreswan ... Curl error (77): Problem with the SSL CA cert (path? access rights?) for https://cdn.redhat.com/content/dist/rhel9/9/x86_64/baseos/os/repodata/repomd.xml [error setting certificate file: /etc/rhsm-host-host/ca/redhat-uep.pem]
- blocks
-
OCPBUGS-11181 add entitlement symlinks
- Closed
- is blocked by
-
RHEL-16103 Invalid License tag value: LGPLv2.1+
- Closed
- is cloned by
-
RHEL-37866 Stop replacing /etc/rhsm-host/ca to /etc/rhsm-host-host/ca if ca cert dir is already under /etc/rhsm-host
- Release Pending
- is related to
-
RHEL-1451 Running inside a container where rhsm.conf is missing on RHCOS, repo_ca_cert gets set to a bogus value: /etc/rhsm-host-host/ca/redhat-uep.pem
- Closed
- links to
-
RHBA-2023:124442 librhsm bug fix and enhancement update
- mentioned on