mirror of https://github.com/apache/cloudstack.git
Merge branch '3.0.x' of ssh://git.cloud.com/var/lib/git/cloudstack-oss into 3.0.x
Reviewed-by: Vijayendra Bhamidipati
This commit is contained in:
commit
4e413c3310
|
|
@ -1495,7 +1495,12 @@ public class VmwareResource implements StoragePoolResource, ServerResource, Vmwa
|
|||
|
||||
int ethDeviceNum = this.findRouterEthDeviceIndex(domrName, routerIp, ip.getVifMacAddress());
|
||||
if (ethDeviceNum < 0) {
|
||||
throw new InternalErrorException("Failed to find DomR VIF to associate/disassociate IP with.");
|
||||
if (ip.isAdd()) {
|
||||
throw new InternalErrorException("Failed to find DomR VIF to associate/disassociate IP with.");
|
||||
} else {
|
||||
s_logger.debug("VIF to deassociate IP with does not exist, return success");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
String args = "";
|
||||
|
|
|
|||
|
|
@ -431,6 +431,19 @@ def can_bridge_firewall(session, args):
|
|||
util.pread2(['iptables', '-D', 'FORWARD', '-j', 'RH-Firewall-1-INPUT'])
|
||||
except:
|
||||
util.SMlog('Chain BRIDGE-FIREWALL already exists')
|
||||
|
||||
try:
|
||||
util.pread2(['iptables', '-N', 'BRIDGE-DEFAULT-FIREWALL'])
|
||||
util.pread2(['iptables', '-A', 'BRIDGE-DEFAULT-FIREWALL', '-m', 'state', '--state', 'RELATED,ESTABLISHED', '-j', 'ACCEPT'])
|
||||
util.pread2(['iptables', '-A', 'BRIDGE-DEFAULT-FIREWALL', '-m', 'physdev', '--physdev-is-bridged', '-p', 'udp', '--dport', '67', '--sport', '68', '-j', 'ACCEPT'])
|
||||
util.pread2(['iptables', '-A', 'BRIDGE-DEFAULT-FIREWALL', '-m', 'physdev', '--physdev-is-bridged', '-p', 'udp', '--dport', '68', '--sport', '67', '-j', 'ACCEPT'])
|
||||
util.pread2(['iptables', '-I', 'BRIDGE-FIREWALL', '-j', 'BRIDGE-DEFAULT-FIREWALL'])
|
||||
util.pread2(['iptables', '-D', 'BRIDGE-FIREWALL', '-m', 'state', '--state', 'RELATED,ESTABLISHED', '-j', 'ACCEPT'])
|
||||
util.pread2(['iptables', '-D', 'BRIDGE-FIREWALL', '-m', 'physdev', '--physdev-is-bridged', '-p', 'udp', '--dport', '67', '--sport', '68', '-j', 'ACCEPT'])
|
||||
util.pread2(['iptables', '-D', 'BRIDGE-FIREWALL', '-m', 'physdev', '--physdev-is-bridged', '-p', 'udp', '--dport', '68', '--sport', '67', '-j', 'ACCEPT'])
|
||||
except:
|
||||
util.SMlog('Chain BRIDGE-DEFAULT-FIREWALL already exists')
|
||||
|
||||
privnic = get_private_nic(session, args)
|
||||
result = 'true'
|
||||
try:
|
||||
|
|
@ -756,7 +769,7 @@ def default_network_rules_systemvm(session, args):
|
|||
for vif in vifs:
|
||||
try:
|
||||
util.pread2(['iptables', '-A', 'BRIDGE-FIREWALL', '-m', 'physdev', '--physdev-is-bridged', '--physdev-out', vif, '-j', vmchain])
|
||||
util.pread2(['iptables', '-I', 'BRIDGE-FIREWALL', '4', '-m', 'physdev', '--physdev-is-bridged', '--physdev-in', vif, '-j', vmchain])
|
||||
util.pread2(['iptables', '-I', 'BRIDGE-FIREWALL', '2', '-m', 'physdev', '--physdev-is-bridged', '--physdev-in', vif, '-j', vmchain])
|
||||
util.pread2(['iptables', '-I', vmchain, '-m', 'physdev', '--physdev-is-bridged', '--physdev-in', vif, '-j', 'RETURN'])
|
||||
except:
|
||||
util.SMlog("Failed to program default rules")
|
||||
|
|
@ -828,7 +841,7 @@ def default_network_rules(session, args):
|
|||
try:
|
||||
for v in vifs:
|
||||
util.pread2(['iptables', '-A', 'BRIDGE-FIREWALL', '-m', 'physdev', '--physdev-is-bridged', '--physdev-out', v, '-j', vmchain_default])
|
||||
util.pread2(['iptables', '-I', 'BRIDGE-FIREWALL', '4', '-m', 'physdev', '--physdev-is-bridged', '--physdev-in', v, '-j', vmchain_default])
|
||||
util.pread2(['iptables', '-I', 'BRIDGE-FIREWALL', '2', '-m', 'physdev', '--physdev-is-bridged', '--physdev-in', v, '-j', vmchain_default])
|
||||
|
||||
#don't let vm spoof its ip address
|
||||
for v in vifs:
|
||||
|
|
@ -933,7 +946,7 @@ def network_rules_for_rebooted_vm(session, vmName):
|
|||
|
||||
for v in vifs:
|
||||
util.pread2(['iptables', '-A', 'BRIDGE-FIREWALL', '-m', 'physdev', '--physdev-is-bridged', '--physdev-out', v, '-j', vmchain_default])
|
||||
util.pread2(['iptables', '-I', 'BRIDGE-FIREWALL', '4', '-m', 'physdev', '--physdev-is-bridged', '--physdev-in', v, '-j', vmchain_default])
|
||||
util.pread2(['iptables', '-I', 'BRIDGE-FIREWALL', '2', '-m', 'physdev', '--physdev-is-bridged', '--physdev-in', v, '-j', vmchain_default])
|
||||
|
||||
#change antispoof rule in vmchain
|
||||
try:
|
||||
|
|
|
|||
|
|
@ -1243,8 +1243,17 @@
|
|||
openfirewall: false,
|
||||
networkid: networkid
|
||||
};
|
||||
if(args.context.ipAddresses != undefined)
|
||||
data = $.extend(data, {publicipid: args.context.ipAddresses[0].id});
|
||||
if(args.context.ipAddresses != null) {
|
||||
data = $.extend(data, {
|
||||
publicipid: args.context.ipAddresses[0].id
|
||||
});
|
||||
}
|
||||
else {
|
||||
data = $.extend(data, {
|
||||
domainid: g_domainid,
|
||||
account: g_account
|
||||
});
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
url: createURL('createLoadBalancerRule'),
|
||||
|
|
|
|||
|
|
@ -485,8 +485,7 @@
|
|||
$checkbox.attr('checked', false);
|
||||
$newNetwork.addClass('unselected');
|
||||
} else {
|
||||
$checkbox.attr('checked', true);
|
||||
$newNetwork.removeClass('unselected');
|
||||
$newNetwork.find('input[name=defaultNetwork]').filter('[value=new-network]').click();
|
||||
}
|
||||
|
||||
$checkbox.change();
|
||||
|
|
|
|||
Loading…
Reference in New Issue