@@ -399,13 +399,12 @@ createWLDomain() {
399399 if [ -f ${PRIMORDIAL_DOMAIN_ZIPPED} ] ; then
400400 checkSecureModeForUpgrade
401401 fi
402-
403402 if [ ${WDT_ARTIFACTS_CHANGED} -ne 0 ] || [ ${jdk_changed} -eq 1 ] \
404403 || [ ${SECRETS_AND_ENV_CHANGED} -ne 0 ] || [ ${DISABLE_SM_FOR_12214_NONSM_UPG} -eq 1 ] ; then
405-
406404 trace " Need to create domain ${WDT_DOMAIN_TYPE} "
407405 createModelDomain
408- if [ " ${MERGED_MODEL_ENVVARS_SAME} " == " false" ] ; then
406+ if [ " ${MERGED_MODEL_ENVVARS_SAME} " == " false" ] || [ ${DISABLE_SM_FOR_12214_NONSM_UPG} -eq 1 ] ; then
407+ # Make sure it will run the introspectDomain.py
409408 DOMAIN_CREATED=1
410409 fi
411410 else
@@ -500,7 +499,8 @@ createModelDomain() {
500499 trace " Entering createModelDomain"
501500 createPrimordialDomain
502501
503- if [ " ${MERGED_MODEL_ENVVARS_SAME} " == " false" ] ; then
502+ # If model changes or upgrade image scenario, run update domain.
503+ if [ " ${MERGED_MODEL_ENVVARS_SAME} " == " false" ] || [ $DISABLE_SM_FOR_12214_NONSM_UPG -eq 1 ] ; then
504504 # if there is a new primordial domain created then use newly created primordial domain otherwise
505505 # if the primordial domain already in the configmap, restore it
506506 #
@@ -780,9 +780,6 @@ createPrimordialDomain() {
780780
781781 trace " No primordial domain or need to create again because of changes require domain recreation"
782782
783- # if } -eq 1 ] && [ -f ${PRIMORDIAL_DOMAIN_ZIPPED} ]; then
784-
785-
786783 wdtCreatePrimordialDomain
787784 create_primordial_tgz=1
788785 MII_USE_ONLINE_UPDATE=false
@@ -846,6 +843,7 @@ checkSecureModeForUpgrade() {
846843 if [ -f /tmp/mii_domain_upgrade.txt ] && [ $( grep -i False /tmp/mii_domain_upgrade.txt | wc -l ) -gt 0 ] ; then
847844 if [ -f /tmp/mii_domain_before14120.txt ] && [ $( grep -i True /tmp/mii_domain_before14120.txt | wc -l ) -gt 0 ] ; then
848845 # Set this so that the upgrade image only scenario 12.2.1.4 to 14.1.2 will recreate the domain
846+ trace " Domain version is earlier than 14.1.2, upgrade only image to 14.1.2 detected"
849847 DISABLE_SM_FOR_12214_NONSM_UPG=1
850848 fi
851849 fi
0 commit comments