CLOUDSTACK-4575: Portable IP: disassociating a transferred public IP fails

The code is excessively complicated and convoluted.
 DisassociateIP ->
     Revoke Rule -> {FW, PF{incl SNAT}, LB, RA VPN} ->
        -> Send IpAssoc (false) to VR
     Send all config to VR again
        -> Send IpAssoc(false) to VR again  <---- fails here since it cannot find the VLAN for the IP since it is already gone
        -> Mark Ip as released

The workaround fix would be to not throw an exception in CitrixResourceBase if it is disassociate and the VLAN does not exist on the XS host.

Signed-off-by: Chiradeep Vittal <chiradeep@apache.org>
This commit is contained in:
Chiradeep Vittal 2013-08-30 14:27:40 -07:00
parent 6354604eed
commit a98eb12549
1 changed files with 3 additions and 0 deletions

View File

@ -2299,6 +2299,9 @@ public abstract class CitrixResourceBase implements ServerResource, HypervisorRe
if (add && correctVif == null) {
addVif = true;
}
if (!add && correctVif == null) {
return; // it is a disassociateIp and it has already happened
}
if (addVif) {
// Add a new VIF to DomR