diff options
author | Marco Platania <platania@research.att.com> | 2018-03-21 17:44:27 -0400 |
---|---|---|
committer | Marco Platania <platania@research.att.com> | 2018-03-21 17:44:27 -0400 |
commit | 13fdadba0a69e43fcfbd55cf4f473cc0db612640 (patch) | |
tree | 98d97a31cb6fe5517a2186a0fbc299643eeb6ff8 /vnfs | |
parent | c18a8faa269799bfe5eaddbb431aff86de689104 (diff) |
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 <platania@research.att.com>
Diffstat (limited to 'vnfs')
-rw-r--r-- | vnfs/vLBMS/apis/health-vnf-onap-plugin/health-vnf-onap-plugin-impl/src/main/java/org/onap/vnf/health/read/ElementStateCustomizer.java | 9 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/properties.conf | 2 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/run_streams_dns.sh (renamed from vnfs/vLBMS/scripts/run_streams.sh) | 0 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_dns_install.sh | 3 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_lb_install.sh | 1 | ||||
-rw-r--r-- | vnfs/vLBMS/scripts/v_packetgen_install.sh | 1 |
6 files changed, 11 insertions, 5 deletions
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<String, VdnsInstance> activeVdnsInstances = dnsInstanceManager.getDnsInstancesAsMap(); Iterator<String> 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"; + } } } } diff --git a/vnfs/vLBMS/scripts/properties.conf b/vnfs/vLBMS/scripts/properties.conf index 03c54699..140c0b86 100644 --- a/vnfs/vLBMS/scripts/properties.conf +++ b/vnfs/vLBMS/scripts/properties.conf @@ -1,4 +1,4 @@ script=/opt/run_health.sh -output=status.txt +output=/opt/status.txt vnfc=vLB primary=true diff --git a/vnfs/vLBMS/scripts/run_streams.sh b/vnfs/vLBMS/scripts/run_streams_dns.sh index 86f97b2e..86f97b2e 100644 --- a/vnfs/vLBMS/scripts/run_streams.sh +++ b/vnfs/vLBMS/scripts/run_streams_dns.sh diff --git a/vnfs/vLBMS/scripts/v_dns_install.sh b/vnfs/vLBMS/scripts/v_dns_install.sh index 38860e8e..7a30c0fd 100644 --- a/vnfs/vLBMS/scripts/v_dns_install.sh +++ b/vnfs/vLBMS/scripts/v_dns_install.sh @@ -64,13 +64,14 @@ sed -i 's/vnfc=.*/vnfc=vDNS/g' /opt/config/properties.conf mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:get -DremoteRepositories=https://nexus.onap.org/content/repositories/snapshots -Dartifact=org.onap.demo.vnf.vlb:vlb-vnf-onap-distribution:$DEMO_ARTIFACTS_VERSION-SNAPSHOT:tar.gz:hc -Dtransitive=false -Ddest=. tar -zmxvf vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-SNAPSHOT-hc.tar.gz -rm vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-SNAPSHOT.tar.gz +rm vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-SNAPSHOT-hc.tar.gz sed -i 's/"restconf-binding-address": "127.0.0.1",/"restconf-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-SNAPSHOT/config/honeycomb.json sed -i 's/"netconf-tcp-binding-address": "127.0.0.1",/"netconf-tcp-binding-address": "0.0.0.0",/g' vlb-vnf-onap-distribution-$DEMO_ARTIFACTS_VERSION-SNAPSHOT/config/honeycomb.json chmod +x v_dns_init.sh chmod +x vdns.sh chmod +x set_gre_tunnel.sh +chmod +x run_health.sh # Download Bind config files cd /opt/config diff --git a/vnfs/vLBMS/scripts/v_lb_install.sh b/vnfs/vLBMS/scripts/v_lb_install.sh index afcb0811..7d46918d 100644 --- a/vnfs/vLBMS/scripts/v_lb_install.sh +++ b/vnfs/vLBMS/scripts/v_lb_install.sh @@ -89,6 +89,7 @@ chmod +x vlb.sh chmod +x /opt/VES/evel/evel-library/code/VESreporting/go-client.sh chmod +x add_dns.sh chmod +x remove_dns.sh +chmod +x run_health.sh echo "vpp" > config/service.txt diff --git a/vnfs/vLBMS/scripts/v_packetgen_install.sh b/vnfs/vLBMS/scripts/v_packetgen_install.sh index 2f13fef2..abfa1f46 100644 --- a/vnfs/vLBMS/scripts/v_packetgen_install.sh +++ b/vnfs/vLBMS/scripts/v_packetgen_install.sh @@ -75,6 +75,7 @@ rm *.tar.gz chmod +x v_packetgen_init.sh chmod +x vpacketgen.sh chmod +x run_streams_dns.sh +chmod +x run_health.sh echo "vpp" > config/service.txt |