You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2017/10/30 14:09:10 UTC
ambari git commit: AMBARI-22298. Refresh config tags at RECONFIGURE
command without explicitly setting forceRefreshConfigTags in request
(magyari_sandor)
Repository: ambari
Updated Branches:
refs/heads/trunk 0041ab254 -> 9d6ac96b5
AMBARI-22298. Refresh config tags at RECONFIGURE command without explicitly setting forceRefreshConfigTags in request (magyari_sandor)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9d6ac96b
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9d6ac96b
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9d6ac96b
Branch: refs/heads/trunk
Commit: 9d6ac96b5abf157ee813c6c6193650ac61a1590c
Parents: 0041ab2
Author: Sandor Magyari <sm...@hortonworks.com>
Authored: Fri Oct 20 10:19:55 2017 +0200
Committer: Sandor Magyari <sm...@hortonworks.com>
Committed: Mon Oct 30 15:08:54 2017 +0100
----------------------------------------------------------------------
ambari-agent/src/main/python/ambari_agent/ActionQueue.py | 5 ++++-
.../server/controller/AmbariCustomCommandExecutionHelper.java | 1 +
2 files changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6ac96b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
index 1eda5c2..f1b3a42 100644
--- a/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
+++ b/ambari-agent/src/main/python/ambari_agent/ActionQueue.py
@@ -67,6 +67,7 @@ class ActionQueue(threading.Thread):
ROLE_COMMAND_STOP = 'STOP'
ROLE_COMMAND_CUSTOM_COMMAND = 'CUSTOM_COMMAND'
CUSTOM_COMMAND_RESTART = 'RESTART'
+ CUSTOM_COMMAND_RECONFIGURE = 'RECONFIGURE'
CUSTOM_COMMAND_START = ROLE_COMMAND_START
IN_PROGRESS_STATUS = 'IN_PROGRESS'
@@ -427,7 +428,9 @@ class ActionQueue(threading.Thread):
(command['roleCommand'] == self.ROLE_COMMAND_INSTALL and component in LiveStatus.CLIENT_COMPONENTS) or
(command['roleCommand'] == self.ROLE_COMMAND_CUSTOM_COMMAND and
'custom_command' in command['hostLevelParams'] and
- command['hostLevelParams']['custom_command'] in (self.CUSTOM_COMMAND_RESTART, self.CUSTOM_COMMAND_START))):
+ command['hostLevelParams']['custom_command'] in (self.CUSTOM_COMMAND_RESTART,
+ self.CUSTOM_COMMAND_START,
+ self.CUSTOM_COMMAND_RECONFIGURE))):
configHandler.write_actual_component(command['role'],
command['configurationTags'])
if 'clientsToUpdateConfigs' in command['hostLevelParams'] and command['hostLevelParams']['clientsToUpdateConfigs']:
http://git-wip-us.apache.org/repos/asf/ambari/blob/9d6ac96b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
index 044e6ef..e8febbb 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java
@@ -514,6 +514,7 @@ public class AmbariCustomCommandExecutionHelper {
if (refreshConfigsCommand != null && !refreshConfigsCommand.equals(RefreshCommandConfiguration.REFRESH_CONFIGS)) {
LOG.info("Refreshing configs for {}/{} with command: ", componentName, hostName, refreshConfigsCommand);
commandParams.put("reconfigureAction", refreshConfigsCommand);
+ //execCmd.setForceRefreshConfigTagsBeforeExecution(true);
}
}