Bug 2011895

Summary: Details about cloud errors are missing from PV/PVC errors
Product: OpenShift Container Platform Reporter: Hemant Kumar <hekumar>
Component: StorageAssignee: Jan Safranek <jsafrane>
Storage sub component: Kubernetes QA Contact: Penghao Wang <pewang>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: aos-bugs, jsafrane, wking
Version: 4.10   
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-08-10 10:38:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hemant Kumar 2021-10-07 16:16:28 UTC
When pv attach or detach or deletion fails - the events or objects captured by e2e do not have any errors reported by cloud environment. This makes debugging harder - https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/periodic-ci-openshift-release-master-ci-4.10-e2e-gcp-upgrade/1446059076680159232

Comment 1 Tomas Smetana 2021-10-08 14:36:34 UTC
We need to investigate:
- Do we have alrerts for exceeding Quota limits?
  - Can we just use those in e2e?
- Can we propagate the errors from CloudProvider to PV?

Comment 2 Jan Safranek 2021-10-12 14:00:44 UTC
Not sure I understand the bug. Events about failed volume deletion do have cloud provider error:

     {
            "apiVersion": "v1",
            "count": 1,
            "eventTime": null,
            "firstTimestamp": "2021-10-07T12:15:42Z",
            "involvedObject": {
                "apiVersion": "v1",
                "kind": "PersistentVolume",
                "name": "pvc-017ed5a1-f21d-4855-8868-99403815c1c2",
                "resourceVersion": "186198",
                "uid": "ac0584e0-fe4f-4c73-8f34-73a87b2a407c"
            },
            "kind": "Event",
            "lastTimestamp": "2021-10-07T12:15:42Z",
            "message": "googleapi: Error 403: Quota exceeded for quota group 'ReadGroup' and limit 'Read requests per 100 seconds' of service 'compute.googleapis.com' for consumer 'project_number:711936183532'., rateLimitExceeded",
            "metadata": {
                "creationTimestamp": "2021-10-07T12:15:42Z",
                "name": "pvc-017ed5a1-f21d-4855-8868-99403815c1c2.16abbead9f4fe853",
                "namespace": "default",
                "resourceVersion": "186221",
                "uid": "910413a0-535d-47b7-90c5-ce3ba5c2fcb2"
            },
            "reason": "VolumeFailedDelete",
            "reportingComponent": "",
            "reportingInstance": "",
            "source": {
                "component": "persistentvolume-controller"
            },
            "type": "Warning"
        },


For attach/detach errors, I need to check if we propagate them to events or not, the code around is complicated.

As for the metrics / alerts, have metrics for exceeding API quota in in-tree AWS: https://github.com/kubernetes/kubernetes/blob/481cf6fbe753b9eb2a47ced179211206b0a99540/staging/src/k8s.io/legacy-cloud-providers/aws/retry_handler.go#L101
AFAIK we don't have any alerts around the metric. I haven't found such a metric in GCE, at least in-tree.

Comment 3 Jan Safranek 2021-10-12 14:32:14 UTC
Is this a request to expose these kind of errors in a better way in e2e results? I think we could do something about it, at least for AWS and GCE (since these errors are cloud specific), still, the alert *will be* fired and test "Alerts shouldn't report any alerts in firing or pending state apart from Watchdog and AlertmanagerReceiversNotConfigured and have no gaps in Watchdog firing" will hit it. I can only add some extra info below.

Comment 8 errata-xmlrpc 2022-08-10 10:38:04 UTC
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 (Important: OpenShift Container Platform 4.11.0 bug fix and security update), 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/RHSA-2022:5069