From 2b0581150868d76c6f34baa27de58685c9442ebd Mon Sep 17 00:00:00 2001 From: Chiradeep Vittal Date: Mon, 1 Nov 2010 13:10:05 -0700 Subject: [PATCH] bug 6807: firstip determination is more complicated than at first sight status 6807: resolved fixed --- .../cloud/hypervisor/xen/resource/CitrixResourceBase.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java index 02bded712b4..faca9462c4a 100644 --- a/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java +++ b/core/src/com/cloud/hypervisor/xen/resource/CitrixResourceBase.java @@ -961,8 +961,10 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR boolean removeVif = false; if (add && correctVif == null) { addVif = true; + s_logger.info("ipassoc: Need to add a vif to the virtual router since the ip is in a new subnet " + publicIpAddress); } else if (!add && firstIP) { removeVif = true; + s_logger.info("ipassoc: Need to remove a vif to the virtual router since the removed ip is the last one " + publicIpAddress); } if (addVif) { @@ -994,9 +996,11 @@ public abstract class CitrixResourceBase implements StoragePoolResource, ServerR args += " -f"; args += " -l "; args += publicIpAddress + "/" + cidrSize; - } else if (firstIP) { + s_logger.debug("ipassoc: source nat ip: " + publicIpAddress); + } else if (addVif || removeVif || firstIP) { args += " -l "; args += publicIpAddress + "/" + cidrSize; + s_logger.debug("ipassoc: first ip on vif: " + publicIpAddress); } else { args += " -l "; args += publicIpAddress;