Skip to content

fixing discovery warnings when discovering a soa domain #1437

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 6 commits into from
Mar 31, 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
9 changes: 9 additions & 0 deletions core/src/main/python/wlsdeploy/aliases/alias_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from wlsdeploy.aliases.alias_constants import ChildFoldersTypes
from wlsdeploy.aliases.alias_constants import STRING
from wlsdeploy.aliases.model_constants import MODEL_LIST_DELIMITER
from wlsdeploy.aliases.wlst_modes import WlstModes
from wlsdeploy.exception import exception_helper
from wlsdeploy.logging.platform_logger import PlatformLogger

Expand Down Expand Up @@ -61,6 +62,12 @@
_logger = PlatformLogger('wlsdeploy.aliases')
_windows_path_regex = re.compile(r'^[a-zA-Z]:[\\/].*')

# WARNING: DO NOT USE OUTSIDE OF THIS FILE!
#
# This variable gets set when the Aliases object is created so it will not be accurate
# unless/until the Aliases constructor completes successfully.
#
_wlst_mode = WlstModes.OFFLINE

def merge_model_and_existing_lists(model_list, existing_list, location_path="(unknown)", attribute_name="(unknown)"):
"""
Expand Down Expand Up @@ -428,6 +435,8 @@ def replace_tokens_in_path(location, path):
new_path = path
if name_tokens:
for key, value in name_tokens.iteritems():
if '/' in value and _wlst_mode == WlstModes.OFFLINE:
value = '(%s)' % value
new_path = new_path.replace('%s%s%s' % ('%', key, '%'), value)

missing_name_token = get_missing_name_tokens(new_path)
Expand Down
1 change: 1 addition & 0 deletions core/src/main/python/wlsdeploy/aliases/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ def __init__(self, model_context, wlst_mode=WlstModes.OFFLINE, wls_version=None,
self._alias_entries = AliasEntries(wlst_mode, self._wls_version)
self._production_mode_enabled = False
self._secure_mode_enabled = False
alias_utils._wlst_mode = wlst_mode

def set_production_mode(self, production_mode_enabled):
_method_name = 'set_production_mode'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def __add_shared_libraries(self):
shared_library_token = self.aliases.get_name_token(shared_library_location)

for shared_library_name in shared_libraries:
self.wlst_helper.cd(root_path) # avoid cd to pwd that may contain slashed names
existing_shared_libraries = deployer_utils.get_existing_object_list(shared_library_location, self.aliases)

if model_helper.is_delete_name(shared_library_name):
Expand Down Expand Up @@ -133,8 +134,8 @@ def __add_shared_libraries(self):

library_name = \
self.version_helper.get_library_versioned_name(shlib_source_path, shared_library_name)
quoted_library_name = self.wlst_helper.get_quoted_name_for_wlst(library_name)
shared_library_location.add_name_token(shared_library_token, quoted_library_name)
# names are quoted/escaped later, when paths are resolved
shared_library_location.add_name_token(shared_library_token, library_name)

self.wlst_helper.cd(root_path)
deployer_utils.create_and_cd(shared_library_location, existing_shared_libraries, self.aliases)
Expand Down Expand Up @@ -184,6 +185,7 @@ def __add_applications(self):
application_token = self.aliases.get_name_token(application_location)

for application_name in applications:
self.wlst_helper.cd(root_path) # avoid cd to pwd that may contain slashed names
existing_applications = deployer_utils.get_existing_object_list(application_location, self.aliases)

if model_helper.is_delete_name(application_name):
Expand Down Expand Up @@ -211,9 +213,8 @@ def __add_applications(self):
self.version_helper.get_application_versioned_name(app_source_path, application_name,
module_type=module_type)

quoted_application_name = self.wlst_helper.get_quoted_name_for_wlst(application_name)

application_location.add_name_token(application_token, quoted_application_name)
# names are quoted/escaped later, when paths are resolved
application_location.add_name_token(application_token, application_name)

self.wlst_helper.cd(root_path)
deployer_utils.create_and_cd(application_location, existing_applications, self.aliases)
Expand Down
8 changes: 8 additions & 0 deletions documentation/3.0/content/userguide/tools/deploy.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@ When running the tool in WLST online mode, the deploy operation may require serv
- `103` - The entire domain needs to be restarted.
- `104` - The domain changes have been canceled because the changes in the model requires a domain restart and `-cancel_changes_if_restart_required` is specified.


### Using output files

If the `-output_dir` command-line argument is specified, the tool will generate output files that provide information about servers and resources that need to be restarted. These files are only applicable for online deployments.

For more information about these files, see [Using output files]({{< relref "/userguide/tools/update#using-output-files" >}}) for the Update Domain Tool.


### Using an encrypted model

If the model or variables file contains passwords encrypted with the WDT Encryption tool, decrypt the passwords during create with the `-use_encryption` flag on the command line to tell the Deploy Applications Tool that encryption is being used and to prompt for the encryption passphrase. As with the database passwords, the tool can also read the passphrase from standard input (for example, `stdin`) to allow the tool to run without any user input. You can bypass the stdin prompt with two other options. Store the passphrase in an environment variable, and use the environment variable name with command-line option `-passphrase_env`. Another option is to create a file containing the passphrase value. Pass this filename using the command-line option `-passphrase_file`.
Expand Down
61 changes: 61 additions & 0 deletions documentation/3.0/content/userguide/tools/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,67 @@ When running the tool in WLST online mode, the update operation may require serv
WebLogic Server to handle automating undeploy and deploy of an application that uses shared library when the library is
updated in-place.

### Using output files

If the `-output_dir` command-line argument is specified, the tool will generate output files that provide information about servers and resources that need to be restarted. These files are only applicable for online deployments.

The file `restart.file` contains a list of servers and resources that need to be restarted. Here is an example:
```text
:AdminServer:Generic1:JDBCSystemResource
:AdminServer::
```

The file `non_dynamic_changes.file` contains text describing the attributes that will require a restart in order for new values to be applied. Here is an example:
```text
Server re-start is REQUIRED for the set of changes in progress.

The following non-dynamic attribute(s) have been changed on MBeans
that require server re-start:
MBean Changed : com.bea:Name=AdminServer,Type=Log,Server=AdminServer
Attributes changed : RedirectStderrToServerLogEnabled, RedirectStdoutToServerLogEnabled

MBean Changed : com.bea:Name=MailSession-0,Type=MailSession
Attributes changed : SessionPasswordEncrypted
```

The file `results.json` contains information about servers and resources need to be restarted, and attribute values that require a restart in order for new values to be applied.
```json
{
"nonDynamicChanges" : {
"com.bea:Name=MailSession-0,Type=MailSession" : [
"SessionPasswordEncrypted"
],
"com.bea:Name=AdminServer,Type=Log,Server=AdminServer" : [
"RedirectStderrToServerLogEnabled",
"RedirectStdoutToServerLogEnabled"
]
},
"nonDynamicChangesText" : [
"",
"Server re-start is REQUIRED for the set of changes in progress.",
"",
"The following non-dynamic attribute(s) have been changed on MBeans",
"that require server re-start:",
"MBean Changed : com.bea:Name=AdminServer,Type=Log,Server=AdminServer",
"Attributes changed : RedirectStderrToServerLogEnabled, RedirectStdoutToServerLogEnabled",
"",
"MBean Changed : com.bea:Name=MailSession-0,Type=MailSession",
"Attributes changed : SessionPasswordEncrypted",
""
],
"restarts" : [
{
"server" : "AdminServer",
"resourceName" : "Generic1",
"resourceType" : "JDBCSystemResource"
},
{
"server" : "AdminServer"
}
]
}
```

### Using an encrypted model

If the model or variables file contains passwords encrypted with the WDT Encryption tool, decrypt the passwords during create with the `-use_encryption` flag on the command line to tell the Update Domain Tool that encryption is being used and to prompt for the encryption passphrase. As with the database passwords, the tool can also read the passphrase from standard input (for example, `stdin`) to allow the tool to run without any user input. You can bypass the stdin prompt with two other options. Store the passphrase in an environment variable, and use the environment variable name with command-line option `-passphrase_env`. Another option is to create a file containing the passphrase value. Pass this filename with the command-line option `-passphrase_file`.
Expand Down