Skip to content

Dynamic Clusters FrontEndHost attribute needs to be populated before FrontEndHTTPPort #1194

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
Sep 13, 2022
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
1 change: 1 addition & 0 deletions core/src/main/python/wlsdeploy/aliases/model_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
FOREIGN_JNDI_PROVIDER_OVERRIDE = 'ForeignJndiProviderOverride'
FOREIGN_JNDI_PROVIDER_LINK = 'ForeignJNDILink'
FOREIGN_SERVER = 'ForeignServer'
FRONTEND_HOST = 'FrontendHost'
GROUP = 'Group'
GROUP_PARAMS = 'GroupParams'
GROUP_MEMBER_OF = 'GroupMemberOf'
Expand Down
1 change: 0 additions & 1 deletion core/src/main/python/wlsdeploy/tool/create/creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,6 @@ def _set_attribute(self, location, model_name, model_value, uses_path_tokens_nam
:raises: CreateException: if an error occurs
"""
_method_name = '_set_attribute'

if (model_name in uses_path_tokens_names) and (model_value is not None):
self._extract_archive_files(location, model_name, model_value)

Expand Down
10 changes: 10 additions & 0 deletions core/src/main/python/wlsdeploy/tool/create/domain_creator.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
from wlsdeploy.aliases.model_constants import DRIVER_PARAMS_TRUSTSTORE_PROPERTY
from wlsdeploy.aliases.model_constants import DRIVER_PARAMS_USER_PROPERTY
from wlsdeploy.aliases.model_constants import DRIVER_PARAMS_kEYSTORE_PROPERTY
from wlsdeploy.aliases.model_constants import FRONTEND_HOST
from wlsdeploy.aliases.model_constants import JDBC_DRIVER_PARAMS_PROPERTIES
from wlsdeploy.aliases.model_constants import JDBC_SYSTEM_RESOURCE
from wlsdeploy.aliases.model_constants import LISTEN_PORT
Expand Down Expand Up @@ -182,6 +183,15 @@ def create(self):

self.logger.exiting(class_name=self.__class_name, method_name=_method_name)

#Override
def _set_attributes(self, location, model_nodes):
model_type, model_name = self.aliases.get_model_type_and_name(location)
if model_type == CLUSTER:
if FRONTEND_HOST in model_nodes:
model_value = model_nodes[FRONTEND_HOST]
Creator._set_attribute(self, location, FRONTEND_HOST, model_value, list())
Creator._set_attributes(self, location, model_nodes)

# Override
def _create_named_mbeans(self, type_name, model_nodes, base_location, log_created=False, delete_now=True):
"""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
from wlsdeploy.aliases.model_constants import CDI_CONTAINER
from wlsdeploy.aliases.model_constants import CLUSTER
from wlsdeploy.aliases.model_constants import CREATE_ONLY_DOMAIN_ATTRIBUTES
from wlsdeploy.aliases.model_constants import FRONTEND_HOST
from wlsdeploy.aliases.model_constants import MACHINE
from wlsdeploy.aliases.model_constants import MIGRATABLE_TARGET
from wlsdeploy.aliases.model_constants import SECURITY
Expand Down Expand Up @@ -47,6 +48,14 @@ def __init__(self, model, model_context, aliases, wlst_mode=WlstModes.OFFLINE):

self.target_helper = TargetHelper(self.model, self.model_context, self.aliases, self._exception_type,
self.logger)
#Override
def set_attributes(self, location, model_nodes, excludes=None):
model_type, model_name = self.aliases.get_model_type_and_name(location)
if model_type == CLUSTER:
if FRONTEND_HOST in model_nodes:
model_value = model_nodes[FRONTEND_HOST]
self.attribute_setter.set_attribute(location, FRONTEND_HOST, model_value, None)
Deployer.set_attributes(self, location, model_nodes, excludes)

# Override
def _add_named_elements(self, type_name, model_nodes, location, delete_now=True):
Expand Down
8 changes: 8 additions & 0 deletions core/src/main/python/wlsdeploy/tool/util/topology_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ def create_placeholder_servers_in_cluster(self, topology):
self.create_placeholder_named_elements(LocationContext(), SERVER, topology)
self.logger.exiting(class_name=self.__class_name, method_name=_method_name)

def create_placeholder_clusters(self, topology):
"""
Create a placeholder cluster for each name in the topology.
This is necessary because there is a circular dependency between certain attributes.
:param topology: the topology model nodes
"""
self.create_placeholder_named_elements(LocationContext(), CLUSTER, topology)

def create_placeholder_server_templates(self, topology):
"""
Create a placeholder server template for each name in the topology.
Expand Down