[OOM] Fix Feed Provisioning for DFC 94/123994/3
authorajay_dp001 <ajay.deep.singh@est.tech>
Thu, 9 Sep 2021 13:48:36 +0000 (19:18 +0530)
committerAjay Deep Singh <ajay.deep.singh@est.tech>
Fri, 10 Sep 2021 14:13:44 +0000 (14:13 +0000)
   Cmd :"grep -o '"logURL":"[^"]*' "$file" | cut -d '"' -f4"
   filters more then one logURL like below from feedConfig response log,
   If both subs/pubs are present, which corrupts application config.

   https://dmaap-dr-prov/feedlog/1
   https://dmaap-dr-prov/sublog/1

   Requirement is to filter only feedlog URL, with changes script
   should correctly filter URL: https://dmaap-dr-prov/feedlog/1.

Issue-ID: DCAEGEN2-2910
Signed-off-by: ajay_dp001 <ajay.deep.singh@est.tech>
Change-Id: I2a67aad5c533f1b623737f56feeefb3a05f6373a

kubernetes/common/common/templates/_dmaapProvisioning.tpl

index 704bd06..d28494a 100644 (file)
       cd /opt/app/config/cache
       for file in $(ls feed*); do
         NUM=$(echo "$file" | sed 's/feedConfig-\([0-9]\+\)-resp.json/\1/')
-        export DR_LOG_URL_"$NUM"="$(grep -o '"logURL":"[^"]*' "$file" | cut -d '"' -f4)"
+        export DR_LOG_URL_"$NUM"="$(grep -o '"logURL":"[^"]*' "$file" | grep -w "feedlog" | cut -d '"' -f4)"
         export DR_FILES_PUBLISHER_URL_"$NUM"="$(grep -o '"publishURL":"[^"]*' "$file" | cut -d '"' -f4)"
       done
       for file in $(ls drpub*); do