Skip to content

Commit 7f5d073

Browse files
committed
Merge branch 'jira-wdt-912-nm-properties' into 'main'
Update NM properties before first WLST updateDomain call for offline See merge request weblogic-cloud/weblogic-deploy-tooling!1719
2 parents 695a49d + e8c1a77 commit 7f5d073

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

core/src/main/python/update.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@ def __update_online(model_deployer, model, model_context, aliases):
191191
topology_updater.set_server_groups()
192192

193193
topology_updater.clear_placeholder_targeting(jdbc_names)
194+
topology_updater.update_nm_properties() # alias will skip for online, but log the omission
194195
topology_updater.update()
195196
model_deployer.deploy_resources()
196197
model_deployer.distribute_database_wallets_online()
@@ -243,6 +244,9 @@ def __update_offline(model_deployer, model, model_context, aliases):
243244
rcu_helper = RCUHelper(model, None, model_context, aliases, exception_type=ExceptionType.DEPLOY)
244245
rcu_helper.update_rcu_password()
245246

247+
# this needs to be before first updateDomain for NativeVersionEnabled=true to update correctly
248+
topology_updater.update_nm_properties()
249+
246250
__update_offline_domain()
247251

248252
topology_updater.set_server_groups()

core/src/main/python/wlsdeploy/tool/deploy/topology_updater.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from wlsdeploy.aliases.model_constants import FRONTEND_HOST
1111
from wlsdeploy.aliases.model_constants import MACHINE
1212
from wlsdeploy.aliases.model_constants import MIGRATABLE_TARGET
13+
from wlsdeploy.aliases.model_constants import NM_PROPERTIES
1314
from wlsdeploy.aliases.model_constants import SECURITY
1415
from wlsdeploy.aliases.model_constants import SECURITY_CONFIGURATION
1516
from wlsdeploy.aliases.model_constants import SERVER
@@ -114,6 +115,9 @@ def update(self):
114115
# /Security cannot be updated on existing domain
115116
folder_list.remove(SECURITY)
116117

118+
# /NMProperties were handled before first updateDomain
119+
folder_list.remove(NM_PROPERTIES)
120+
117121
self._security_provider_creator.create_security_configuration(location)
118122
folder_list.remove(SECURITY_CONFIGURATION)
119123

@@ -187,6 +191,16 @@ def update_machines_clusters_and_servers(self, delete_now=True):
187191
def clear_placeholder_targeting(self, jdbc_names):
188192
self.topology_helper.clear_jdbc_placeholder_targeting(jdbc_names)
189193

194+
def update_nm_properties(self):
195+
"""
196+
The NMProperties section has to be done before the first WLST updateDomain() call in offline WLST.
197+
If it is done after, NativeVersionEnabled=true will not update correctly.
198+
"""
199+
domain_token = deployer_utils.get_domain_token(self.aliases)
200+
location = LocationContext()
201+
location.add_name_token(domain_token, self.model_context.get_domain_name())
202+
self._process_section(self._topology, [], NM_PROPERTIES, location)
203+
190204
def warn_set_server_groups(self):
191205
# For issue in setServerGroups in online mode (new configured clusters and stand-alone managed servers
192206
# will not have extension template resources targeted)

0 commit comments

Comments
 (0)