Ensures NetApp iSCSI driver correctly compares int values for size
The NetApp iSCSI driver needs to verify that the new size requested during an extend operation does not exceed the max_resize of the lun. However, the driver was doing a >= compare against str values of the sizes rather than the int values. This caused the incorrect code path to be used in certain situations. Change-Id: I8bc66c71db6b469c7adf00ce8b5091513fccb740 Closes-Bug: 1281279
This commit is contained in:
parent
e96f3b5133
commit
a1d78df1b7
|
@ -591,7 +591,8 @@ class NetAppDirectISCSIDriver(driver.ISCSIDriver):
|
|||
if curr_size_bytes != new_size_bytes:
|
||||
lun_geometry = self._get_lun_geometry(path)
|
||||
if (lun_geometry and lun_geometry.get("max_resize")
|
||||
and lun_geometry.get("max_resize") >= new_size_bytes):
|
||||
and int(lun_geometry.get("max_resize")) >=
|
||||
int(new_size_bytes)):
|
||||
self._do_direct_resize(path, new_size_bytes)
|
||||
else:
|
||||
self._do_sub_clone_resize(path, new_size_bytes)
|
||||
|
|
Loading…
Reference in New Issue