Closed flavianmissi closed 3 weeks ago
/retitle WIP: IR-489: export storage read-only errors as metrics
@flavianmissi: This pull request references IR-489 which is a valid jira issue.
@flavianmissi: This pull request references IR-489 which is a valid jira issue.
@flavianmissi: This pull request references IR-489 which is a valid jira issue.
/retitle IR-489: export storage read-only errors as metrics
test failures are unrelated to changes /retest
My comment above is just a suggestion, feel free to unhold when you are ready; /lgtm
[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: ardaguclu, flavianmissi
The full list of commands accepted by this bot can be found here.
The pull request process is described here
/hold
removing the hold, though this still needs a few other approvals (qe, docs, px) before merging. /hold cancel
/test e2e-hypershift
@flavianmissi: all tests passed!
Full PR test history. Your PR dashboard.
@flavianmissi: This pull request references IR-489 which is a valid jira issue.
@flavianmissi: This pull request references IR-489 which is a valid jira issue.
@flavianmissi I have test following your steps, I could see the Read_only_filesystem metrics
Thank you @xiuwang! Could you give the qe-approved label if you feel ready?
/label qe-approved
@flavianmissi: This pull request references IR-489 which is a valid jira issue.
/label docs-approved
/label px-approved
[ART PR BUILD NOTIFIER]
Distgit: openshift-enterprise-registry This PR has been included in build openshift-enterprise-registry-container-v4.18.0-202410181609.p0.g0d4541d.assembly.stream.el9. All builds following this will include this PR.
before this change, "read-only file system" errors would show up in the metrics as "UNKNOWN".
this commit inspects the enclosed storage path error and reports a metric reporting the failed operation.
Testing this change
The below steps have been tested against
4.18.0-0.test-2024-09-26-122820-ci-ln-0y1k6pk-latest
on AWS.Set storage to read-only
Easiest way I could find to achieve this is to configure the registry to use a pvc, then edit the image-registry deployment to mount the pvc with
readOnly: true
.Set project to openshift-image-registry
Create the PVC
Configure storage to pvc
Update the following fields (fields not listed below should not change):
Check PVC status Wait until the PVC status changes to "Bound", which means the image registry pod has successfully mounted it.
Set the registry to unmanaged, and update PVC mount to readOnly
Edit the image registry deployment:
Find the image-registry-test-claim volume in
.spec.template.spec.volumes
and change it to:Wait for a new pod, then check that the volume is mounted read-only:
Sample output:
Import an image
Pull the image
Verify the logs for a failure to mirror While the import and pull will work just fine, writing to local storage will fail. This can be verified by grepping the image-registry logs:
This should output a log entry similar to the following:
Verify metric in web console Open the openshift web console, choose Observe -> Metrics on the left-side menu, then filter the metrics by:
That should return at least one metric with code
READ_ONLY_FILESYSTEM
, similar to the below: