Forward merge apache/4.13 to master

4.13 forward merge
This commit is contained in:
Rohit Yadav 2019-11-21 11:46:14 +05:30 committed by GitHub
commit 114df3dee0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 6 deletions

View File

@ -79,7 +79,7 @@ public class SetNetworkAclConfigItem extends AbstractConfigItemFacade {
// If we check the size of the array, it will fail to setup the network.
// So, let's catch the exception and continue in the loop.
try {
aclRule = new ProtocolAclRule(ruleParts[5], false, Integer.parseInt(ruleParts[1]));
aclRule = new ProtocolAclRule(ruleParts[4], "ACCEPT".equals(ruleParts[5]), Integer.parseInt(ruleParts[1]));
} catch (final Exception e) {
s_logger.warn("Problem occured when reading the entries in the ruleParts array. Actual array size is '" + ruleParts.length + "', but trying to read from index 5.");
continue;
@ -104,4 +104,4 @@ public class SetNetworkAclConfigItem extends AbstractConfigItemFacade {
return super.generateConfigItems(configuration);
}
}
}

View File

@ -3665,7 +3665,7 @@ public class LibvirtComputingResource extends ServerResourceBase implements Serv
cmd.add("network_rules_vmSecondaryIp");
cmd.add("--vmname", vmName);
cmd.add("--nicsecips", secIp);
cmd.add("--action", action);
cmd.add("--action=" + action);
final String result = cmd.execute();
if (result != null) {

View File

@ -732,11 +732,10 @@ public class NetworkServiceImpl extends ManagerBase implements NetworkService {
}
try {
if (ipv4Address != null) {
ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(network, podId, ipOwner, ipv4Address);
}
if (ipv6Address != null) {
ip6addr = ipv6AddrMgr.allocatePublicIp6ForGuestNic(network, podId, ipOwner, ipv6Address);
} else {
ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(network, podId, ipOwner, ipv4Address);
}
if (ipaddr == null && ipv6Address == null) {
throw new InvalidParameterValueException("Allocating ip to guest nic " + nicId + " failed");