From 13fdadba0a69e43fcfbd55cf4f473cc0db612640 Mon Sep 17 00:00:00 2001 From: Marco Platania Date: Wed, 21 Mar 2018 17:44:27 -0400 Subject: Fix health check issues with vLBMS - Allow vLB to run health check only against active vDNS instances - Change the path to status file - Make run_health scripts executable Change-Id: I6909d8507cafee5f9e93fcceb868db5d4f224045 Issue-ID: INT-433 Signed-off-by: Marco Platania --- .../java/org/onap/vnf/health/read/ElementStateCustomizer.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'vnfs/vLBMS/apis') diff --git a/vnfs/vLBMS/apis/health-vnf-onap-plugin/health-vnf-onap-plugin-impl/src/main/java/org/onap/vnf/health/read/ElementStateCustomizer.java b/vnfs/vLBMS/apis/health-vnf-onap-plugin/health-vnf-onap-plugin-impl/src/main/java/org/onap/vnf/health/read/ElementStateCustomizer.java index 15d0c22a..b83ccef6 100644 --- a/vnfs/vLBMS/apis/health-vnf-onap-plugin/health-vnf-onap-plugin-impl/src/main/java/org/onap/vnf/health/read/ElementStateCustomizer.java +++ b/vnfs/vLBMS/apis/health-vnf-onap-plugin/health-vnf-onap-plugin-impl/src/main/java/org/onap/vnf/health/read/ElementStateCustomizer.java @@ -168,9 +168,12 @@ public final class ElementStateCustomizer implements InitializingReaderCustomize // check all the vDNS instances Map activeVdnsInstances = dnsInstanceManager.getDnsInstancesAsMap(); Iterator iter = activeVdnsInstances.keySet().iterator(); - while(iter.hasNext()){ - if(!getRemoteVnfcHealthStatus(activeVdnsInstances.get(iter.next()).getOamIpAddr())) { - healthStatus = "unhealthy"; + while(iter.hasNext()) { + VdnsInstance vdns = activeVdnsInstances.get(iter.next()); + if(vdns.isEnabled()) { + if(!getRemoteVnfcHealthStatus(vdns.getOamIpAddr())) { + healthStatus = "unhealthy"; + } } } } -- cgit 1.2.3-korg