Skip to content

Commit

Permalink
feat(LargeBlock): add error for multidevices (#53)
Browse files Browse the repository at this point in the history
Add an error to explicitly say that multi devices SR is not supported
on the driver.
Before that, it would make another error:
```
Error code: SR_BACKEND_FAILURE_77
Error parameters: , Logical Volume group creation failed,
```

Signed-off-by: Damien Thenot <[email protected]>
  • Loading branch information
Nambrok authored Apr 23, 2024
1 parent 0ffc775 commit e87c64b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/LargeBlockSR.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ def detach(self, sr_uuid):
@deviceCheck
def create(self, sr_uuid, size):
base_devices = self.dconf["device"].split(",")
if len(base_devices) > 1:
raise xs_errors.XenError("ConfigDeviceInvalid", opterr="Multiple devices configuration is not supported")

for dev in base_devices:
logical_blocksize = util.pread2(["blockdev", "--getss", dev]).strip()
if logical_blocksize == "512":
Expand Down

0 comments on commit e87c64b

Please sign in to comment.