Commit 3e82706
[release-2.11] fix(pure): Make Pure FlashArray HTTP client timeout configurable (#5615)
**Backport:** #5551
**Make Pure FlashArray HTTP client timeout configurable**
**Problem:**
During migrations of VMs with many disks, simultaneous `CopyVolume`
requests to Pure FlashArray were timing out, leaving PVCs stuck in
`Pending`. In one observed case, 15 disks were migrated but only 7
reached `Bound` status — the remaining 8 populator pods failed with:
```
failed to copy VMDK using VVol storage API: copy operation failed: Pure FlashArray CopyVolume failed:
failed to send copy volume request: Post "https://<array>/api/2.46/volumes?overwrite=true":
context deadline exceeded (Client.Timeout exceeded while awaiting headers)
```
The root cause is that the HTTP client timeout was hardcoded to 30
seconds with no way to extend it, making it impossible to accommodate
slower or heavily-loaded arrays.
**Changes:**
- `NewRestClient` now accepts an `httpTimeoutSeconds int` parameter
instead of a hardcoded value. A value of `<= 0` falls back to the 30s
default.
- `NewFlashArrayClonner` threads the parameter through to
`NewRestClient`.
- A `--storage-api-timeout-seconds` CLI flag (default: `30`) is added to
the `vsphere-xcopy-volume-populator` binary.
**How to configure:**
Pass `--storage-api-timeout-seconds=<value>` to the populator binary.
Full operator-side wiring (CRD field → `VSphereXcopyPluginConfig` →
`VSphereXcopyVolumePopulatorSpec` → populator-controller pod args) is a
follow-up.
**Default behaviour is unchanged** — the timeout remains 30 seconds
unless explicitly overridden.
---------
Signed-off-by: Michael Jons <Michael.Jons@tre.se>
Co-authored-by: Michael Jons <Michael.Jons@tre.se>1 parent f637e18 commit 3e82706
File tree
5 files changed
+18
-6
lines changed- cmd/vsphere-xcopy-volume-populator
- internal/pure
5 files changed
+18
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
158 | 158 | | |
159 | 159 | | |
160 | 160 | | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
163 | 164 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
40 | | - | |
| 40 | + | |
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
310 | 310 | | |
311 | 311 | | |
312 | 312 | | |
313 | | - | |
| 313 | + | |
314 | 314 | | |
315 | 315 | | |
316 | 316 | | |
| |||
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
123 | 127 | | |
124 | 128 | | |
125 | 129 | | |
| |||
135 | 139 | | |
136 | 140 | | |
137 | 141 | | |
138 | | - | |
| 142 | + | |
139 | 143 | | |
140 | 144 | | |
141 | 145 | | |
| |||
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| 63 | + | |
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
| |||
104 | 106 | | |
105 | 107 | | |
106 | 108 | | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
107 | 113 | | |
108 | | - | |
| 114 | + | |
109 | 115 | | |
110 | 116 | | |
111 | 117 | | |
| |||
306 | 312 | | |
307 | 313 | | |
308 | 314 | | |
| 315 | + | |
309 | 316 | | |
310 | 317 | | |
311 | 318 | | |
| |||
0 commit comments