@@ -62,6 +62,12 @@ SCRIPT_ERROR=255
62
62
WDT_ONLINE_MIN_VERSION=" 1.9.9"
63
63
WDT_OFFLINE_MIN_VERSION=" 1.7.3"
64
64
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
+
65
71
export WDT_MODEL_SECRETS_DIRS=" /weblogic-operator/config-overrides-secrets"
66
72
[ ! -d ${WDT_MODEL_SECRETS_DIRS} ] && unset WDT_MODEL_SECRETS_DIRS
67
73
@@ -75,7 +81,6 @@ if [ ! -d "${WDT_OUTPUT_DIR}" ]; then
75
81
createFolder " ${WDT_OUTPUT_DIR} "
76
82
fi
77
83
78
-
79
84
# sort_files sort the files according to the names and naming conventions and write the result to stdout
80
85
# $1 directory
81
86
# $2 extension
@@ -621,6 +626,9 @@ function diff_model_v1() {
621
626
622
627
function diff_model() {
623
628
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
624
632
625
633
export __WLSDEPLOY_STORE_MODEL__=1
626
634
# $1 - new model, $2 original model
@@ -673,6 +681,9 @@ function diff_model() {
673
681
674
682
wdtRotateAndCopyLogFile " ${WDT_COMPARE_MODEL_LOG} "
675
683
684
+ # restore trap
685
+ start_trap
686
+
676
687
trace " Exiting diff_model"
677
688
}
678
689
@@ -902,9 +913,7 @@ function wdtCreatePrimordialDomain() {
902
913
# output configmap and save it for reuse.
903
914
904
915
${WDT_BINDIR} /createDomain.sh ${wdtArgs} > ${WDT_OUTPUT} 2>&1
905
-
906
916
else
907
-
908
917
# We get here only for JRF domain 'second time' (or more) case.
909
918
910
919
# JRF wallet reuse note:
@@ -928,7 +937,8 @@ function wdtCreatePrimordialDomain() {
928
937
# without admin intervention (retrying can compound the problem and obscure the original issue).
929
938
#
930
939
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}
932
942
else
933
943
trace SEVERE " Model in Image: WDT Create Primordial Domain Failed, ret=${ret} "
934
944
fi
@@ -937,6 +947,9 @@ function wdtCreatePrimordialDomain() {
937
947
else
938
948
trace " WDT Create Domain Succeeded, ret=${ret} :"
939
949
cat ${WDT_OUTPUT}
950
+ if [ " JRF" == " $WDT_DOMAIN_TYPE " ]; then
951
+ CREATED_JRF_PRIMODIAL=" true"
952
+ fi
940
953
fi
941
954
942
955
wdtRotateAndCopyLogFile " ${WDT_CREATE_DOMAIN_LOG} "
@@ -974,7 +987,12 @@ function wdtUpdateModelDomain() {
974
987
ret=$?
975
988
976
989
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
978
996
cat ${WDT_OUTPUT}
979
997
exitOrLoop
980
998
fi
@@ -1037,7 +1055,7 @@ function wdtHandleOnlineUpdate() {
1037
1055
for file in $( sort_files ${IMG_ARCHIVES_ROOTDIR} " *.zip" )
1038
1056
do
1039
1057
# expand the archive domain libraries to the domain lib
1040
- cd ${DOMAIN_HOME} /lib || return exitOrLoop
1058
+ cd ${DOMAIN_HOME} /lib || exitOrLoop
1041
1059
${JAVA_HOME} /bin/jar xf ${IMG_ARCHIVES_ROOTDIR} /${file} wlsdeploy/domainLibraries/
1042
1060
1043
1061
if [ $? -ne 0 ] ; then
@@ -1339,10 +1357,8 @@ function logSevereAndExit() {
1339
1357
# 1 - Name of the log file to rotate and copy to WDT output directory.
1340
1358
function wdtRotateAndCopyLogFile() {
1341
1359
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
1344
1360
1345
- logFileRotate ${WDT_OUTPUT_DIR} /${logFileName} ${WDT_LOG_FILE_MAX:- 11}
1361
+ logFileRotate " ${WDT_OUTPUT_DIR} /${logFileName} " " ${WDT_LOG_FILE_MAX:- 11} "
1346
1362
1347
1363
cp ${WDT_ROOT} /logs/${logFileName} ${WDT_OUTPUT_DIR} /
1348
1364
}
0 commit comments