@@ -62,6 +62,12 @@ SCRIPT_ERROR=255
6262WDT_ONLINE_MIN_VERSION=" 1.9.9"
6363WDT_OFFLINE_MIN_VERSION=" 1.7.3"
6464
65+ FATAL_JRF_INTROSPECTOR_ERROR_MSG=" Model In Image JRF domain creation and schema initialization encountered an unrecoverable error.
66+ If it is a database credential related error such as wrong password, schema prefix, or database connect
67+ string, then correct the error and patch the domain resource 'domain.spec.introspectVersion' with a new
68+ value. If the error is not related to a database credential, then you must also drop and recreate the
69+ JRF schemas before patching the domain resource. Introspection Error: "
70+
6571export WDT_MODEL_SECRETS_DIRS=" /weblogic-operator/config-overrides-secrets"
6672[ ! -d ${WDT_MODEL_SECRETS_DIRS} ] && unset WDT_MODEL_SECRETS_DIRS
6773
@@ -75,7 +81,6 @@ if [ ! -d "${WDT_OUTPUT_DIR}" ]; then
7581 createFolder " ${WDT_OUTPUT_DIR} "
7682fi
7783
78-
7984# sort_files sort the files according to the names and naming conventions and write the result to stdout
8085# $1 directory
8186# $2 extension
@@ -621,6 +626,9 @@ function diff_model_v1() {
621626
622627function diff_model() {
623628 trace " Entering diff_model"
629+ # wdt shell script or logFileRotate may return non-zero code if trap is on, then it will go to trap instead
630+ # temporarily disable it
631+ stop_trap
624632
625633 export __WLSDEPLOY_STORE_MODEL__=1
626634 # $1 - new model, $2 original model
@@ -673,6 +681,9 @@ function diff_model() {
673681
674682 wdtRotateAndCopyLogFile " ${WDT_COMPARE_MODEL_LOG} "
675683
684+ # restore trap
685+ start_trap
686+
676687 trace " Exiting diff_model"
677688}
678689
@@ -902,9 +913,7 @@ function wdtCreatePrimordialDomain() {
902913 # output configmap and save it for reuse.
903914
904915 ${WDT_BINDIR} /createDomain.sh ${wdtArgs} > ${WDT_OUTPUT} 2>&1
905-
906916 else
907-
908917 # We get here only for JRF domain 'second time' (or more) case.
909918
910919 # JRF wallet reuse note:
@@ -928,7 +937,8 @@ function wdtCreatePrimordialDomain() {
928937 # without admin intervention (retrying can compound the problem and obscure the original issue).
929938 #
930939 if [ " JRF" == " $WDT_DOMAIN_TYPE " ] && [ -z " ${OPSS_FLAGS} " ] ; then
931- trace SEVERE " Model in Image: FatalIntrospectorError: WDT Create Primordial Domain Failed, ret=${ret} "
940+ trace SEVERE " Model in Image: FatalIntrospectorError: WDT Create Domain Failed, return ${ret} . " \
941+ ${FATAL_JRF_INTROSPECTOR_ERROR_MSG}
932942 else
933943 trace SEVERE " Model in Image: WDT Create Primordial Domain Failed, ret=${ret} "
934944 fi
@@ -937,6 +947,9 @@ function wdtCreatePrimordialDomain() {
937947 else
938948 trace " WDT Create Domain Succeeded, ret=${ret} :"
939949 cat ${WDT_OUTPUT}
950+ if [ " JRF" == " $WDT_DOMAIN_TYPE " ]; then
951+ CREATED_JRF_PRIMODIAL=" true"
952+ fi
940953 fi
941954
942955 wdtRotateAndCopyLogFile " ${WDT_CREATE_DOMAIN_LOG} "
@@ -974,7 +987,12 @@ function wdtUpdateModelDomain() {
974987 ret=$?
975988
976989 if [ $ret -ne 0 ]; then
977- trace SEVERE " WDT Update Domain command Failed:"
990+ if [ " true" == " ${CREATED_JRF_PRIMODIAL} " ] ; then
991+ trace SEVERE " Model in Image: FatalIntrospectorError: WDT Update Domain Failed, return ${ret} . " \
992+ ${FATAL_JRF_INTROSPECTOR_ERROR_MSG}
993+ else
994+ trace SEVERE " WDT Update Domain command Failed:"
995+ fi
978996 cat ${WDT_OUTPUT}
979997 exitOrLoop
980998 fi
@@ -1037,7 +1055,7 @@ function wdtHandleOnlineUpdate() {
10371055 for file in $( sort_files ${IMG_ARCHIVES_ROOTDIR} " *.zip" )
10381056 do
10391057 # expand the archive domain libraries to the domain lib
1040- cd ${DOMAIN_HOME} /lib || return exitOrLoop
1058+ cd ${DOMAIN_HOME} /lib || exitOrLoop
10411059 ${JAVA_HOME} /bin/jar xf ${IMG_ARCHIVES_ROOTDIR} /${file} wlsdeploy/domainLibraries/
10421060
10431061 if [ $? -ne 0 ] ; then
@@ -1339,10 +1357,8 @@ function logSevereAndExit() {
13391357# 1 - Name of the log file to rotate and copy to WDT output directory.
13401358function wdtRotateAndCopyLogFile() {
13411359 local logFileName=$1
1342- testLogFileRotate " ${WDT_OUTPUT_DIR} /${logFileName} "
1343- [ $? -ne 0 ] && trace SEVERE " Error accessing '${WDT_OUTPUT_DIR} '. See previous log messages." && exit 1
13441360
1345- logFileRotate ${WDT_OUTPUT_DIR} /${logFileName} ${WDT_LOG_FILE_MAX:- 11}
1361+ logFileRotate " ${WDT_OUTPUT_DIR} /${logFileName} " " ${WDT_LOG_FILE_MAX:- 11} "
13461362
13471363 cp ${WDT_ROOT} /logs/${logFileName} ${WDT_OUTPUT_DIR} /
13481364}
0 commit comments