示例#1
0
 public static void dispatchAssignAddress(Address address, VmInstance vm) {
   try {
     AssignAddressCallback callback = new AssignAddressCallback(address, vm);
     Clusters.dispatchClusterEvent(address.getCluster(), callback);
   } catch (Throwable e) {
     LOG.debug(e, e);
   }
 }
示例#2
0
 public static void dispatchUnassignAddress(Address address) {
   if (VmInstance.DEFAULT_IP.equals(address.getInstanceAddress())) {
     return;
   }
   try {
     UnassignAddressCallback callback = new UnassignAddressCallback(address);
     Clusters.dispatchClusterEvent(address.getCluster(), callback);
   } catch (Throwable e) {
     LOG.debug(e, e);
   }
 }
示例#3
0
 private static void handleOrphan(String cluster, Address address) {
   Integer orphanCount = 1;
   orphanCount = orphans.putIfAbsent(address.getName(), orphanCount);
   orphanCount = (orphanCount == null) ? 1 : orphanCount;
   orphans.put(address.getName(), orphanCount + 1);
   LOG.warn("Found orphaned public ip address: " + address + " count=" + orphanCount);
   if (orphanCount > 10) {
     orphans.remove(address.getName());
     Clusters.dispatchClusterEvent(cluster, new UnassignAddressCallback(address));
   }
 }