Repository navigation
Commit 34edb22
kvm: align NVMe-oF adaptor stubs with the Fibre Channel adaptor
NVMe-TCP is a different carrier for the same array operations, so the NVMe-oF
storage adaptor should only diverge from MultipathSCSIAdapterBase where the
transport genuinely differs. Several unimplemented methods threw
UnsupportedOperationException where the Fibre Channel adaptor returns a benign
value, which means a caller that degrades gracefully on Fibre Channel aborts on
NVMe-TCP:
* deletePhysicalDisk(): FC returns false. Namespaces are created and destroyed
by the storage provider, so a host-side delete is simply not handled here;
throwing from a cleanup path is worse than reporting that.
* createTemplateFromDisk(), listPhysicalDisks(): FC returns null.
* createFolder(): FC logs and returns true. Block storage has no directory
structure, so this is a no-op rather than an error.
createPhysicalDisk(), createDiskFromTemplate() and createDiskFromTemplateBacking()
still throw, because the Fibre Channel adaptor throws for those too.
createTemplateFromDirectDownloadFile() also still throws, but the message now
states the limitation instead of reading as an oversight. The Fibre Channel
implementation resolves the downloaded file with destPool.getPhysicalDisk(),
which on this adaptor requires a "type=NVMETCP;address=..." path and therefore
cannot describe a plain local file. Supporting it needs a separate way to present
the local file as the copy source, which is left for follow-up rather than
guessed at here.
No functional change to the connect/disconnect paths. The comment on
disconnectPhysicalDisk() is updated because it described connections as
host-group scoped, which is no longer how NVMe-TCP volumes are connected, and to
record why the host-side no-op is correct: the kernel drops the namespace when
the target removes the connection, whereas Fibre Channel must flush its
device-mapper entry.
Signed-off-by: Eugenio Grosso <eugenio.grosso@gmail.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent 1faa7ce commit 34edb22
1 file changed
Lines changed: 25 additions & 8 deletions
File tree
- plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage
Lines changed: 25 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
271 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
272 | 273 | | |
273 | 274 | | |
274 | 275 | | |
| |||
286 | 287 | | |
287 | 288 | | |
288 | 289 | | |
289 | | - | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
290 | 295 | | |
291 | 296 | | |
292 | 297 | | |
| |||
297 | 302 | | |
298 | 303 | | |
299 | 304 | | |
300 | | - | |
| 305 | + | |
| 306 | + | |
301 | 307 | | |
302 | 308 | | |
303 | 309 | | |
304 | 310 | | |
305 | | - | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
306 | 314 | | |
307 | 315 | | |
308 | 316 | | |
| |||
376 | 384 | | |
377 | 385 | | |
378 | 386 | | |
379 | | - | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
380 | 394 | | |
381 | 395 | | |
382 | 396 | | |
| |||
386 | 400 | | |
387 | 401 | | |
388 | 402 | | |
389 | | - | |
| 403 | + | |
390 | 404 | | |
391 | 405 | | |
392 | 406 | | |
393 | 407 | | |
394 | | - | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
395 | 412 | | |
396 | 413 | | |
397 | 414 | | |
| |||
0 commit comments