Fix PAP issue with group config loading 01/127201/1
authora.sreekumar <ajith.sreekumar@bell.ca>
Thu, 17 Feb 2022 15:51:15 +0000 (15:51 +0000)
committera.sreekumar <ajith.sreekumar@bell.ca>
Thu, 17 Feb 2022 15:55:04 +0000 (15:55 +0000)
1) PAP fails to start in OOM when no pdp group configuration file is
   specified with the recent changes. This is fixed.
2) logback.xml file mounted in OOM is not used by PAP. This is also
   fixed in this review.

Change-Id: I84096e1b100e2be20a9a2d95e1eb6ffc79486f29
Issue-ID: POLICY-3754
Signed-off-by: a.sreekumar <ajith.sreekumar@bell.ca>
packages/policy-pap-docker/src/main/docker/policy-pap.sh

index a276e34..0ba2f42 100644 (file)
@@ -3,7 +3,7 @@
 # ============LICENSE_START=======================================================
 #  Copyright (C) 2019-2020 Nordix Foundation.
 #  Modifications Copyright (C) 2019-2021 AT&T Intellectual Property.
-#  Modifications Copyright (C) 2021 Bell Canada. All rights reserved.
+#  Modifications Copyright (C) 2021-2022 Bell Canada. All rights reserved.
 # ================================================================================
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -63,10 +63,14 @@ fi
 
 if [ -f "${POLICY_HOME}/etc/mounted/groups.json" ]; then
     CUSTOM_GROUPS="${POLICY_HOME}/etc/mounted/groups.json"
+else
+    CUSTOM_GROUPS="PapDb.json"
 fi
 
+echo "PDP group configuration file: ${CUSTOM_GROUPS}"
+
 $JAVA_HOME/bin/java \
-    -Dlogback.configurationFile="${POLICY_HOME}/etc/logback.xml" \
+    -Dlogging.config="${POLICY_HOME}/etc/logback.xml" \
     -Dserver.ssl.key-store="${KEYSTORE}" \
     -Dserver.ssl.key-store-password="${KEYSTORE_PASSWD}" \
     -Djavax.net.ssl.trustStore="${TRUSTSTORE}" \