AMBARI-14293. While doing express upgrade multiple Clients and Services Failed to start (new patch) (dlysnichenko)
diff --git a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
index cd3fa5c..ead77a9 100644
--- a/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
+++ b/ambari-common/src/main/python/resource_management/libraries/functions/conf_select.py
@@ -461,12 +461,9 @@
         only_if = format("ls -d {old_conf}/*"))
 
 
-  # Make /usr/hdp/[version]/[component]/conf point to the versioned config.
   # /usr/hdp/current/[component] is already set to to the correct version, e.g., /usr/hdp/[version]/[component]
-  try:
-    select("HDP", package, version)
-  except Exception, e:
-    Logger.warning("Could not select the directory for package {0}. Error: {1}".format(package, e))
+  
+  link_component_conf_to_versioned_config(package, version)
 
   # Symlink /etc/[component]/conf to /etc/[component]/conf.backup
   try:
@@ -489,3 +486,13 @@
         Logger.error("Unsupported 'link_to' argument. Could not link package {0}".format(package))
   except Exception, e:
     Logger.warning("Could not change symlink for package {0} to point to {1} directory. Error: {2}".format(package, link_to, e))
+
+
+def link_component_conf_to_versioned_config(package, version):
+  """
+  Make /usr/hdp/[version]/[component]/conf point to the versioned config.
+  """
+  try:
+    select("HDP", package, version)
+  except Exception, e:
+    Logger.warning("Could not select the directory for package {0}. Error: {1}".format(package, e))
diff --git a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
index ae66fe0..e88f554 100644
--- a/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
+++ b/ambari-server/src/main/resources/custom_actions/scripts/install_packages.py
@@ -190,15 +190,17 @@
       Logger.info("Configuration symlinks are not needed for {0}, only HDP-2.3+".format(stack_version))
       return
 
-    # if already on HDP 2.3, then there's nothing to do in terms of linking configs
-    if self.current_hdp_stack_version and compare_versions(self.current_hdp_stack_version, '2.3') >= 0:
-      Logger.info("The current cluster stack of {0} does not require linking configurations".format(stack_version))
-      return
-
-    # link configs for all known packages
     for package_name, directories in conf_select.PACKAGE_DIRS.iteritems():
-      conf_select.convert_conf_directories_to_symlinks(package_name, stack_version, directories,
-        skip_existing_links = False, link_to = "backup")
+      # if already on HDP 2.3, then we should skip making conf.backup folders
+      if self.current_hdp_stack_version and compare_versions(self.current_hdp_stack_version, '2.3') >= 0:
+        Logger.info("The current cluster stack of {0} does not require backing up configurations; "
+                    "only conf-select versioned config directories will be created.".format(stack_version))
+        # only link configs for all known packages
+        conf_select.link_component_conf_to_versioned_config(package_name, stack_version)
+      else:
+        # link configs and create conf.backup folders for all known packages
+        conf_select.convert_conf_directories_to_symlinks(package_name, stack_version, directories,
+          skip_existing_links = False, link_to = "backup")
 
 
   def compute_actual_version(self):