- Notifications
You must be signed in to change notification settings - Fork 89
Wdt 476 timeouts #733
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
Wdt 476 timeouts #733
Changes from 6 commits
Commits
Show all changes
7 commits Select commit Hold shift + click to select a range
cdc7544 WDT timeout configuration
CarolynRountree 97ea8d3 Merge branch 'master' into WDT-476-timeouts
CarolynRountree d023127 Add configurable WDT timeouts
CarolynRountree 0065639 WDT timeout changes for suggestions
CarolynRountree 8def713 WDT timeout changes for suggestions
CarolynRountree cc2138e WDT timeout changes for suggestions
CarolynRountree 2734edd WDT timeout changes for suggestions
CarolynRountree File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| | @@ -227,7 +227,8 @@ def target_server_groups(self, server_assigns): | |
| server_name = self.wlst_helper.get_quoted_name_for_wlst(server) | ||
| self.logger.info('WLSDPLY-12224', str(server_groups), server_name, | ||
| class_name=self.__class_name, method_name=_method_name) | ||
| self.wlst_helper.set_server_groups(server_name, server_groups) | ||
| self.wlst_helper.set_server_groups(server_name, server_groups, | ||
| self.model_context.get_model_config().get_set_server_grps_timeout()) | ||
| There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. get_set_server_grps_timeout no method, s/b get_server_grps_timeout() ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ty. Done | ||
| | ||
| self.logger.exiting(class_name=self.__class_name, method_name=_method_name) | ||
| | ||
| | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,125 @@ | ||
| """ | ||
| Copyright (c) 2020, Oracle Corporation and/or its affiliates. | ||
| Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. | ||
| """ | ||
| | ||
| from java.io import IOException | ||
| from java.lang import Long | ||
| | ||
| from wlsdeploy.logging.platform_logger import PlatformLogger | ||
| from wlsdeploy.util import path_utils | ||
| from wlsdeploy.util import string_utils | ||
| | ||
| TOOL_PROPERTIES_FILE_NAME = 'tool.properties' | ||
| | ||
| _logger = PlatformLogger('wlsdeploy.config') | ||
| _class_name = 'ModelConfig' | ||
| | ||
| # Tool Properties for configuration and default values if properties not loaded | ||
| | ||
| # WLST TIMEOUT PROPERTIES | ||
| CONNECT_TIMEOUT_PROP = 'connect.timeout' | ||
| CONNECT_TIMEOUT_DEFAULT = '120000' | ||
| ACTIVATE_TIMEOUT_PROP = 'activate.timeout' | ||
| ACTIVATE_TIMEOUT_DEFAULT = '180000' | ||
| DEPLOY_TIMEOUT_PROP = 'deploy.timeout' | ||
| DEPLOY_TIMEOUT_DEFAULT = '180000' | ||
| REDEPLOY_TIMEOUT_PROP = 'redeploy.timeout' | ||
| REDEPLOY_TIMEOUT_DEFAULT = '180000' | ||
| UNDEPLOY_TIMEOUT_PROP = 'undeploy.timeout' | ||
| UNDEPLOY_TIMEOUT_DEFAULT = '180000' | ||
| START_APP_TIMEOUT_PROP = 'start.application.timeout' | ||
| START_APP_TIMEOUT_DEFAULT = '180000' | ||
| STOP_APP_TIMEOUT_PROP = 'stop.application.timeout' | ||
| STOP_APP_TIMEOUT_DEFAULT = '180000' | ||
| SET_SERVER_GRPS_TIMEOUT_PROP = 'set.server.groups.timeout' | ||
| SET_SERVER_GRPS_TIMEOUT_DEFAULT = '30000' | ||
| | ||
| | ||
| class ModelConfiguration(object): | ||
| """ | ||
| This class encapsulates the tool properties used in configuring and tuning | ||
| """ | ||
| | ||
| def __init__(self): | ||
| """ | ||
| Load the properties from the tools.properties file and save the resulting dictionary | ||
| :return: | ||
| """ | ||
| self.__config_dict = _load_properties_file() | ||
| | ||
| def get_connect_timeout(self): | ||
| """ | ||
| Return the connect timeout from tool properties. | ||
| :return: connect timeout | ||
| """ | ||
| return self._get_from_dict(CONNECT_TIMEOUT_PROP, CONNECT_TIMEOUT_DEFAULT) | ||
| | ||
| def get_activate_timeout(self): | ||
| """ | ||
| Return the activate timeout from tool properties. | ||
| :return: activate timeout | ||
| """ | ||
| return self._get_from_dict_as_long(ACTIVATE_TIMEOUT_PROP, ACTIVATE_TIMEOUT_DEFAULT) | ||
| | ||
| def get_deploy_timeout(self): | ||
| """ | ||
| Return the deploy timeout from tool properties. | ||
| :return: deploy timeout | ||
| """ | ||
| return self._get_from_dict_as_long(DEPLOY_TIMEOUT_PROP, DEPLOY_TIMEOUT_DEFAULT) | ||
| | ||
| def get_redeploy_timeout(self): | ||
| """ | ||
| Return the redeploy timeout from tool properties | ||
| :return: redeploy timeout | ||
| """ | ||
| return self._get_from_dict_as_long(REDEPLOY_TIMEOUT_PROP, REDEPLOY_TIMEOUT_DEFAULT) | ||
| | ||
| def get_undeploy_timeout(self): | ||
| """ | ||
| Return undeploy timeout from tool properties. | ||
| :return: undeploy timeout | ||
| """ | ||
| return self._get_from_dict_as_long(UNDEPLOY_TIMEOUT_PROP, UNDEPLOY_TIMEOUT_DEFAULT) | ||
| | ||
| def get_stop_app_timeout(self): | ||
| """ | ||
| Return stop application timeout from tool properties. | ||
| :return: stop application timeout | ||
| """ | ||
| return self._get_from_dict_as_long(STOP_APP_TIMEOUT_PROP, STOP_APP_TIMEOUT_DEFAULT) | ||
| | ||
| def get_start_app_timeout(self): | ||
| """ | ||
| Return start application timeout from tool properties. | ||
| :return: start application timeout | ||
| """ | ||
| return self._get_from_dict_as_long(START_APP_TIMEOUT_PROP, START_APP_TIMEOUT_DEFAULT) | ||
| | ||
| def _get_from_dict(self, name, default_value=None): | ||
| result = default_value | ||
| if name in self.__config_dict: | ||
| result = self.__config_dict[name] | ||
| return result | ||
| | ||
| def _get_from_dict_as_long(self, name, default_value=None): | ||
| return Long(self._get_from_dict(name, default_value)).longValue() | ||
| | ||
| | ||
| def _load_properties_file(): | ||
| """ | ||
| Load the properties from the WLSDEPLOY properties file into dictionary | ||
| :return: tool config properties in dict format | ||
| """ | ||
| _method_name = 'load_properties_file' | ||
| _logger.entering(class_name=_class_name, method_name=_method_name) | ||
| wlsdeploy_path = path_utils.find_config_path(TOOL_PROPERTIES_FILE_NAME) | ||
| result = None | ||
| try: | ||
| result = string_utils.load_properties(wlsdeploy_path) | ||
| except IOException, ioe: | ||
| _logger.warning('WLSDPLY-01651', wlsdeploy_path, ioe.getMessage(), | ||
| class_name=_class_name, method_name=_method_name) | ||
| _logger.exiting(class_name=_class_name, method_name=_method_name) | ||
| return result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.