diff options
author | 2018-11-05 12:24:45 -0500 | |
---|---|---|
committer | 2018-11-05 20:45:35 +0000 | |
commit | d9a563510d84d8c497adc1e758f42d8cedb00c66 (patch) | |
tree | e9cb561f4a928f709506a90f55ef30b766e20670 /kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh | |
parent | b46cd633697ad7866ee789d5f881f7008248ec82 (diff) |
BugFix:CtxAggr doesn't pick up events- OOM chg
The root cause is due to DMaap topic wasn't created on a freshly
deployed system.
The solution is to create these POMBA related topics if not exists.
Issue-ID: LOG-794
Change-Id: I0d9aabbbcb649d355b1928e05292f8b51c38ef9f
Signed-off-by: Leigh, Phillip (pl876u) <phillip.leigh@amdocs.com>
Diffstat (limited to 'kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh')
-rw-r--r-- | kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh b/kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh new file mode 100644 index 0000000000..3ef1434f20 --- /dev/null +++ b/kubernetes/pomba/charts/pomba-contextaggregator/resources/bin/pre_start.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +# Get the list of topic from curl ressult +dmaap_mr_host=message-router +dmaap_mr_port=3904 +temp_output_file=".tmpoutput" +curl -X GET http://$dmaap_mr_host:$dmaap_mr_port/topics > $temp_output_file + +# Test topic POA-AUDIT-INIT, POA-AUDIT-RESULT, POA-RULE-VALIDATION +TOPICS="POA-AUDIT-INIT POA-RULE-VALIDATION POA-AUDIT-RESULT" +for i_topic in $TOPICS +do + echo "Looping ... topic: $i_topic" + if grep -iFq "$i_topic" $temp_output_file + then + # code if found + echo "$i_topic found." + else + # code if not found + echo "$i_topic NOT found." + curl -X POST -H "content-type: application/json" --data "Empty post to create topic" http://$dmaap_mr_host:$dmaap_mr_port/events/$i_topic + fi +done + +# remove the temp file +rm -f $temp_output_file |