mirror of
https://opendev.org/x/pyghmi
synced 2026-08-27 17:16:44 +00:00
Fixes for XCC3 storage config
If stripsize unspecified and it causes a failure, default to 64k. Additionally, clear the cache after deleting a volume. Change-Id: Ia90b7d865e8ee22f00cf9ff0440bc6b0a73416d0
This commit is contained in:
@@ -427,6 +427,7 @@ class OEMHandler(generic.OEMHandler):
|
||||
'Unexpected return to volume deletion: ' + repr(msg))
|
||||
for disk in cfgspec.disks:
|
||||
self._make_available(disk, realcfg)
|
||||
self._urlcache.clear()
|
||||
|
||||
def _parse_array_spec(self, arrayspec):
|
||||
controller = None
|
||||
@@ -696,6 +697,14 @@ class OEMHandler(generic.OEMHandler):
|
||||
f'/redfish/v1/Systems/1/Storage/{cid}/Volumes',
|
||||
method='POST',
|
||||
data=request_data)
|
||||
if code == 500:
|
||||
if not stripsize:
|
||||
# Mystery error can be a mandatory strip size, default to 64k to match WebUI behavior
|
||||
request_data["StripSizeBytes"] = 65536
|
||||
msg, code=self.webclient.grab_json_response_with_status(
|
||||
f'/redfish/v1/Systems/1/Storage/{cid}/Volumes',
|
||||
method='POST',
|
||||
data=request_data)
|
||||
if code == 500:
|
||||
raise Exception("Unexpected response to volume creation: " + repr(msg))
|
||||
time.sleep(60)
|
||||
|
||||
Reference in New Issue
Block a user