This repository has been archived by the owner on Feb 29, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This patch adds healtcheck logic for ODL container. Change-Id: I75af8119f495e2eb1b617b9773dde7abb6ea1727 Closes-Bug: #1713632
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
. ${HEALTHCHECK_SCRIPTS:-/usr/share/openstack-tripleo-common/healthcheck}/common.sh | ||
|
||
username=$(get_config_val /opt/opendaylight/etc/org.jolokia.osgi.cfg DEFAULT org.jolokia.user admin) | ||
password=$(get_config_val /opt/opendaylight/etc/org.jolokia.osgi.cfg DEFAULT org.jolokia.password admin) | ||
bind_host=$(grep -r '<Set name="host">' "/opt/opendaylight/etc/jetty.xml" | awk -F'>' FNR==1'{print $2}') | ||
bind_port=$(grep -r '<Property name="jetty.port" default=' "/opt/opendaylight/etc/jetty.xml" | awk FNR==2'{print $3}' | cut -d'"' -f2) | ||
odl_check_url=restconf/operational/network-topology:network-topology/topology/netvirt:1 | ||
|
||
healthcheck_curl -u $username:$password http://$bind_host:$bind_port/$odl_check_url |