Bug 1973076 - [oVirt] CSI driver is not waiting for disk to be OK on creation
Summary: [oVirt] CSI driver is not waiting for disk to be OK on creation
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Storage
Version: 4.9
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.9.0
Assignee: Gal Zaidman
QA Contact: Gal Zaidman
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-06-17 08:38 UTC by Gal Zaidman
Modified: 2021-10-18 17:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2021-10-18 17:34:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift ovirt-csi-driver pull 82 0 None open Bug 1973076: Bug 1985795: Fix create volume, configure disk format based on storage domain and wait for disk to be ok 2021-07-26 12:05:56 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:35:22 UTC

Description Gal Zaidman 2021-06-17 08:38:31 UTC
Description of problem:

When we create a PVC the driver will create the disk but not wait for it to reach OK state, meaning it will remain in LOCKED state for a couple of minutes.
After the PVC is created CSI is trying to attach it, so "ControllerPublishVolume" will be called and will fail as long as the disk is on locked state.
It will keep retrying and succeed at the end, but the retries and failure just spam the logs and cause unneccecry operations and API calls.
Instead the driver should wait till the disk reaches OK state and only when the disk is OK approve that create is done.

How to test:
Look at the logs of:
- oc logs -c csi-driver ovirt-csi-driver-controller-xxxxxxxxxxxxxxxxx
  And see that there are no repeating errors like:
```
2021-06-17T06:24:54.414993681Z E0617 06:24:54.414934       1 server.go:125] /csi.v1.Controller/ControllerPublishVolume returned with error: Fault reason is "Operation Failed". Fault detail is "[Cannot attach Virtual Disk: The following disks are locked: pvc-6d4bc473-2ef3-4d35-8576-7bc0de9319a9. Please try again in a few minutes.]". HTTP response code is "409". HTTP response message is "409 Conflict".
```
- oc logs -c csi-attacher ovirt-csi-driver-controller-xxxxxxxxxxxxxxxxx
  And see that there are no repeating errors like:
```
2021-06-17T06:24:49.251515656Z I0617 06:24:49.251476       1 csi_handler.go:228] Error processing "csi-a156309f8e7277790123d7202198dd5e5bd966a38d1294eb50d5f363221e9ff9": failed to attach: rpc error: code = Unknown desc = Fault reason is "Operation Failed". Fault detail is "[Cannot attach Virtual Disk: The following disks are locked: pvc-516274d5-e4c3-48a6-8aa9-73a10f098e25. Please try again in a few minutes.]". HTTP response code is "409". HTTP response message is "409 Conflict".
```

Comment 4 errata-xmlrpc 2021-10-18 17:34:57 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 (Moderate: OpenShift Container Platform 4.9.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-2021:3759


Note You need to log in before you can comment on or make changes to this bug.