[INTTEST-45] use REST for diagstatus instead of checking karaf.log when determining if controller is UP Created: 25/Apr/18  Updated: 25/Jul/18

Status: Open
Project: integration-test
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Improvement Priority: Medium
Reporter: Jamo Luhrsen Assignee: Unassigned
Resolution: Unresolved Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Blocks
is blocked by INFRAUTILS-33 Expose ready and/or diagstatus via a ... Resolved
Relates
relates to NETVIRT-1177 Switch to using infrautils diagstatus... Resolved

 Description   

instead of this we can hit

http://${ODL_IP}:8181/diagstatus

and look for status code 418



 Comments   
Comment by Michael Vorburger [ 26/Apr/18 ]

> and look for status code 418

so if you look at the "doc" (cough) in INFRAUTILS-33, what you might want to do instead is just look for any "non-200" (=sth, NOK) status code, instead?

Comment by Jamo Luhrsen [ 27/Apr/18 ]

yeah, and/or if I could read java code better too... LOL

Comment by Jamo Luhrsen [ 27/Apr/18 ]

here's a patch to do this in robot
https://git.opendaylight.org/gerrit/#/c/71527/

but, we will still want a patch to do this with curl/wget in our releng/builder deploy scripts.

Comment by Luis Gomez [ 25/Jul/18 ]

This is jut 2 files in releng/builder:

jjb/integration/distribution/distribution-check-bootup.sh
jjb/integration/integration-deploy-controller-run-test.sh
jjb/integration/integration-start-cluster-run-test.sh

we just need to replace this section by the new REST call:

echo "Waiting up to 6 minutes for controller to come up, checking every 5 seconds..."
COUNT="0"
while true; do
    COUNT=$(( ${COUNT} + 5 ))
    sleep 5
    echo "already waited ${COUNT} seconds..."
    if grep --quiet 'org.opendaylight.infrautils.ready-impl.*System ready' "${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log"; then
        echo "Controller is UP"
        break
    elif (( "${COUNT}" > "360" )); then
        echo "Timeout Controller DOWN"
        dump_log_and_exit
    fi
done
Generated at Wed Feb 07 20:04:25 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.