bug 7345: During the expunge operation, we were not calling the deleteipforwardingrule method, for a rule which was static nat. Adding that logic. Also, making a change in the domr script as we do not need to execute a line on deletion of a rule

status 7345: resolved fixed
This commit is contained in:
abhishek 2010-11-30 10:05:32 -08:00
parent 54f177cacc
commit 1aee756184
2 changed files with 9 additions and 5 deletions

View File

@ -91,8 +91,6 @@ add_one_to_one_nat_entry() {
if [ "$op" == "-A" ]
then
iptables -P FORWARD DROP
else
iptables -P FORWARD ACCEPT
fi
iptables $op FORWARD -m state --state RELATED,ESTABLISHED -j ACCEPT
iptables $op FORWARD -i eth2 -o eth0 -d $guestIp -m state --state NEW -j ACCEPT

View File

@ -2245,9 +2245,15 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, VirtualM
{
if((publicIp.getAccountId().longValue() == vm.getAccountId()))
{
_networkMgr.deletePortForwardingRule(rule.getId(),true);//delete the rule with the sys user's credentials
if(s_logger.isDebugEnabled())
s_logger.debug("Rule "+rule.getId()+" for vm:"+vm.getHostName()+" is deleted successfully during expunge operation");
if(publicIp.isOneToOneNat()){
_networkMgr.deleteIpForwardingRule(rule.getId());
if(s_logger.isDebugEnabled())
s_logger.debug("Rule "+rule.getId()+" for vm:"+vm.getHostName()+" is deleted successfully during expunge operation");
}else{
_networkMgr.deletePortForwardingRule(rule.getId(),true);//delete the rule with the sys user's credentials
if(s_logger.isDebugEnabled())
s_logger.debug("Rule "+rule.getId()+" for vm:"+vm.getHostName()+" is deleted successfully during expunge operation");
}
}
}
}