You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by dm...@apache.org on 2017/02/10 13:23:03 UTC

[1/3] ambari git commit: AMBARI-19768. Broken kill_process_with_children shell single liner (dlysnichenko)

Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 0593c8792 -> 6b50e2b96
  refs/heads/trunk 59545f7fd -> fc9788af1


AMBARI-19768. Broken kill_process_with_children shell single liner (dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/41034aa1
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/41034aa1
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/41034aa1

Branch: refs/heads/trunk
Commit: 41034aa157cc7b36f1635064055b83deb5f542bc
Parents: 59545f7
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Fri Feb 10 15:15:20 2017 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Fri Feb 10 15:15:20 2017 +0200

----------------------------------------------------------------------
 .../python/ambari_agent/TestProcessUtils.py     | 224 +++++++++++++++++++
 .../src/test/python/ambari_agent/TestShell.py   |   5 +-
 .../main/python/ambari_commons/process_utils.py | 100 +++++++++
 .../src/main/python/ambari_commons/shell.py     |  54 ++---
 4 files changed, 346 insertions(+), 37 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/41034aa1/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py b/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py
new file mode 100644
index 0000000..8331910
--- /dev/null
+++ b/ambari-agent/src/test/python/ambari_agent/TestProcessUtils.py
@@ -0,0 +1,224 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+
+from ambari_agent import main
+
+main.MEMORY_LEAK_DEBUG_FILEPATH = "/tmp/memory_leak_debug.out"
+import unittest
+import signal
+import subprocess, time
+from mock.mock import patch, MagicMock, PropertyMock, call
+from ambari_commons import process_utils
+
+process_tree = {"111": "222\n 22",
+                "222": "333\n 33",
+                "22": "44\n 444",}
+
+
+class TestProcessUtils(unittest.TestCase):
+  @patch("subprocess.Popen")
+  def test_kill(self, popen_mock):
+    process_mock = MagicMock()
+    process_mock.communicate.return_value = (None, None)
+    returncode_mock = PropertyMock()
+    returncode_mock.return_value = 0
+    type(process_mock).returncode = returncode_mock
+    popen_mock.return_value = process_mock
+    process_utils.kill_pids(["12321113230", "2312415453"], signal.SIGTERM)
+    expected = [call(['kill', '-15', '12321113230', '2312415453'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("subprocess.Popen")
+  def test_get_children(self, popen_mock):
+
+    process_mock = MagicMock()
+    process_mock.communicate.return_value = ("123 \n \n 321\n", None)
+    popen_mock.return_value = process_mock
+    returncode_mock = PropertyMock()
+    returncode_mock.return_value = 0
+    type(process_mock).returncode = returncode_mock
+    result = process_utils.get_children("2312415453")
+
+    self.assertEquals(result, ["123", "321"])
+
+    expected = [
+      call(['ps', '-o', 'pid', '--no-headers', '--ppid', '2312415453'], stderr=subprocess.PIPE, stdout=subprocess.PIPE)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("subprocess.Popen")
+  def test_get_flat_process_tree(self, popen_mock):
+    def side_effect(*args, **kwargs):
+      process_mock = MagicMock()
+      returncode_mock = PropertyMock()
+      returncode_mock.return_value = 0
+      type(process_mock).returncode = returncode_mock
+      if args[0][5] in process_tree.keys():
+        process_mock.communicate.return_value = (process_tree[args[0][5]], None)
+      else:
+        process_mock.communicate.return_value = ("", None)
+      return process_mock
+
+    popen_mock.side_effect = side_effect
+    result = process_utils.get_flat_process_tree("111")
+    self.assertEquals(result, ['111', '222', '333', '33', '22', '44', '444'])
+
+    expected = [call(['ps', '-o', 'pid', '--no-headers', '--ppid', '111'], stderr=-1, stdout=-1),
+                call(['ps', '-o', 'pid', '--no-headers', '--ppid', '222'], stderr=-1, stdout=-1),
+                call(['ps', '-o', 'pid', '--no-headers', '--ppid', '333'], stderr=-1, stdout=-1),
+                call(['ps', '-o', 'pid', '--no-headers', '--ppid', '33'], stderr=-1, stdout=-1),
+                call(['ps', '-o', 'pid', '--no-headers', '--ppid', '22'], stderr=-1, stdout=-1),
+                call(['ps', '-o', 'pid', '--no-headers', '--ppid', '44'], stderr=-1, stdout=-1),
+                call(['ps', '-o', 'pid', '--no-headers', '--ppid', '444'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("subprocess.Popen")
+  def test_get_command_by_pid(self, popen_mock):
+
+    process_mock = MagicMock()
+    process_mock.communicate.return_value = ("yum something", None)
+    returncode_mock = PropertyMock()
+    returncode_mock.return_value = 0
+    type(process_mock).returncode = returncode_mock
+    popen_mock.return_value = process_mock
+
+    result = process_utils.get_command_by_pid("2312415453")
+
+    self.assertEquals(result, "yum something")
+
+    expected = [call(['ps', '-p', '2312415453', '-o', 'command', '--no-headers'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("subprocess.Popen")
+  def test_get_command_by_pid_not_exist(self, popen_mock):
+
+    process_mock = MagicMock()
+    process_mock.communicate.return_value = ("", None)
+    returncode_mock = PropertyMock()
+    returncode_mock.return_value = 1
+    type(process_mock).returncode = returncode_mock
+    popen_mock.return_value = process_mock
+
+    result = process_utils.get_command_by_pid("2312415453")
+
+    self.assertEquals(result, "NOT_FOUND[2312415453]")
+
+    expected = [call(['ps', '-p', '2312415453', '-o', 'command', '--no-headers'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("subprocess.Popen")
+  def test_is_process_running(self, popen_mock):
+
+    process_mock = MagicMock()
+    process_mock.communicate.return_value = ("2312415453", None)
+    returncode_mock = PropertyMock()
+    returncode_mock.return_value = 0
+    type(process_mock).returncode = returncode_mock
+    popen_mock.return_value = process_mock
+
+    result = process_utils.is_process_running("2312415453")
+
+    self.assertEquals(result, True)
+
+    expected = [call(['ps', '-p', '2312415453', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("subprocess.Popen")
+  def test_is_process_not_running(self, popen_mock):
+
+    process_mock = MagicMock()
+    process_mock.communicate.return_value = ("", None)
+    returncode_mock = PropertyMock()
+    returncode_mock.return_value = 1
+    type(process_mock).returncode = returncode_mock
+    popen_mock.return_value = process_mock
+
+    result = process_utils.is_process_running("2312415453")
+
+    self.assertEquals(result, False)
+
+    expected = [call(['ps', '-p', '2312415453', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("subprocess.Popen")
+  def test_get_processes_running(self, popen_mock):
+    def side_effect(*args, **kwargs):
+      process_mock = MagicMock()
+      returncode_mock = PropertyMock()
+      if args[0][2] == "4321":
+        returncode_mock.return_value = 0
+        process_mock.communicate.return_value = ("4321", None)
+      else:
+        returncode_mock.return_value = 1
+        process_mock.communicate.return_value = (None, None)
+      type(process_mock).returncode = returncode_mock
+      return process_mock
+
+    popen_mock.side_effect = side_effect
+
+    result = process_utils.get_processes_running(["1234", "4321"])
+
+    self.assertEquals(result, ["4321"])
+
+    expected = [call(['ps', '-p', '1234', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1),
+                call(['ps', '-p', '4321', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+
+  @patch("time.sleep")
+  @patch("subprocess.Popen")
+  def test_wait_for_process_death(self, popen_mock, sleep_mock):
+
+    process_mock = MagicMock()
+    process_mock.communicate.side_effect = [("4321", None),("4321", None),(None, None)]
+    returncode_mock = PropertyMock()
+    returncode_mock.side_effect = [0, 0, 1]
+    type(process_mock).returncode = returncode_mock
+    popen_mock.return_value = process_mock
+
+    process_utils.wait_for_process_death("4321")
+
+    expected = [call(['ps', '-p', '4321', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1),
+                call(['ps', '-p', '4321', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1),
+                call(['ps', '-p', '4321', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+    expected = [call(0.1), call(0.1)]
+    self.assertEquals(sleep_mock.call_args_list, expected)
+
+  @patch("time.sleep")
+  @patch("subprocess.Popen")
+  def test_wait_for_entire_process_tree_death(self, popen_mock, sleep_mock):
+
+    process_mock = MagicMock()
+    process_mock.communicate.side_effect = [("1234", None), (None, None), ("4321", None), ("4321", None), (None, None)]
+    returncode_mock = PropertyMock()
+    returncode_mock.side_effect = [0, 1, 0, 0, 1]
+    type(process_mock).returncode = returncode_mock
+    popen_mock.return_value = process_mock
+
+    process_utils.wait_for_entire_process_tree_death(["1234", "4321"])
+
+    expected = [call(['ps', '-p', '1234', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1),
+                call(['ps', '-p', '1234', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1),
+                call(['ps', '-p', '4321', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1),
+                call(['ps', '-p', '4321', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1),
+                call(['ps', '-p', '4321', '-o', 'pid', '--no-headers'], stderr=-1, stdout=-1)]
+    self.assertEquals(popen_mock.call_args_list, expected)
+    expected = [call(0.1), call(0.1), call(0.1)]
+    self.assertEquals(sleep_mock.call_args_list, expected)

http://git-wip-us.apache.org/repos/asf/ambari/blob/41034aa1/ambari-agent/src/test/python/ambari_agent/TestShell.py
----------------------------------------------------------------------
diff --git a/ambari-agent/src/test/python/ambari_agent/TestShell.py b/ambari-agent/src/test/python/ambari_agent/TestShell.py
index 8d375e3..5dc1899 100644
--- a/ambari-agent/src/test/python/ambari_agent/TestShell.py
+++ b/ambari-agent/src/test/python/ambari_agent/TestShell.py
@@ -57,9 +57,7 @@ class TestShell(unittest.TestCase):
 
   def test_kill_process_with_children(self):
     if _platform == "linux" or _platform == "linux2": # Test is Linux-specific
-      gracefull_kill_delay_old = shell.gracefull_kill_delay
-      shell.gracefull_kill_delay = 0.1
-      sleep_cmd = "sleep 314159265"
+      sleep_cmd = "sleep 314"
       test_cmd = """ (({0}) & ({0} & {0})) """.format(sleep_cmd)
       # Starting process tree (multiple process groups)
       test_process = subprocess.Popen(test_cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
@@ -76,7 +74,6 @@ class TestShell(unittest.TestCase):
       ps_process = subprocess.Popen(ps_cmd, stderr=subprocess.PIPE, stdout=subprocess.PIPE, shell=True)
       (out, err) = ps_process.communicate()
       self.assertFalse(sleep_cmd in out)
-      shell.gracefull_kill_delay = gracefull_kill_delay_old
     else:
       # Do not run under other systems
       pass

http://git-wip-us.apache.org/repos/asf/ambari/blob/41034aa1/ambari-common/src/main/python/ambari_commons/process_utils.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/process_utils.py b/ambari-common/src/main/python/ambari_commons/process_utils.py
new file mode 100644
index 0000000..50ffd02
--- /dev/null
+++ b/ambari-common/src/main/python/ambari_commons/process_utils.py
@@ -0,0 +1,100 @@
+# !/usr/bin/env python
+
+'''
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+'''
+
+import subprocess
+import time
+
+check_time_delay = 0.1  # seconds between checks of process killed
+
+
+def get_children(pid):
+  PSCMD = ["ps", "-o", "pid", "--no-headers", "--ppid", str(pid)]
+  ps_process = subprocess.Popen(PSCMD, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+  stdout, stderr = ps_process.communicate()
+  if ps_process.returncode != 0:
+    return []
+  return stdout.split()
+
+
+def get_flat_process_tree(pid):
+  """
+  :param pid: process id of parent process
+  :return: list of child process pids. Resulting list also includes parent pid
+  """
+  res = [str(pid)]
+  children = get_children(pid)
+  for child in children:
+    res += get_flat_process_tree(child)
+  return res
+
+
+def kill_pids(pids, signal):
+  from resource_management.core.exceptions import Fail
+  CMD = ["kill", "-" + str(signal)]
+  CMD.extend(pids)
+  process = subprocess.Popen(CMD, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+  stdout, stderr = process.communicate()
+  if process.returncode != 0:
+    raise Fail("Unable to kill PIDs {0} : {1}".format(str(pids),stderr))
+
+
+def get_command_by_pid(pid):
+  CMD = ["ps", "-p", str(pid), "-o", "command", "--no-headers"]
+  process = subprocess.Popen(CMD, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+  stdout, stderr = process.communicate()
+  if process.returncode != 0:
+    return "NOT_FOUND[%s]" % pid
+  return stdout
+
+
+def wait_for_entire_process_tree_death(pids):
+  for child in pids:
+    wait_for_process_death(child)
+
+
+def wait_for_process_death(pid, timeout=5):
+  start = time.time()
+  current_time = start
+  while is_process_running(pid) and current_time < start + timeout:
+    time.sleep(check_time_delay)
+    current_time = time.time()
+
+
+def is_process_running(pid):
+  CMD = ["ps", "-p", str(pid), "-o", "pid", "--no-headers"]
+  process = subprocess.Popen(CMD, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+  stdout, stderr = process.communicate()
+  if process.returncode != 0:
+    return False
+  return pid in stdout
+
+
+
+def get_processes_running(process_pids):
+  """
+  Checks what processes are still running
+  :param process_pids: list of process pids
+  :return: list of pids for processes that are still running
+  """
+  result = []
+  for pid in process_pids:
+    if is_process_running(pid):
+      result.append(pid)
+  return result

http://git-wip-us.apache.org/repos/asf/ambari/blob/41034aa1/ambari-common/src/main/python/ambari_commons/shell.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/shell.py b/ambari-common/src/main/python/ambari_commons/shell.py
index 8d26599..a4c91fb 100644
--- a/ambari-common/src/main/python/ambari_commons/shell.py
+++ b/ambari-common/src/main/python/ambari_commons/shell.py
@@ -19,25 +19,20 @@ limitations under the License.
 '''
 
 import logging
-import subprocess
 import os
-import tempfile
 import signal
-import sys
+import subprocess
 import threading
-import time
-import traceback
-import pprint
-import platform
 
 from ambari_commons import OSConst
 from ambari_commons.os_family_impl import OsFamilyImpl, OsFamilyFuncImpl
+from ambari_commons.process_utils import get_flat_process_tree, kill_pids, wait_for_entire_process_tree_death, \
+  get_processes_running, get_command_by_pid
 
 logger = logging.getLogger()
 
 shellRunner = None
 threadLocal = threading.local()
-gracefull_kill_delay = 5  # seconds between SIGTERM and SIGKILL
 
 tempFiles = []
 
@@ -106,38 +101,31 @@ class shellRunnerWindows(shellRunner):
 #linux specific code
 @OsFamilyFuncImpl(os_family=OsFamilyImpl.DEFAULT)
 def kill_process_with_children(parent_pid):
-  def kill_tree_function(pid, signal):
-    '''
-    Kills process tree starting from a given pid.
-    '''
-    # The command below starts 'ps' linux utility and then parses it's
-    # output using 'awk'. AWK recursively extracts PIDs of all children of
-    # a given PID and then passes list of "kill -<SIGNAL> PID" commands to 'sh'
-    # shell.
-    CMD = """ps xf | awk -v PID=""" + str(pid) + \
-          """ ' $1 == PID { P = $1; next } P && /_/ { P = P " " $1;""" + \
-          """K=P } P && !/_/ { P="" }  END { print "kill -""" \
-          + str(signal) + """ "K }' | sh """
-    process = subprocess.Popen(CMD, stdout=subprocess.PIPE,
-                               stderr=subprocess.PIPE, shell=True)
-    process.communicate()
-
-  _run_kill_function(kill_tree_function, parent_pid)
-
-
-def _run_kill_function(kill_function, pid):
+  """
+  Kills process tree starting from a given pid.
+  :param parent_pid: head of tree
+  :param graceful_kill_delays: map <command name, custom delay between SIGTERM and SIGKILL>
+  :return:
+  """
+
+  pids = get_flat_process_tree(parent_pid)
   try:
-    kill_function(pid, signal.SIGTERM)
+    kill_pids(pids, signal.SIGTERM)
   except Exception, e:
-    logger.warn("Failed to kill PID %d" % (pid))
+    logger.warn("Failed to kill PID %d" % parent_pid)
     logger.warn("Reported error: " + repr(e))
 
-  time.sleep(gracefull_kill_delay)
+  wait_for_entire_process_tree_death(pids)
 
   try:
-    kill_function(pid, signal.SIGKILL)
+    running_processes = get_processes_running(pids)
+    if running_processes:
+      process_names = map(lambda x: get_command_by_pid(x),  running_processes)
+      logger.warn("These PIDs %s did not die after SIGTERM, sending SIGKILL. Exact commands to be killed:\n %s" %
+                  (", ".join(running_processes), "\n".join(process_names)))
+      kill_pids(running_processes, signal.SIGKILL)
   except Exception, e:
-    logger.error("Failed to send SIGKILL to PID %d. Process exited?" % (pid))
+    logger.error("Failed to send SIGKILL to PID %d. Process exited?" % parent_pid)
     logger.error("Reported error: " + repr(e))
 
 


[2/3] ambari git commit: AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnichenko)

Posted by dm...@apache.org.
AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fc9788af
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fc9788af
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fc9788af

Branch: refs/heads/trunk
Commit: fc9788af1d5c9533de5961e5bc97cf46b2a98b44
Parents: 41034aa
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Fri Feb 10 15:16:53 2017 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Fri Feb 10 15:16:53 2017 +0200

----------------------------------------------------------------------
 .../main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml | 7 +++++++
 .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml        | 6 ++++++
 .../main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml    | 1 +
 .../main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml | 7 +++++++
 .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml        | 7 +++++++
 .../main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml    | 1 +
 .../main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml | 7 +++++++
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml        | 7 +++++++
 .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml    | 1 +
 9 files changed, 44 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
index eac318e..478f9b4 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
@@ -511,6 +511,13 @@
             <type>yarn-env</type>
             <insert key="content" value="{% if rm_security_opts is defined %} YARN_OPTS=&quot;{{rm_security_opts}} $YARN_OPTS&quot; {% endif %}" insert-type="append" newline-before="true" newline-after="true" />
           </definition>
+          <definition xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+            <type>yarn-site</type>
+            <transfer operation="copy"
+                      from-key="yarn.resourcemanager.scheduler.monitor.enable"
+                      to-key="yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled"
+                      default-value="false"/>
+          </definition>
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
index 8da11ff..0d4e3b8 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
@@ -319,6 +319,12 @@
         </task>
       </execute-stage>
 
+      <execute-stage service="YARN" component="RESOURCEMANAGER" title="Apply config changes for Resource Manager">
+        <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <summary>Updating underutilized_preemption setting</summary>
+        </task>
+      </execute-stage>
+
       <execute-stage service="MAPREDUCE2" component="MAPREDUCE2_CLIENT" title="Apply config changes for Mapreduce2 client">
         <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath">
           <summary>Verifying LZO codec path for mapreduce</summary>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
index 01fc102..58db4a9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
@@ -762,6 +762,7 @@
           <task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_yarn_audit_db" />
           <task xsi:type="configure" id="yarn_log4j_parameterize" />
           <task xsi:type="configure" id="yarn_env_security_opts" />
+          <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption" />
         </pre-upgrade>
         <pre-downgrade /> <!--  no-op to prevent config changes on downgrade -->
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
index cc50ac5..18f5fa1 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
@@ -297,6 +297,13 @@
             <type>yarn-env</type>
             <insert key="content" value="{% if rm_security_opts is defined %} YARN_OPTS=&quot;{{rm_security_opts}} $YARN_OPTS&quot; {% endif %}" insert-type="append" newline-before="true" newline-after="true" />
           </definition>
+          <definition xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+            <type>yarn-site</type>
+            <transfer operation="copy"
+                      from-key="yarn.resourcemanager.scheduler.monitor.enable"
+                      to-key="yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled"
+                      default-value="false"/>
+          </definition>
         </changes>
       </component>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
index 046904b..eedf98c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
@@ -293,6 +293,13 @@
         <task xsi:type="configure" id="hdp_2_5_0_0_add_spark2_yarn_shuffle"/>
       </execute-stage>
 
+      <!--Yarn-->
+      <execute-stage service="YARN" component="RESOURCEMANAGER" title="Apply config changes for Resource Manager">
+        <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <summary>Updating underutilized_preemption setting</summary>
+        </task>
+      </execute-stage>
+
       <!--TEZ-->
       <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez">
         <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath">

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
index 70bb2ca..392e0fa 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
@@ -767,6 +767,7 @@
           <task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_yarn_audit_db" />
           <task xsi:type="configure" id="yarn_log4j_parameterize" />
           <task xsi:type="configure" id="yarn_env_security_opts" />
+          <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption" />
         </pre-upgrade>
         <pre-downgrade /> <!--  no-op to prevent config changes on downgrade -->
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index a5bfcf6..100df8f 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -139,6 +139,13 @@
           <type>yarn-env</type>
           <insert key="content" value="{% if rm_security_opts is defined %} YARN_OPTS=&quot;{{rm_security_opts}} $YARN_OPTS&quot; {% endif %}" insert-type="append" newline-before="true" newline-after="true" />
         </definition>
+        <definition xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <type>yarn-site</type>
+          <transfer operation="copy"
+                    from-key="yarn.resourcemanager.scheduler.monitor.enable"
+                    to-key="yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled"
+                    default-value="false"/>
+        </definition>
       </changes>
     </component>
   </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index 5b8351b..6e92141 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -298,6 +298,13 @@
         </task>
       </execute-stage>
 
+      <!--Yarn-->
+      <execute-stage service="YARN" component="RESOURCEMANAGER" title="Apply config changes for Resource Manager">
+        <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <summary>Updating underutilized_preemption setting</summary>
+        </task>
+      </execute-stage>
+
       <!--TEZ-->
       <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez">
         <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath">

http://git-wip-us.apache.org/repos/asf/ambari/blob/fc9788af/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index 2f07c97..bc68754 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -669,6 +669,7 @@
         <pre-upgrade>
           <task xsi:type="configure" id="yarn_log4j_parameterize" />
           <task xsi:type="configure" id="yarn_env_security_opts" />
+          <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption" />
         </pre-upgrade>
         <pre-downgrade />
         <upgrade>


[3/3] ambari git commit: AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnichenko)

Posted by dm...@apache.org.
AMBARI-19951. Set "yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled" property value during RU/EU to HDP2.6 (dgrinenko via dlysnichenko)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/6b50e2b9
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6b50e2b9
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6b50e2b9

Branch: refs/heads/branch-2.5
Commit: 6b50e2b960ea8f1225279e34efb99188ba80978d
Parents: 0593c87
Author: Lisnichenko Dmitro <dl...@hortonworks.com>
Authored: Fri Feb 10 15:16:53 2017 +0200
Committer: Lisnichenko Dmitro <dl...@hortonworks.com>
Committed: Fri Feb 10 15:17:37 2017 +0200

----------------------------------------------------------------------
 .../main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml | 7 +++++++
 .../stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml        | 6 ++++++
 .../main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml    | 1 +
 .../main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml | 7 +++++++
 .../stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml        | 7 +++++++
 .../main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml    | 1 +
 .../main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml | 7 +++++++
 .../stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml        | 7 +++++++
 .../main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml    | 1 +
 9 files changed, 44 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
index f86b03d..54072ad 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/config-upgrade.xml
@@ -513,6 +513,13 @@
             <type>yarn-env</type>
             <insert key="content" value="{% if rm_security_opts is defined %} YARN_OPTS=&quot;{{rm_security_opts}} $YARN_OPTS&quot; {% endif %}" insert-type="append" newline-before="true" newline-after="true" />
           </definition>
+          <definition xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+            <type>yarn-site</type>
+            <transfer operation="copy"
+                      from-key="yarn.resourcemanager.scheduler.monitor.enable"
+                      to-key="yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled"
+                      default-value="false"/>
+          </definition>
         </changes>
       </component>
     </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
index 8b7451e..c64d6ed 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/nonrolling-upgrade-2.6.xml
@@ -319,6 +319,12 @@
         </task>
       </execute-stage>
 
+      <execute-stage service="YARN" component="RESOURCEMANAGER" title="Apply config changes for Resource Manager">
+        <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <summary>Updating underutilized_preemption setting</summary>
+        </task>
+      </execute-stage>
+
       <execute-stage service="MAPREDUCE2" component="MAPREDUCE2_CLIENT" title="Apply config changes for Mapreduce2 client">
         <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath">
           <summary>Verifying LZO codec path for mapreduce</summary>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
index 01fc102..58db4a9 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.3/upgrades/upgrade-2.6.xml
@@ -762,6 +762,7 @@
           <task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_yarn_audit_db" />
           <task xsi:type="configure" id="yarn_log4j_parameterize" />
           <task xsi:type="configure" id="yarn_env_security_opts" />
+          <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption" />
         </pre-upgrade>
         <pre-downgrade /> <!--  no-op to prevent config changes on downgrade -->
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
index 57227f6..44a9b7c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/config-upgrade.xml
@@ -297,6 +297,13 @@
             <type>yarn-env</type>
             <insert key="content" value="{% if rm_security_opts is defined %} YARN_OPTS=&quot;{{rm_security_opts}} $YARN_OPTS&quot; {% endif %}" insert-type="append" newline-before="true" newline-after="true" />
           </definition>
+          <definition xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+            <type>yarn-site</type>
+            <transfer operation="copy"
+                      from-key="yarn.resourcemanager.scheduler.monitor.enable"
+                      to-key="yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled"
+                      default-value="false"/>
+          </definition>
         </changes>
       </component>
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
index 5661641..92c5902 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/nonrolling-upgrade-2.6.xml
@@ -293,6 +293,13 @@
         <task xsi:type="configure" id="hdp_2_5_0_0_add_spark2_yarn_shuffle"/>
       </execute-stage>
 
+      <!--Yarn-->
+      <execute-stage service="YARN" component="RESOURCEMANAGER" title="Apply config changes for Resource Manager">
+        <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <summary>Updating underutilized_preemption setting</summary>
+        </task>
+      </execute-stage>
+
       <!--TEZ-->
       <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez">
         <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath">

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
index 7b12af5..30b5d13 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.4/upgrades/upgrade-2.6.xml
@@ -767,6 +767,7 @@
           <task xsi:type="configure" id="hdp_2_5_0_0_remove_ranger_yarn_audit_db" />
           <task xsi:type="configure" id="yarn_log4j_parameterize" />
           <task xsi:type="configure" id="yarn_env_security_opts" />
+          <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption" />
         </pre-upgrade>
         <pre-downgrade /> <!--  no-op to prevent config changes on downgrade -->
 

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
index 54a824d..2bbc84e 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/config-upgrade.xml
@@ -132,6 +132,13 @@
           <type>yarn-env</type>
           <insert key="content" value="{% if rm_security_opts is defined %} YARN_OPTS=&quot;{{rm_security_opts}} $YARN_OPTS&quot; {% endif %}" insert-type="append" newline-before="true" newline-after="true" />
         </definition>
+        <definition xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <type>yarn-site</type>
+          <transfer operation="copy"
+                    from-key="yarn.resourcemanager.scheduler.monitor.enable"
+                    to-key="yarn.scheduler.capacity.ordering-policy.priority-utilization.underutilized-preemption.enabled"
+                    default-value="false"/>
+        </definition>
       </changes>
     </component>
   </service>

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
index 7bb679e..1be4165 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/nonrolling-upgrade-2.6.xml
@@ -298,6 +298,13 @@
         </task>
       </execute-stage>
 
+      <!--Yarn-->
+      <execute-stage service="YARN" component="RESOURCEMANAGER" title="Apply config changes for Resource Manager">
+        <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption">
+          <summary>Updating underutilized_preemption setting</summary>
+        </task>
+      </execute-stage>
+
       <!--TEZ-->
       <execute-stage service="TEZ" component="TEZ_CLIENT" title="Verify LZO codec path for Tez">
         <task xsi:type="server_action" class="org.apache.ambari.server.serveraction.upgrades.FixLzoCodecPath">

http://git-wip-us.apache.org/repos/asf/ambari/blob/6b50e2b9/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
index 2f07c97..bc68754 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
+++ b/ambari-server/src/main/resources/stacks/HDP/2.5/upgrades/upgrade-2.6.xml
@@ -669,6 +669,7 @@
         <pre-upgrade>
           <task xsi:type="configure" id="yarn_log4j_parameterize" />
           <task xsi:type="configure" id="yarn_env_security_opts" />
+          <task xsi:type="configure" id="hdp_2_6_0_0_yarn_priority_utilization_underutilized_preemption" />
         </pre-upgrade>
         <pre-downgrade />
         <upgrade>