CLOUDSTACK-10177: Only pass IPv6 address to Security Group Python script if present (#2355)

Otherwise we send down a 'null' to a ProcessBuilder in Java instead of a String and this
causes a NPE.

We should check first if the Instance has a IPv6 address before sending it there.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
This commit is contained in:
Wido den Hollander 2017-12-11 17:17:50 +01:00 committed by Rohit Yadav
parent 637d9a62c5
commit be3a39ea4f

View File

@ -3478,7 +3478,9 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
cmd.add("--vmname", vmName);
cmd.add("--vmid", vmId);
cmd.add("--vmip", guestIP);
cmd.add("--vmip6", guestIP6);
if (StringUtils.isNotBlank(guestIP6)) {
cmd.add("--vmip6", guestIP6);
}
cmd.add("--sig", sig);
cmd.add("--seq", seq);
cmd.add("--vmmac", mac);