mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix potential nullpointer in recent KVM systemvm patchdisk update
Signed-off-by: Edison Su <sudison@gmail.com>
This commit is contained in:
parent
0d3a2a3678
commit
f52d37fb53
@ -2587,7 +2587,8 @@ public class LibvirtComputingResource extends ServerResourceBase implements
|
||||
if (disk.getDeviceType() == DiskDef.deviceType.CDROM
|
||||
&& disk.getDiskPath() != null) {
|
||||
cleanupDisk(conn, disk);
|
||||
} else if (disk.getDiskPath().contains(vmName + "-patchdisk")
|
||||
} else if (disk.getDiskPath() != null
|
||||
&& disk.getDiskPath().contains(vmName + "-patchdisk")
|
||||
&& vmName.matches("^[rsv]-\\d+-VM$")) {
|
||||
if (!_storagePoolMgr.deleteVbdByPath(disk.getDiskPath())) {
|
||||
s_logger.warn("failed to delete patch disk " + disk.getDiskPath());
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user