Skip to content

fixing online discovery for domains with dynamic clusters #1392

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 45 additions & 36 deletions core/src/main/python/wlsdeploy/tool/discover/topology_discoverer.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,59 +69,68 @@ def discover(self):

_logger.info('WLSDPLY-06600', class_name=_class_name, method_name=_method_name)

self.discover_domain_parameters()
current_tree = None
if self._wlst_mode == WlstModes.ONLINE:
current_tree = self._wlst_helper.current_tree()
self._wlst_helper.edit()

model_top_folder_name, clusters = self.get_clusters()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, clusters)
try:
self.discover_domain_parameters()

model_top_folder_name, servers = self.get_servers()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, servers)
model_top_folder_name, clusters = self.get_clusters()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, clusters)

model_top_folder_name, migratable_targets = self.get_migratable_targets()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, migratable_targets)
model_top_folder_name, servers = self.get_servers()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, servers)

model_top_folder_name, templates = self.get_server_templates()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, templates)
model_top_folder_name, migratable_targets = self.get_migratable_targets()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, migratable_targets)

model_top_folder_name, unix_machines = self.get_unix_machines()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, unix_machines)
model_top_folder_name, templates = self.get_server_templates()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, templates)

model_top_folder_name, machines = self.get_machines(unix_machines)
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, machines)
model_top_folder_name, unix_machines = self.get_unix_machines()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, unix_machines)

# make sure this is after discovery of machines / node managers as we will do some massaging
model_top_folder_name, security_configuration = self.discover_security_configuration()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, security_configuration)
model_top_folder_name, machines = self.get_machines(unix_machines)
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, machines)

model_top_folder_name, embedded_ldap_configuration = self.get_embedded_ldap_configuration()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, embedded_ldap_configuration)
# make sure this is after discovery of machines / node managers as we will do some massaging
model_top_folder_name, security_configuration = self.discover_security_configuration()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, security_configuration)

model_folder_name, folder_result = self._get_log_filters()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_top_folder_name, embedded_ldap_configuration = self.get_embedded_ldap_configuration()
discoverer.add_to_model_if_not_empty(self._dictionary, model_top_folder_name, embedded_ldap_configuration)

model_folder_name, folder_result = self._get_reliable_delivery_policies()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self._get_log_filters()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self._get_virtual_hosts()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self._get_reliable_delivery_policies()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self._get_xml_entity_caches()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self._get_virtual_hosts()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self._get_xml_registries()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self._get_xml_entity_caches()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self.get_managed_executor_template()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self._get_xml_registries()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self.get_managed_thread_factory_template()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self.get_managed_executor_template()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self.get_managed_scheduled_executor_service()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self.get_managed_thread_factory_template()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self._get_ws_securities()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
model_folder_name, folder_result = self.get_managed_scheduled_executor_service()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)

model_folder_name, folder_result = self._get_ws_securities()
discoverer.add_to_model_if_not_empty(self._dictionary, model_folder_name, folder_result)
finally:
if current_tree is not None:
current_tree()

_logger.exiting(class_name=_class_name, method_name=_method_name)
return self._dictionary
Expand Down
19 changes: 19 additions & 0 deletions core/src/main/python/wlsdeploy/tool/util/wlst_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1344,6 +1344,25 @@ def have_unsaved_changes(self, cmgr):
result=StringUtils.stringForBoolean(unsaved))
return unsaved

def current_tree(self):
"""
Get the current MBean tree.
:raises Exception for the specified tool type: if a WLST error occurs
"""
_method_name = 'current_tree'
self.__logger.entering(class_name=self.__class_name, method_name=_method_name)

current_tree = None;
try:
current_tree = self.__load_global('currentTree')()
except self.__load_global('WLSTException'), e:
pwe = exception_helper.create_exception(self.__exception_type, 'WLSDPLY-00130',
_format_exception(e), error=e)
self.__logger.throwing(class_name=self.__class_name, method_name=_method_name, error=pwe)
raise pwe
self.__logger.exiting(class_name=self.__class_name, method_name=_method_name)
return current_tree

def server_config(self):
"""
Change to the serverConfig MBean tree.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ WLSDPLY-00126=Exiting is_set({0}) method
WLSDPLY-00127=Unable to load the DomainRuntimeService from the WLST globals : {0}
WLSDPLY-00128=setTopologyProfile({0}) failed: {1}
WLSDPLY-00129=Error calling isSet() for attribute {0} at location {1}: {2}
WLSDPLY-00130=Failed to get the current MBean tree: {0}

###############################################################################
# Util messages (1000 - 3999) #
Expand Down Expand Up @@ -1772,7 +1773,7 @@ WLSDPLY-20203={0} entries "{1}" and "{2}" in {3} "{4}" have different {5} values
# Common messages used for tool exit and clean-up
WLSDPLY-21000={0} Messages:
WLSDPLY-21001= {0} total : {1}
WLSDPLY-21002= Total: {0}
WLSDPLY-21002=Total: {0}
WLSDPLY-21003=Issue Log for {0} version {1} running WebLogic version {2} {3} mode:

# RCUDbinfo
Expand Down