Browse Source

AMBARI-7106. Use ubuntu12, not debian12 for OS family for ubuntu (dlysnichenko)

Lisnichenko Dmitro 11 năm trước cách đây
mục cha
commit
df34b3a7a7
63 tập tin đã thay đổi với 148 bổ sung149 xóa
  1. 1 1
      ambari-agent/src/main/python/ambari_agent/HostInfo.py
  2. 2 2
      ambari-agent/src/test/python/ambari_agent/TestHardware.py
  3. 4 4
      ambari-agent/src/test/python/resource_management/TestPackageResource.py
  4. 8 8
      ambari-agent/src/test/python/resource_management/TestRepositoryResource.py
  5. 4 4
      ambari-common/src/main/python/ambari_commons/os_check.py
  6. 1 1
      ambari-common/src/main/python/resource_management/core/providers/__init__.py
  7. 2 2
      ambari-common/src/main/python/resource_management/core/system.py
  8. 2 2
      ambari-common/src/main/python/resource_management/libraries/providers/__init__.py
  9. 1 1
      ambari-common/src/main/python/resource_management/libraries/providers/monitor_webserver.py
  10. 1 1
      ambari-common/src/main/python/resource_management/libraries/providers/repository.py
  11. 1 1
      ambari-server/pom.xml
  12. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java
  13. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java
  14. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/state/Host.java
  15. 1 1
      ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java
  16. 3 3
      ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java
  17. 6 6
      ambari-server/src/main/python/ambari_server/utils.py
  18. 7 7
      ambari-server/src/main/python/bootstrap.py
  19. 4 4
      ambari-server/src/main/python/setupAgent.py
  20. 1 1
      ambari-server/src/main/resources/os_family.json
  21. 2 2
      ambari-server/src/main/resources/scripts/kerberos-setup.sh
  22. 1 1
      ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/repo_initialization.py
  23. 0 0
      ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/templates/repo_ubuntu.j2
  24. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py
  25. 0 0
      ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/templates/repo_ubuntu.j2
  26. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/metainfo.xml
  27. 2 2
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/functions.py
  28. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/ganglia_server.py
  29. 2 2
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py
  30. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml
  31. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml
  32. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py
  33. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/status_params.py
  34. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/metainfo.xml
  35. 4 4
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/nagios.py
  36. 5 5
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py
  37. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.conf.j2
  38. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml
  39. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/oozieSmoke2.sh
  40. 2 2
      ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/OOZIE/metainfo.xml
  41. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml
  42. 1 1
      ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml
  43. 0 1
      ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java
  44. 2 2
      ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java
  45. 1 1
      ambari-server/src/test/python/TestAmbariServer.py
  46. 3 3
      ambari-server/src/test/python/TestBootstrap.py
  47. 6 6
      ambari-server/src/test/python/TestOSCheck.py
  48. 32 32
      ambari-server/src/test/python/TestSetupAgent.py
  49. 3 3
      ambari-server/src/test/python/TestUtils.py
  50. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.1/services/GANGLIA/metainfo.xml
  51. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HDFS/metainfo.xml
  52. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HIVE/metainfo.xml
  53. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.1/services/OOZIE/metainfo.xml
  54. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.5/services/GANGLIA/metainfo.xml
  55. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml
  56. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HIVE/metainfo.xml
  57. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.5/services/OOZIE/metainfo.xml
  58. 1 1
      ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/metainfo.xml
  59. 5 5
      ambari-web/app/assets/data/wizard/stack/HDP_versions.json
  60. 1 1
      ambari-web/app/controllers/installer.js
  61. 1 1
      ambari-web/app/controllers/main/admin/repositories.js
  62. 1 1
      ambari-web/app/controllers/wizard/step3_controller.js
  63. 1 1
      ambari-web/app/controllers/wizard/step8_controller.js

+ 1 - 1
ambari-agent/src/main/python/ambari_agent/HostInfo.py

@@ -53,7 +53,7 @@ class HostInfo:
 
   # List of live services checked for on the host, takes a map of plan strings
   DEFAULT_LIVE_SERVICES = [
-    {OSConst.REDHAT_FAMILY: "ntpd", OSConst.SUSE_FAMILY: "ntp", OSConst.DEBIAN_FAMILY: "ntp"}
+    {OSConst.REDHAT_FAMILY: "ntpd", OSConst.SUSE_FAMILY: "ntp", OSConst.UBUNTU_FAMILY: "ntp"}
   ]
 
   # Set of default users (need to be replaced with the configured user names)

+ 2 - 2
ambari-agent/src/test/python/ambari_agent/TestHardware.py

@@ -196,10 +196,10 @@ lo        Link encap:Local Loopback
     self.assertEquals(result['operatingsystem'], 'some_type_of_os')
     self.assertEquals(result['osfamily'], 'redhat')
 
-    get_os_family_mock.return_value = "debian"
+    get_os_family_mock.return_value = "ubuntu"
     result = Facter().facterInfo()
     self.assertEquals(result['operatingsystem'], 'some_type_of_os')
-    self.assertEquals(result['osfamily'], 'debian')
+    self.assertEquals(result['osfamily'], 'ubuntu')
 
     get_os_family_mock.return_value = "suse"
     result = Facter().facterInfo()

+ 4 - 4
ambari-agent/src/test/python/resource_management/TestPackageResource.py

@@ -28,8 +28,8 @@ from resource_management.core import shell
 class TestPackageResource(TestCase):
   @patch.object(shell, "call")
   @patch.object(shell, "checked_call")
-  @patch.object(System, "os_family", new = 'debian')
-  def test_action_install_debian_update(self, shell_mock, call_mock):
+  @patch.object(System, "os_family", new = 'ubuntu')
+  def test_action_install_ubuntu_update(self, shell_mock, call_mock):
     call_mock.return_value= (1, None)
     with Environment('/') as env:
       Package("some_package",
@@ -45,8 +45,8 @@ class TestPackageResource(TestCase):
   
   @patch.object(shell, "call")
   @patch.object(shell, "checked_call")
-  @patch.object(System, "os_family", new = 'debian')
-  def test_action_install_debian(self, shell_mock, call_mock):
+  @patch.object(System, "os_family", new = 'ubuntu')
+  def test_action_install_ubuntu(self, shell_mock, call_mock):
     call_mock.side_effect = [(1, None), (0, None)]
     with Environment('/') as env:
       Package("some_package",

+ 8 - 8
ambari-agent/src/test/python/resource_management/TestRepositoryResource.py

@@ -123,8 +123,8 @@ class TestRepositoryResource(TestCase):
     @patch("os.path.isfile", new=MagicMock(return_value=True))
     @patch("filecmp.cmp", new=MagicMock(return_value=False))
     @patch.object(System, "os_release_name", new='precise')        
-    @patch.object(System, "os_family", new='debian')
-    def test_create_repo_debian_repo_exists(self, file_mock, execute_mock, 
+    @patch.object(System, "os_family", new='ubuntu')
+    def test_create_repo_ubuntu_repo_exists(self, file_mock, execute_mock,
                                             tempfile_mock, checked_call_mock):
       tempfile_mock.return_value = MagicMock(spec=file)
       tempfile_mock.return_value.__enter__.return_value.name = "/tmp/1.txt"
@@ -160,8 +160,8 @@ class TestRepositoryResource(TestCase):
     @patch("os.path.isfile", new=MagicMock(return_value=True))
     @patch("filecmp.cmp", new=MagicMock(return_value=True))
     @patch.object(System, "os_release_name", new='precise')        
-    @patch.object(System, "os_family", new='debian')
-    def test_create_repo_debian_doesnt_repo_exist(self, file_mock, execute_mock, tempfile_mock):
+    @patch.object(System, "os_family", new='ubuntu')
+    def test_create_repo_ubuntu_doesnt_repo_exist(self, file_mock, execute_mock, tempfile_mock):
       tempfile_mock.return_value = MagicMock(spec=file)
       tempfile_mock.return_value.__enter__.return_value.name = "/tmp/1.txt"
       
@@ -186,10 +186,10 @@ class TestRepositoryResource(TestCase):
       
     
     @patch("os.path.isfile", new=MagicMock(return_value=True))
-    @patch.object(System, "os_family", new='debian')
+    @patch.object(System, "os_family", new='ubuntu')
     @patch("resource_management.libraries.providers.repository.Execute")
     @patch("resource_management.libraries.providers.repository.File")
-    def test_remove_repo_debian_repo_exist(self, file_mock, execute_mock):
+    def test_remove_repo_ubuntu_repo_exist(self, file_mock, execute_mock):
       with Environment('/') as env:
           Repository('HDP',
                      action = "remove",
@@ -200,10 +200,10 @@ class TestRepositoryResource(TestCase):
       self.assertEqual(execute_mock.call_args[0][0], 'apt-get update -qq -o Dir::Etc::sourcelist="sources.list.d/HDP.list" -o APT::Get::List-Cleanup="0"')
 
     @patch("os.path.isfile", new=MagicMock(return_value=False))
-    @patch.object(System, "os_family", new='debian')
+    @patch.object(System, "os_family", new='ubuntu')
     @patch("resource_management.libraries.providers.repository.Execute")
     @patch("resource_management.libraries.providers.repository.File")
-    def test_remove_repo_debian_repo_doenst_exist(self, file_mock, execute_mock):
+    def test_remove_repo_ubuntu_repo_doenst_exist(self, file_mock, execute_mock):
       with Environment('/') as env:
           Repository('HDP',
                      action = "remove",

+ 4 - 4
ambari-common/src/main/python/ambari_commons/os_check.py

@@ -37,7 +37,7 @@ def linux_distribution():
 class OS_CONST_TYPE(type):
   # os families
   REDHAT_FAMILY = 'redhat'
-  DEBIAN_FAMILY = 'debian'
+  UBUNTU_FAMILY = 'ubuntu'
   SUSE_FAMILY = 'suse'
 
   # Declare here os type mapping
@@ -49,7 +49,7 @@ class OS_CONST_TYPE(type):
                                  'cloudlinux', 'slc', 'scientific', 'psbm',
                                  'centos linux']
                              },
-                            {'name': DEBIAN_FAMILY,
+                            {'name': UBUNTU_FAMILY,
                              'os_list': ['ubuntu', 'debian']
                              },
                             {'name': SUSE_FAMILY,
@@ -172,14 +172,14 @@ class OSCheck:
   #  Exception safe family check functions
 
   @staticmethod
-  def is_debian_family():
+  def is_ubuntu_family():
     """
      Return true if it is so or false if not
 
      This is safe check for debian family, doesn't generate exception
     """
     try:
-      if OSCheck.get_os_family() == OSConst.DEBIAN_FAMILY:
+      if OSCheck.get_os_family() == OSConst.UBUNTU_FAMILY:
         return True
     except Exception:
       pass

+ 1 - 1
ambari-common/src/main/python/resource_management/core/providers/__init__.py

@@ -47,7 +47,7 @@ PROVIDERS = dict(
   suse=dict(
     Package="resource_management.core.providers.package.zypper.ZypperProvider",
   ),
-  debian=dict(
+  ubuntu=dict(
     Package="resource_management.core.providers.package.apt.AptProvider",
   ),
   default=dict(

+ 2 - 2
ambari-common/src/main/python/resource_management/core/system.py

@@ -94,7 +94,7 @@ class System(object):
     Return values:
     redhat, fedora, centos, oraclelinux, ascendos,
     amazon, xenserver, oel, ovs, cloudlinux, slc, scientific, psbm,
-    ubuntu, debian, sles, sled, opensuse, suse ... and others
+    ubuntu, ubuntu, sles, sled, opensuse, suse ... and others
     
     In case cannot detect raises exception.
     """
@@ -104,7 +104,7 @@ class System(object):
   def os_family(self):
     """
     Return values:
-    redhat, debian, suse
+    redhat, ubuntu, suse
     
     In case cannot detect raises exception
     """

+ 2 - 2
ambari-common/src/main/python/resource_management/libraries/providers/__init__.py

@@ -27,8 +27,8 @@ PROVIDERS = dict(
   suse=dict(
     Repository="resource_management.libraries.providers.repository.RhelSuseRepositoryProvider",
   ),
-  debian=dict(
-    Repository="resource_management.libraries.providers.repository.DebianRepositoryProvider",
+  ubuntu=dict(
+    Repository="resource_management.libraries.providers.repository.UbuntuRepositoryProvider",
   ),
   default=dict(
     ExecuteHadoop="resource_management.libraries.providers.execute_hadoop.ExecuteHadoopProvider",

+ 1 - 1
ambari-common/src/main/python/resource_management/libraries/providers/monitor_webserver.py

@@ -42,7 +42,7 @@ class MonitorWebserverProvider(Provider):
 
   def get_serivice_params(self):
     self.system = System.get_instance()
-    if self.system.os_family in ["suse","debian"]:
+    if self.system.os_family in ["suse","ubuntu"]:
       self.service_name = "apache2"
       self.httpd_conf_dir = '/etc/apache2'
     else:

+ 1 - 1
ambari-common/src/main/python/resource_management/libraries/providers/repository.py

@@ -51,7 +51,7 @@ repos_dirs = {
 }
 
 
-class DebianRepositoryProvider(Provider):
+class UbuntuRepositoryProvider(Provider):
   package_type = "deb"
   repo_dir = "/etc/apt/sources.list.d"
   update_cmd = 'apt-get update -qq -o Dir::Etc::sourcelist="sources.list.d/{repo_file_name}" -o APT::Get::List-Cleanup="0"'

+ 1 - 1
ambari-server/pom.xml

@@ -143,7 +143,7 @@
             <exclude>**/*.json</exclude>
             <exclude>**/*.sql</exclude>
             <exclude>**/repo_suse_rhel.j2</exclude>
-            <exclude>**/repo_debian.j2</exclude>
+            <exclude>**/repo_ubuntu.j2</exclude>
             <exclude>**/.pydev*</exclude>
 
             <!--gitignore content -->

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java

@@ -125,7 +125,7 @@ public class AmbariMetaInfo {
   // all the supported OS'es
   private static final List<String> ALL_SUPPORTED_OS = Arrays.asList(
       "centos5", "redhat5", "centos6", "redhat6", "oraclelinux5",
-      "oraclelinux6", "suse11", "sles11", "ubuntu12", "debian12");
+      "oraclelinux6", "suse11", "sles11", "ubuntu12");
 
   private final ActionDefinitionManager adManager = new ActionDefinitionManager();
   private String serverVersion = "undefined";

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java

@@ -285,7 +285,7 @@ public class Configuration {
   private static final String SERVER_CONNECTION_MAX_IDLE_TIME =
       "server.connection.max.idle.millis";
 
-  private static final String UBUNTU_OS = "debian12";
+  private static final String UBUNTU_OS = "ubuntu12";
 
   /**
    * Default for repo validation suffixes.

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/Host.java

@@ -164,7 +164,7 @@ public interface Host {
    * Get the os Family: 
    * redhat5: for centos5, rhel5, oraclelinux5 ..
    * redhat6: for centos6, rhel6, oraclelinux6 ..
-   * debian12 : for ubuntu12
+   * ubuntu12 : for ubuntu12
    * suse11: for sles11, suse11 ..
    * 
    * @return the osFamily

+ 1 - 1
ambari-server/src/main/java/org/apache/ambari/server/state/stack/LatestRepoCallable.java

@@ -106,7 +106,7 @@ public class LatestRepoCallable implements Callable<Void> {
               // Agents do the reverse action (take the base url, and append <name>.repo)
               
               String repo_file_format;
-              if(ri.getOsType().equals("debian12")) {
+              if(ri.getOsType().equals("ubuntu12")) {
                 repo_file_format = "list";
               } else {
                 repo_file_format = "repo";

+ 3 - 3
ambari-server/src/main/java/org/apache/ambari/server/state/stack/OsFamily.java

@@ -58,12 +58,12 @@ public class OsFamily {
       osMap.put("centos5", new HashSet<String>());
       osMap.put("centos6", new HashSet<String>());
       osMap.put("suse11", new HashSet<String>());
-      osMap.put("debian12", new HashSet<String>());
+      osMap.put("ubuntu12", new HashSet<String>());
       
       Collections.addAll(osMap.get("centos5"), "centos5", "redhat5", "oraclelinux5", "rhel5");
       Collections.addAll(osMap.get("centos6"), "centos6", "redhat6", "oraclelinux6", "rhel6");
       Collections.addAll(osMap.get("suse11"), "suse11", "sles11", "opensuse11");
-      Collections.addAll(osMap.get("debian12"), "ubuntu12");
+      Collections.addAll(osMap.get("ubuntu12"), "ubuntu12");
     }
   }
 
@@ -99,4 +99,4 @@ public class OsFamily {
     return null;
   }
 
-}
+}

+ 6 - 6
ambari-server/src/main/python/ambari_server/utils.py

@@ -28,7 +28,7 @@ from ambari_commons import OSConst
 # PostgreSQL settings
 PG_STATUS_RUNNING_DEFAULT = "running"
 PG_HBA_ROOT_DEFAULT = "/var/lib/pgsql/data"
-PG_HBA_INIT_FILES = {'debian': '/etc/postgresql',
+PG_HBA_INIT_FILES = {'ubuntu': '/etc/postgresql',
                      'redhat': '/etc/rc.d/init.d/postgresql',
                      'suse': '/etc/init.d/postgresql'}
 
@@ -172,10 +172,10 @@ def get_ubuntu_pg_version():
   postgre_ver = ""
 
   if os.path.isdir(PG_HBA_INIT_FILES[
-    'debian']):  # detect actual installed versions of PG and select a more new one
+    'ubuntu']):  # detect actual installed versions of PG and select a more new one
     postgre_ver = sorted(
-      [fld for fld in os.listdir(PG_HBA_INIT_FILES[OSConst.DEBIAN_FAMILY]) if
-       os.path.isdir(os.path.join(PG_HBA_INIT_FILES[OSConst.DEBIAN_FAMILY], fld))],
+      [fld for fld in os.listdir(PG_HBA_INIT_FILES[OSConst.UBUNTU_FAMILY]) if
+       os.path.isdir(os.path.join(PG_HBA_INIT_FILES[OSConst.UBUNTU_FAMILY], fld))],
       reverse=True)
     if len(postgre_ver) > 0:
       return postgre_ver[0]
@@ -188,7 +188,7 @@ def get_postgre_hba_dir(OS_FAMILY):
   1) /etc/rc.d/init.d/postgresql --> /etc/rc.d/init.d/postgresql-9.3
   2) /etc/init.d/postgresql --> /etc/init.d/postgresql-9.1
   """
-  if OS_FAMILY == OSConst.DEBIAN_FAMILY:
+  if OS_FAMILY == OSConst.UBUNTU_FAMILY:
     # Like: /etc/postgresql/9.1/main/
     return os.path.join(PG_HBA_INIT_FILES[OS_FAMILY], get_ubuntu_pg_version(),
                         "main")
@@ -216,7 +216,7 @@ def get_postgre_hba_dir(OS_FAMILY):
 
 def get_postgre_running_status(OS_FAMILY):
   """Return postgre running status indicator"""
-  if OS_FAMILY == OSConst.DEBIAN_FAMILY:
+  if OS_FAMILY == OSConst.UBUNTU_FAMILY:
     return os.path.join(get_ubuntu_pg_version(), "main")
   else:
     return PG_STATUS_RUNNING_DEFAULT

+ 7 - 7
ambari-server/src/main/python/bootstrap.py

@@ -161,7 +161,7 @@ class Bootstrap(threading.Thread):
     self.host_log = HostLog(log_file)
     self.daemon = True
 
-    if self.is_debian():
+    if self.is_ubuntu():
       self.AMBARI_REPO_FILENAME = self.AMBARI_REPO_FILENAME + ".list"
     else:
       self.AMBARI_REPO_FILENAME = self.AMBARI_REPO_FILENAME + ".repo"
@@ -196,8 +196,8 @@ class Bootstrap(threading.Thread):
         return True
     return False
 
-  def is_debian(self):
-    if self.getServerFamily()[0] == "debian":
+  def is_ubuntu(self):
+    if self.getServerFamily()[0] == "ubuntu":
       return True
     return False
 
@@ -205,7 +205,7 @@ class Bootstrap(threading.Thread):
     """ Ambari repo file for Ambari."""
     if self.is_suse():
       return "/etc/zypp/repos.d"
-    elif self.is_debian():
+    elif self.is_ubuntu():
       return "/etc/apt/sources.list.d"
     else:
       return "/etc/yum.repos.d"
@@ -305,8 +305,8 @@ class Bootstrap(threading.Thread):
     retcode2 = ssh.run()
     self.host_log.write("\n")
 
-    # Update repo cache for debian OS
-    if self.is_debian():
+    # Update repo cache for ubuntu OS
+    if self.is_ubuntu():
       self.host_log.write("==========================\n")
       self.host_log.write("Update apt cache of repository...")
       command = self.getAptUpdateCommand()
@@ -419,7 +419,7 @@ class Bootstrap(threading.Thread):
     self.host_log.write("==========================\n")
     self.host_log.write("Checking 'sudo' package on remote host...")
     params = self.shared_state
-    if self.getServerFamily()[0] == "debian":
+    if self.getServerFamily()[0] == "ubuntu":
       command = "dpkg --get-selections|grep -e '^sudo\s*install'"
     else:
       command = "rpm -qa | grep -e '^sudo\-'"

+ 4 - 4
ambari-server/src/main/python/setupAgent.py

@@ -54,7 +54,7 @@ def installAgent(projectVersion):
   # The command doesn't work with file mask ambari-agent*.rpm, so rename it on agent host
   if OSCheck.is_suse_family():
     Command = ["zypper", "--no-gpg-checks", "install", "-y", "ambari-agent-" + projectVersion]
-  elif OSCheck.is_debian_family():
+  elif OSCheck.is_ubuntu_family():
     # add * to end of version in case of some test releases
     Command = ["apt-get", "install", "-y", "--allow-unauthenticated", "ambari-agent=" + projectVersion + "*"]
   else:
@@ -111,7 +111,7 @@ def findNearestAgentPackageVersion(projectVersion):
   if OSCheck.is_suse_family():
     Command = ["bash", "-c", "zypper --no-gpg-checks -q search -s --match-exact ambari-agent | grep '" + projectVersion +
                                  "' | cut -d '|' -f 4 | head -n1 | sed -e 's/-\w[^:]*//1' "]
-  elif OSCheck.is_debian_family():
+  elif OSCheck.is_ubuntu_family():
     if projectVersion == "  ":
       Command = ["bash", "-c", "apt-cache -q show ambari-agent |grep 'Version\:'|cut -d ' ' -f 2|tr -d '\\n'|sed -s 's/[-|~][A-Za-z0-9]*//'"]
     else:
@@ -124,7 +124,7 @@ def findNearestAgentPackageVersion(projectVersion):
 
 
 def isAgentPackageAlreadyInstalled(projectVersion):
-    if OSCheck.is_debian_family():
+    if OSCheck.is_ubuntu_family():
       Command = ["bash", "-c", "dpkg-query -W -f='${Status} ${Version}\n' ambari-agent | grep -v deinstall | grep " + projectVersion]
     else:
       Command = ["bash", "-c", "rpm -qa | grep ambari-agent-"+projectVersion]
@@ -139,7 +139,7 @@ def getAvaliableAgentPackageVersions():
   if OSCheck.is_suse_family():
     Command = ["bash", "-c",
         "zypper --no-gpg-checks -q search -s --match-exact ambari-agent | grep ambari-agent | sed -re 's/\s+/ /g' | cut -d '|' -f 4 | tr '\\n' ', ' | sed -s 's/[-|~][A-Za-z0-9]*//g'"]
-  elif OSCheck.is_debian_family():
+  elif OSCheck.is_ubuntu_family():
     Command = ["bash", "-c",
         "apt-cache -q show ambari-agent|grep 'Version\:'|cut -d ' ' -f 2| tr '\\n' ', '|sed -s 's/[-|~][A-Za-z0-9]*//g'"]
   else:

+ 1 - 1
ambari-server/src/main/resources/os_family.json

@@ -16,7 +16,7 @@
     "sles11",
     "opensuse11"
   ],
-  "debian12": [
+  "ubuntu12": [
     "debian12",
     "ubuntu12"
   ]

+ 2 - 2
ambari-server/src/main/resources/scripts/kerberos-setup.sh

@@ -253,7 +253,7 @@ getEnvironmentCMD () {
   version=`python -c 'import sys; sys.path.append("/usr/lib/python2.6/site-packages/"); from ambari_commons import OSCheck; print OSCheck.get_os_major_version()'`
   os=$os$version;
   case $os in
-  'debian12' )
+  'ubuntu12' )
     pkgmgr='apt-get'
     inst_cmd="env DEBIAN_FRONTEND=noninteractive /usr/bin/$pkgmgr --allow-unauthenticated --assume-yes install -f "
     client_packages="krb5-user libpam-krb5 libpam-ccreds auth-client-config"
@@ -325,7 +325,7 @@ checkSSH () {
 installRngtools () {
   $inst_cmd $rng_tools
   echo $inst_cmd $rng_utils
-  if [ $os == 'debian12' ] || [ $os == 'suse11' ]; then
+  if [ $os == 'ubuntu12' ] || [ $os == 'suse11' ]; then
     echo "HRNGDEVICE=/dev/urandom" >> /etc/default/rng-tools
     /etc/init.d/rng-tools start || true
   elif [ $os == 'redhat5' ]; then

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/scripts/repo_initialization.py

@@ -49,7 +49,7 @@ def _alter_repo(action, repo_string, repo_template):
 
 def install_repos():
   import params
-  template = "repo_suse_rhel.j2" if System.get_instance().os_family in ["suse", "redhat"] else "repo_debian.j2"
+  template = "repo_suse_rhel.j2" if System.get_instance().os_family in ["suse", "redhat"] else "repo_ubuntu.j2"
   _alter_repo("create", params.repo_info, template)
   if params.service_repo_info:
     _alter_repo("create", params.service_repo_info, template)

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/templates/repo_debian.j2 → ambari-server/src/main/resources/stacks/HDP/1.3.2/hooks/before-INSTALL/templates/repo_ubuntu.j2


+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/scripts/repo_initialization.py

@@ -51,7 +51,7 @@ def _alter_repo(action, repo_string, repo_template):
 
 def install_repos():
   import params
-  template = "repo_suse_rhel.j2" if System.get_instance().os_family in ["suse", "redhat"] else "repo_debian.j2"
+  template = "repo_suse_rhel.j2" if System.get_instance().os_family in ["suse", "redhat"] else "repo_ubuntu.j2"
   _alter_repo("create", params.repo_info, template)
   if params.service_repo_info:
     _alter_repo("create", params.service_repo_info, template)

+ 0 - 0
ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/templates/repo_debian.j2 → ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-INSTALL/templates/repo_ubuntu.j2


+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/metainfo.xml

@@ -79,7 +79,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>python-rrdtool</name>

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/functions.py

@@ -19,7 +19,7 @@ from resource_management import *
 
 
 def turn_off_autostart(service):
-  if System.get_instance().os_family == "debian":
+  if System.get_instance().os_family == "ubuntu":
     Execute(format("update-rc.d {service} disable"),
             path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'
     )
@@ -28,4 +28,4 @@ def turn_off_autostart(service):
   else:
     Execute(format("chkconfig {service} off"),
             path='/usr/sbin:/sbin:/usr/local/bin:/bin:/usr/bin'
-    )
+    )

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/ganglia_server.py

@@ -108,7 +108,7 @@ def server_files():
             recursive=True
   )
   
-  if System.get_instance().os_family in ["debian","suse"]:
+  if System.get_instance().os_family in ["ubuntu","suse"]:
     File( params.ganglia_apache_config_file,
       content = Template("ganglia.conf.j2"),
       mode = 0644

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/GANGLIA/package/scripts/params.py

@@ -37,7 +37,7 @@ gmond_apps = [x.strip() for x in gmond_apps]
 gmond_allowed_apps = ["Application1", "Application2", "Application3"]
 gmond_apps = set(gmond_apps) & set(gmond_allowed_apps)
 
-if System.get_instance().os_family == "debian":
+if System.get_instance().os_family == "ubuntu":
   gmond_service_name = "ganglia-monitor"
   modules_dir = "/usr/lib/ganglia"
 else:
@@ -148,7 +148,7 @@ elif  System.get_instance().os_family == "redhat":
   rrd_py_path = '/var/www/cgi-bin'
   dwoo_path = '/var/lib/ganglia/dwoo'
   web_user = "apache"
-elif  System.get_instance().os_family == "debian":
+elif  System.get_instance().os_family == "ubuntu":
   rrd_py_path = '/usr/lib/cgi-bin'
   ganglia_web_path = '/usr/share/ganglia-webfrontend'
   dwoo_path = '/var/lib/ganglia/dwoo'

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HDFS/metainfo.xml

@@ -178,7 +178,7 @@
         </osSpecific>
         
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>libsnappy1</name>

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/metainfo.xml

@@ -142,7 +142,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>redhat5,redhat6,debian12</osFamily>
+          <osFamily>redhat5,redhat6,ubuntu12</osFamily>
           <packages>
             <package>
               <name>mysql-server</name>

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/params.py

@@ -182,7 +182,7 @@ tez_local_api_jars = '/usr/lib/tez/tez*.jar'
 tez_local_lib_jars = '/usr/lib/tez/lib/*.jar'
 tez_user = config['configurations']['tez-env']['tez_user']
 
-if System.get_instance().os_family == "debian":
+if System.get_instance().os_family == "ubuntu":
   mysql_configname = '/etc/mysql/my.cnf'
 else:
   mysql_configname = '/etc/my.cnf'

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/HIVE/package/scripts/status_params.py

@@ -29,7 +29,7 @@ hive_metastore_pid = 'hive.pid'
 
 hcat_pid_dir = config['configurations']['hive-env']['hcat_pid_dir'] #hcat_pid_dir
 
-if System.get_instance().os_family == "suse" or System.get_instance().os_family == "debian":
+if System.get_instance().os_family == "suse" or System.get_instance().os_family == "ubuntu":
   daemon_name = 'mysql'
 else:
   daemon_name = 'mysqld'

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/metainfo.xml

@@ -86,7 +86,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>debian12</osFamily>             
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>nagios3</name>

+ 4 - 4
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/nagios.py

@@ -81,9 +81,9 @@ def nagios():
     group = params.nagios_group,
     mode = 0664)
   
-  if System.get_instance().os_family == "debian":
-    Link(params.debian_stylesheets_desired_location,
-         to = params.debian_stylesheets_real_location
+  if System.get_instance().os_family == "ubuntu":
+    Link(params.ubuntu_stylesheets_desired_location,
+         to = params.ubuntu_stylesheets_real_location
     )
   
   
@@ -104,7 +104,7 @@ def set_web_permisssions():
 
   if System.get_instance().os_family == "suse":
     command = format("usermod -G {nagios_group} wwwrun")
-  elif System.get_instance().os_family == "debian":
+  elif System.get_instance().os_family == "ubuntu":
     command = format("usermod -G {nagios_group} www-data") # check -a ???
   elif System.get_instance().os_family == "redhat":
     command = format("usermod -a -G {nagios_group} apache")

+ 5 - 5
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/scripts/params.py

@@ -27,7 +27,7 @@ import status_params
 # server configurations
 config = Script.get_config()
 
-if System.get_instance().os_family == "debian":
+if System.get_instance().os_family == "ubuntu":
   nagios_service_name = "nagios3"
 else:
   nagios_service_name = "nagios"
@@ -39,10 +39,10 @@ nagios_rw_dir = status_params.nagios_rw_dir
 
 # HACK: Stylesheets for Nagios UI on Ubuntu are in wrong place so we have to do a symlink.
 # In future we can fix this directly in the package.
-debian_stylesheets_real_location = "/etc/nagios3/stylesheets"
-debian_stylesheets_desired_location = "/usr/share/nagios3/htdocs/stylesheets"
+ubuntu_stylesheets_real_location = "/etc/nagios3/stylesheets"
+ubuntu_stylesheets_desired_location = "/usr/share/nagios3/htdocs/stylesheets"
 
-if System.get_instance().os_family == "debian":
+if System.get_instance().os_family == "ubuntu":
   host_template = "generic-host"
   plugins_dir = "/usr/lib/nagios/plugins"
   nagios_web_dir = "/usr/share/nagios3/htdocs"
@@ -185,7 +185,7 @@ if System.get_instance().os_family == "suse":
   nagios_p1_pl = "/usr/lib/nagios/p1.pl"
   htpasswd_cmd = "htpasswd2"
   web_conf_dir = "/etc/apache2/conf.d"
-elif System.get_instance().os_family == "debian":
+elif System.get_instance().os_family == "ubuntu":
   nagios_p1_pl = "/usr/lib/nagios3/p1.pl"
   htpasswd_cmd = "htpasswd"
   web_conf_dir = "/etc/apache2/conf.d"

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/NAGIOS/package/templates/nagios.conf.j2

@@ -63,7 +63,7 @@ ScriptAlias {{cgi_weblink}} "{{cgi_dir}}"
 
 Alias /nagios "{{nagios_web_dir}}"
 {# Ubuntu has different nagios url #}
-{% if os_family == "debian" %}
+{% if os_family == "ubuntu" %}
 Alias /nagios3 "{{nagios_web_dir}}"
 {% endif %}
 

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/metainfo.xml

@@ -131,7 +131,7 @@
         </osSpecific>
         
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>extjs</name>

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.0.6/services/OOZIE/package/files/oozieSmoke2.sh

@@ -69,7 +69,7 @@ export JOBTRACKER=`getValueFromField ${hadoop_conf_dir}/yarn-site.xml yarn.resou
 export NAMENODE=`getValueFromField ${hadoop_conf_dir}/core-site.xml fs.defaultFS`
 export OOZIE_SERVER=`getValueFromField ${oozie_conf_dir}/oozie-site.xml oozie.base.url | tr '[:upper:]' '[:lower:]'`
 
-if [ "$os_family" == "debian" ] ; then
+if [ "$os_family" == "ubuntu" ] ; then
   LIST_PACKAGE_FILES_CMD='dpkg-query -L'
 else
   LIST_PACKAGE_FILES_CMD='rpm -ql'

+ 2 - 2
ambari-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/OOZIE/metainfo.xml

@@ -56,7 +56,7 @@
         </osSpecific>
         
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>extjs</name>
@@ -75,4 +75,4 @@
       </configuration-dependencies>
     </service>
   </services>
-</metainfo>
+</metainfo>

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.1/repos/repoinfo.xml

@@ -53,7 +53,7 @@
       <reponame>HDP-UTILS</reponame>
     </repo>
   </os>
-  <os type="debian12">
+  <os type="ubuntu12">
     <repo>
       <baseurl>REPLACE_WITH_UBUNTU12_URL</baseurl>
       <repoid>HDP-2.1</repoid>

+ 1 - 1
ambari-server/src/main/resources/stacks/HDP/2.1/services/OOZIE/metainfo.xml

@@ -56,7 +56,7 @@
         </osSpecific>
         
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>extjs</name>

+ 0 - 1
ambari-server/src/test/java/org/apache/ambari/server/api/services/AmbariMetaInfoTest.java

@@ -509,7 +509,6 @@ public class AmbariMetaInfoTest {
     Assert.assertTrue(metaInfo.isOsSupported("suse11"));
     Assert.assertTrue(metaInfo.isOsSupported("sles11"));
     Assert.assertTrue(metaInfo.isOsSupported("ubuntu12"));
-    Assert.assertTrue(metaInfo.isOsSupported("debian12"));
     Assert.assertFalse(metaInfo.isOsSupported("windows"));
   }
 

+ 2 - 2
ambari-server/src/test/java/org/apache/ambari/server/controller/AmbariManagementControllerTest.java

@@ -8300,7 +8300,7 @@ public class AmbariManagementControllerTest {
 
     // variation #1: url with trailing slash, suffix preceding slash
     backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU, "/repodata/repomd.xml");
-    Assert.assertTrue(baseUrl.endsWith("/") && configuration.getRepoValidationSuffixes("debian12")[0].startsWith("/"));
+    Assert.assertTrue(baseUrl.endsWith("/") && configuration.getRepoValidationSuffixes("ubuntu12")[0].startsWith("/"));
     request.setBaseUrl(baseUrl);
     controller.updateRespositories(requests);
     Assert.assertEquals(baseUrl, repo.getBaseUrl());
@@ -8328,7 +8328,7 @@ public class AmbariManagementControllerTest {
 
     // variation #5: multiple suffix tests
     backingProperties.setProperty(Configuration.REPO_SUFFIX_KEY_UBUNTU, "/foo/bar.xml,/repodata/repomd.xml");
-    Assert.assertTrue(configuration.getRepoValidationSuffixes("debian12").length > 1);
+    Assert.assertTrue(configuration.getRepoValidationSuffixes("ubuntu12").length > 1);
     request.setBaseUrl(baseUrl);
     controller.updateRespositories(requests);
     Assert.assertEquals(baseUrl, repo.getBaseUrl());

+ 1 - 1
ambari-server/src/test/python/TestAmbariServer.py

@@ -1033,7 +1033,7 @@ class TestAmbariServer(TestCase):
 
 
     get_os_type_mock.return_value = OSConst.OS_UBUNTU
-    get_os_family_mock.return_value = OSConst.DEBIAN_FAMILY
+    get_os_family_mock.return_value = OSConst.UBUNTU_FAMILY
 
     firewall_obj = Firewall().getFirewallObject()
     p.communicate.return_value = ("Status: active", "err")

+ 3 - 3
ambari-server/src/test/python/TestBootstrap.py

@@ -542,15 +542,15 @@ class TestBootstrap(TestCase):
   @patch.object(SSH, "__init__")
   @patch.object(SSH, "run")
   @patch.object(HostLog, "write")
-  def test_checkSudoPackageDebian(self, write_mock, run_mock, init_mock, server_family_mock):
+  def test_checkSudoPackageUbuntu(self, write_mock, run_mock, init_mock, server_family_mock):
     shared_state = SharedState("root", "sshkey_file", "scriptDir", "bootdir",
-                               "setupAgentFile", "ambariServer", "debian12",
+                               "setupAgentFile", "ambariServer", "ubuntu12",
                                None, "8440")
     bootstrap_obj = Bootstrap("hostname", shared_state)
     expected = 42
     init_mock.return_value = None
     run_mock.return_value = expected
-    server_family_mock.return_value = ["debian", "12"]
+    server_family_mock.return_value = ["ubuntu", "12"]
     res = bootstrap_obj.checkSudoPackage()
     self.assertEquals(res, expected)
     command = str(init_mock.call_args[0][3])

+ 6 - 6
ambari-server/src/test/python/TestOSCheck.py

@@ -104,11 +104,11 @@ class TestOSCheck(TestCase):
     result = OSCheck.get_os_family()
     self.assertEquals(result, 'redhat')
 
-    # 3 - Debian
+    # 3 - Ubuntu
     mock_exists.return_value = False
     mock_linux_distribution.return_value = ('Ubuntu', '', '')
     result = OSCheck.get_os_family()
-    self.assertEquals(result, 'debian')
+    self.assertEquals(result, 'ubuntu')
 
     # 4 - Suse
     mock_exists.return_value = False
@@ -260,13 +260,13 @@ class TestOSCheck(TestCase):
       pass
 
   @patch.object(OSCheck, "get_os_family")
-  def test_is_debian_family(self, get_os_family_mock):
+  def is_ubuntu_family(self, get_os_family_mock):
 
-    get_os_family_mock.return_value = "debian"
-    self.assertEqual(OSCheck.is_debian_family(), True)
+    get_os_family_mock.return_value = "ubuntu"
+    self.assertEqual(OSCheck.is_ubuntu_family(), True)
 
     get_os_family_mock.return_value = "troll_os"
-    self.assertEqual(OSCheck.is_debian_family(), False)
+    self.assertEqual(OSCheck.is_ubuntu_family(), False)
 
   @patch.object(OSCheck, "get_os_family")
   def test_is_suse_family(self, get_os_family_mock):

+ 32 - 32
ambari-server/src/test/python/TestSetupAgent.py

@@ -88,13 +88,13 @@ class TestSetupAgent(TestCase):
 
   @patch.object(setup_agent, 'getAvaliableAgentPackageVersions')
   @patch('ambari_commons.OSCheck.is_suse_family')
-  @patch('ambari_commons.OSCheck.is_debian_family')
+  @patch('ambari_commons.OSCheck.is_ubuntu_family')
   @patch.object(setup_agent, 'findNearestAgentPackageVersion')
-  def test_returned_optimal_version_is_initial_on_suse(self, findNearestAgentPackageVersion_method, is_debian_family_method,
+  def test_returned_optimal_version_is_initial_on_suse(self, findNearestAgentPackageVersion_method, is_ubuntu_family_method,
                                                        is_suse_family_method, getAvaliableAgentPackageVersions_method):
     getAvaliableAgentPackageVersions_method.return_value = {"exitstatus": 0, "log": "1.1.1"}
     is_suse_family_method.return_value = True
-    is_debian_family_method.return_value = False
+    is_ubuntu_family_method.return_value = False
 
     projectVersion = "1.1.1"
     result_version = setup_agent.getOptimalVersion(projectVersion)
@@ -104,13 +104,13 @@ class TestSetupAgent(TestCase):
 
   @patch.object(setup_agent, 'getAvaliableAgentPackageVersions')
   @patch('ambari_commons.OSCheck.is_suse_family')
-  @patch('ambari_commons.OSCheck.is_debian_family')
+  @patch('ambari_commons.OSCheck.is_ubuntu_family')
   @patch.object(setup_agent, 'findNearestAgentPackageVersion')
-  def test_returned_optimal_version_is_initial_on_debian(self, findNearestAgentPackageVersion_method, is_debian_family_method,
+  def test_returned_optimal_version_is_initial_on_ubuntu(self, findNearestAgentPackageVersion_method, is_ubuntu_family_method,
                                                        is_suse_family_method, getAvaliableAgentPackageVersions_method):
     getAvaliableAgentPackageVersions_method.return_value = {"exitstatus": 0, "log": "1.1.1"}
     is_suse_family_method.return_value = False
-    is_debian_family_method.return_value = True
+    is_ubuntu_family_method.return_value = True
 
     projectVersion = "1.1.1"
     result_version = setup_agent.getOptimalVersion(projectVersion)
@@ -119,13 +119,13 @@ class TestSetupAgent(TestCase):
     pass
 
   @patch('ambari_commons.OSCheck.is_suse_family')
-  @patch('ambari_commons.OSCheck.is_debian_family')
+  @patch('ambari_commons.OSCheck.is_ubuntu_family')
   @patch.object(setup_agent, 'findNearestAgentPackageVersion')
   def test_returned_optimal_version_is_nearest_on_suse(self, findNearestAgentPackageVersion_method,
-                                                       is_debian_family_method,
+                                                       is_ubuntu_family_method,
                                                        is_suse_family_method):
     is_suse_family_method.return_value = True
-    is_debian_family_method.return_value = False
+    is_ubuntu_family_method.return_value = False
 
     projectVersion = ""
     nearest_version = projectVersion + "1.1.1"
@@ -140,13 +140,13 @@ class TestSetupAgent(TestCase):
     pass
 
   @patch('ambari_commons.OSCheck.is_suse_family')
-  @patch('ambari_commons.OSCheck.is_debian_family')
+  @patch('ambari_commons.OSCheck.is_ubuntu_family')
   @patch.object(setup_agent, 'findNearestAgentPackageVersion')
-  def test_returned_optimal_version_is_nearest_on_debian(self, findNearestAgentPackageVersion_method,
-                                                       is_debian_family_method,
+  def test_returned_optimal_version_is_nearest_on_ubuntu(self, findNearestAgentPackageVersion_method,
+                                                       is_ubuntu_family_method,
                                                        is_suse_family_method):
     is_suse_family_method.return_value = False
-    is_debian_family_method.return_value = True
+    is_ubuntu_family_method.return_value = True
 
     projectVersion = ""
     nearest_version = projectVersion + "1.1.1"
@@ -162,14 +162,14 @@ class TestSetupAgent(TestCase):
 
   @patch.object(setup_agent, 'getAvaliableAgentPackageVersions')
   @patch('ambari_commons.OSCheck.is_suse_family')
-  @patch('ambari_commons.OSCheck.is_debian_family')
+  @patch('ambari_commons.OSCheck.is_ubuntu_family')
   @patch.object(setup_agent, 'findNearestAgentPackageVersion')
   def test_returned_optimal_version_is_initial(self, findNearestAgentPackageVersion_method,
-                                               is_debian_family_method,
+                                               is_ubuntu_family_method,
                                                is_suse_family_method, getAvaliableAgentPackageVersions_method):
     getAvaliableAgentPackageVersions_method.return_value = {"exitstatus": 0, "log": "1.1.1"}
     is_suse_family_method.return_value = False
-    is_debian_family_method.return_value = False
+    is_ubuntu_family_method.return_value = False
 
     projectVersion = "1.1.1"
     result_version = setup_agent.getOptimalVersion(projectVersion)
@@ -179,14 +179,14 @@ class TestSetupAgent(TestCase):
 
   @patch.object(setup_agent, 'getAvaliableAgentPackageVersions')
   @patch('ambari_commons.OSCheck.is_suse_family')
-  @patch('ambari_commons.OSCheck.is_debian_family')
+  @patch('ambari_commons.OSCheck.is_ubuntu_family')
   @patch.object(setup_agent, 'findNearestAgentPackageVersion')
   def test_returned_optimal_version_is_default(self, findNearestAgentPackageVersion_method,
-                                               is_debian_family_method,
+                                               is_ubuntu_family_method,
                                                is_suse_family_method, getAvaliableAgentPackageVersions_method):
     getAvaliableAgentPackageVersions_method.return_value = {"exitstatus": 0, "log": "1.1.1"}
     is_suse_family_method.return_value = False
-    is_debian_family_method.return_value = False
+    is_ubuntu_family_method.return_value = False
     findNearestAgentPackageVersion_method.return_value = {
       "exitstatus": 0,
       "log": ["1.1.1.1", ""]
@@ -208,14 +208,14 @@ class TestSetupAgent(TestCase):
   @patch.object(setup_agent, 'configureAgent')
   @patch.object(setup_agent, 'installAgent')
   @patch('ambari_commons.OSCheck.is_suse_family')
-  @patch('ambari_commons.OSCheck.is_debian_family')
+  @patch('ambari_commons.OSCheck.is_ubuntu_family')
   @patch.object(setup_agent, 'getOptimalVersion')
   @patch.object(setup_agent, 'checkServerReachability')
   @patch("sys.exit")
   @patch("os.path.dirname")
   @patch("os.path.realpath")
   def test_setup_agent_main(self, dirname_mock, realpath_mock, exit_mock, checkServerReachability_mock,
-                            getOptimalVersion_mock, is_debian_family_mock, is_suse_family_mock,
+                            getOptimalVersion_mock, is_ubuntu_family_mock, is_suse_family_mock,
                             installAgent_mock, configureAgent_mock, runAgent_mock,
                             isAgentPackageAlreadyInstalled_mock, tryStopAgent_mock):
     installAgent_mock.return_value = {'log': 'log', 'exitstatus': 0}
@@ -231,19 +231,19 @@ class TestSetupAgent(TestCase):
     getOptimalVersion_mock.return_value = {'log': '1.1.1', 'exitstatus': 0}
     isAgentPackageAlreadyInstalled_mock.return_value = False
     is_suse_family_mock.return_value = True
-    is_debian_family_mock.return_value = False
+    is_ubuntu_family_mock.return_value = False
     setup_agent.main(("setupAgent.py","agents_host","password", "server_hostname","1.1.1","8080"))
     self.assertTrue(exit_mock.called)
     self.assertTrue(getOptimalVersion_mock.called)
     self.assertTrue(isAgentPackageAlreadyInstalled_mock.called)
     self.assertTrue(installAgent_mock.called)
     self.assertFalse(is_suse_family_mock.called)
-    self.assertFalse(is_debian_family_mock.called)
+    self.assertFalse(is_ubuntu_family_mock.called)
     exit_mock.reset_mock()
     getOptimalVersion_mock.reset_mock()
     isAgentPackageAlreadyInstalled_mock.reset_mock()
     is_suse_family_mock.reset_mock()
-    is_debian_family_mock.reset_mock()
+    is_ubuntu_family_mock.reset_mock()
     installAgent_mock.reset_mock()
 
     getOptimalVersion_mock.return_value = {'log': '', 'exitstatus': 0}
@@ -252,17 +252,17 @@ class TestSetupAgent(TestCase):
     self.assertTrue(getOptimalVersion_mock.called)
     self.assertFalse(isAgentPackageAlreadyInstalled_mock.called)
     self.assertFalse(is_suse_family_mock.called)
-    self.assertFalse(is_debian_family_mock.called)
+    self.assertFalse(is_ubuntu_family_mock.called)
 
     exit_mock.reset_mock()
     getOptimalVersion_mock.reset_mock()
     isAgentPackageAlreadyInstalled_mock.reset_mock()
     is_suse_family_mock.reset_mock()
-    is_debian_family_mock.reset_mock()
+    is_ubuntu_family_mock.reset_mock()
     installAgent_mock.reset_mock()
 
     is_suse_family_mock.return_value = False
-    is_debian_family_mock.return_value = False
+    is_ubuntu_family_mock.return_value = False
     getOptimalVersion_mock.return_value = {'log': '1.1.1', 'exitstatus': 0}
     setup_agent.main(("setupAgent.py","agents_host","password", "server_hostname","1.1.1","8080"))
     self.assertTrue(exit_mock.called)
@@ -270,7 +270,7 @@ class TestSetupAgent(TestCase):
     self.assertTrue(isAgentPackageAlreadyInstalled_mock.called)
     self.assertTrue(installAgent_mock.called)
     self.assertFalse(is_suse_family_mock.called)
-    self.assertFalse(is_debian_family_mock.called)
+    self.assertFalse(is_ubuntu_family_mock.called)
     exit_mock.reset_mock()
     getOptimalVersion_mock.reset_mock()
     isAgentPackageAlreadyInstalled_mock.reset_mock()
@@ -278,7 +278,7 @@ class TestSetupAgent(TestCase):
     getOptimalVersion_mock.reset_mock()
     isAgentPackageAlreadyInstalled_mock.reset_mock()
     is_suse_family_mock.reset_mock()
-    is_debian_family_mock.reset_mock()
+    is_ubuntu_family_mock.reset_mock()
     installAgent_mock.reset_mock()
 
     setup_agent.main(("setupAgent.py","agents_host","password", "server_hostname","{ambariVersion}","8080"))
@@ -291,7 +291,7 @@ class TestSetupAgent(TestCase):
     self.assertTrue(getOptimalVersion_mock.called)
     exit_mock.reset_mock()
     is_suse_family_mock.return_value = False
-    is_debian_family_mock.return_value = False
+    is_ubuntu_family_mock.return_value = False
     setup_agent.main(("setupAgent.py","agents_host","password", "server_hostname","null","null"))
     self.assertTrue(exit_mock.called)
     exit_mock.reset_mock()
@@ -311,7 +311,7 @@ class TestSetupAgent(TestCase):
     exit_mock.reset_mock()
     #if suse
     is_suse_family_mock.return_value = True
-    is_debian_family_mock.return_value = False
+    is_ubuntu_family_mock.return_value = False
     #if "zypper install -y ambari-agent" return not 0 result
     installAgent_mock.return_value = {'log': 'log', 'exitstatus': 1}
     try:
@@ -324,7 +324,7 @@ class TestSetupAgent(TestCase):
     exit_mock.reset_mock()
     #if ubuntu
     is_suse_family_mock.return_value = False
-    is_debian_family_mock.return_value = True
+    is_ubuntu_family_mock.return_value = True
 
     installAgent_mock.return_value = {'log': 'log', 'exitstatus': 1}
     try:

+ 3 - 3
ambari-server/src/test/python/TestUtils.py

@@ -40,9 +40,9 @@ class TestUtils(TestCase):
   def test_get_postgre_hba_dir(self, popenMock, os_path_is_fine_mock,
                                get_ubuntu_pg_version_mock):
     p = MagicMock()
-    utils.PG_HBA_INIT_FILES['debian'] = '/tmp'
+    utils.PG_HBA_INIT_FILES['ubuntu'] = '/tmp'
     get_ubuntu_pg_version_mock.return_value = '9.1'
-    self.assertEqual('/tmp/9.1/main', utils.get_postgre_hba_dir('debian'))
+    self.assertEqual('/tmp/9.1/main', utils.get_postgre_hba_dir('ubuntu'))
 
     # ## Tests depends on postgres version ###
     # 1) PGDATA=/var/lib/pgsql/data
@@ -78,7 +78,7 @@ class TestUtils(TestCase):
     utils.PG_STATUS_RUNNING_DEFAULT = "red_running"
     get_ubuntu_pg_version_mock.return_value = '9.1'
 
-    self.assertEqual('9.1/main', utils.get_postgre_running_status('debian'))
+    self.assertEqual('9.1/main', utils.get_postgre_running_status('ubuntu'))
     self.assertEqual('red_running', utils.get_postgre_running_status('redhat'))
 
   @patch('os.path.isfile')

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.1/services/GANGLIA/metainfo.xml

@@ -85,7 +85,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>gmetad</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HDFS/metainfo.xml

@@ -118,7 +118,7 @@
         </osSpecific>
 
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>libsnappy1</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.1/services/HIVE/metainfo.xml

@@ -123,7 +123,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>redhat5,redhat6,debian12</osFamily>
+          <osFamily>redhat5,redhat6,ubuntu12</osFamily>
           <packages>
             <package>
               <name>mysql-server</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.1/services/OOZIE/metainfo.xml

@@ -111,7 +111,7 @@
         </osSpecific>
 
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>extjs</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.5/services/GANGLIA/metainfo.xml

@@ -84,7 +84,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>gmetad</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml

@@ -150,7 +150,7 @@
         </osSpecific>
 
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>libsnappy1</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HIVE/metainfo.xml

@@ -134,7 +134,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>redhat5,redhat6,debian12</osFamily>
+          <osFamily>redhat5,redhat6,ubuntu12</osFamily>
           <packages>
             <package>
               <name>mysql-server</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.5/services/OOZIE/metainfo.xml

@@ -111,7 +111,7 @@
         </osSpecific>
 
         <osSpecific>
-          <osFamily>debian12</osFamily>
+          <osFamily>ubuntu12</osFamily>
           <packages>
             <package>
               <name>extjs</name>

+ 1 - 1
ambari-server/src/test/resources/stacks/HDP/2.0.7/services/HIVE/metainfo.xml

@@ -141,7 +141,7 @@
           </packages>
         </osSpecific>
         <osSpecific>
-          <osFamily>redhat5,redhat6,debian12</osFamily>
+          <osFamily>redhat5,redhat6,ubuntu12</osFamily>
           <packages>
             <package>
               <name>mysql-server</name>

+ 5 - 5
ambari-web/app/assets/data/wizard/stack/HDP_versions.json

@@ -1104,21 +1104,21 @@
       },
       "operatingSystems" : [
         {
-          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/operatingSystems/debian12",
+          "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/operatingSystems/ubuntu12",
           "OperatingSystems" : {
-            "os_type" : "debian12",
+            "os_type" : "ubuntu12",
             "stack_name" : "HDP",
             "stack_version" : "2.1"
           },
           "repositories" : [
             {
-              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/operatingSystems/debian12/repositories/HDP-2.1",
+              "href" : "http://c6401.ambari.apache.org:8080/api/v1/stacks2/HDP/versions/2.1/operatingSystems/ubuntu12/repositories/HDP-2.1",
               "Repositories" : {
                 "base_url" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.1.0",
                 "default_base_url" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.1.0",
                 "latest_base_url" : "http://s3.amazonaws.com/dev.hortonworks.com/HDP/ubuntu12/2.x/updates/2.1.1.0",
                 "mirrors_list" : null,
-                "os_type" : "debian12",
+                "os_type" : "ubuntu12",
                 "repo_id" : "HDP-2.1",
                 "repo_name" : "HDP",
                 "stack_name" : "HDP",
@@ -1448,4 +1448,4 @@
       ]
     }
   ]
-}
+}

+ 1 - 1
ambari-web/app/controllers/installer.js

@@ -342,7 +342,7 @@ App.InstallerController = App.WizardController.extend({
             os.repositories.forEach(function (repo) {
               var defaultBaseUrl = repo.Repositories.default_base_url || repo.Repositories.base_url;
               var latestBaseUrl = repo.Repositories.latest_base_url || defaultBaseUrl;
-              if (!App.supports.ubuntu && os.OperatingSystems.os_type == 'debian12') return; // @todo: remove after Ubuntu support confirmation
+              if (!App.supports.ubuntu && os.OperatingSystems.os_type == 'ubuntu12') return; // @todo: remove after Ubuntu support confirmation
               oses.push({
                 osType: os.OperatingSystems.os_type,
                 baseUrl: latestBaseUrl,

+ 1 - 1
ambari-web/app/controllers/main/admin/repositories.js

@@ -95,7 +95,7 @@ App.MainAdminRepositoriesController = Em.Controller.extend({
   loadRepositoriesSuccessCallback: function (data) {
     var allRepos = [];
     data.items.forEach(function (os) {
-      if (!App.get('supports.ubuntu') && os.OperatingSystems.os_type == 'debian12') return; // @todo: remove after Ubuntu support confirmation
+      if (!App.get('supports.ubuntu') && os.OperatingSystems.os_type == 'ubuntu12') return; // @todo: remove after Ubuntu support confirmation
       os.repositories.forEach(function (repository) {
         var osType = repository.Repositories.os_type;
         var repo = Em.Object.create({

+ 1 - 1
ambari-web/app/controllers/wizard/step3_controller.js

@@ -1146,7 +1146,7 @@ App.WizardStep3Controller = Em.Controller.extend({
         return ["redhat5", "centos5", "oraclelinux5", "rhel5"];
       case "suse11":
         return ["suse11", "sles11", "opensuse11"];
-      case "debian12":
+      case "ubuntu12":
         return ["debian12", "ubuntu12"];
       default:
         return [];

+ 1 - 1
ambari-web/app/controllers/wizard/step8_controller.js

@@ -606,7 +606,7 @@ App.WizardStep8Controller = Em.Controller.extend(App.AddSecurityConfigs, {
   loadRepoInfoSuccessCallback: function (data) {
     var allRepos = [];
     data.items.forEach(function (os) {
-      if (!App.get('supports.ubuntu') && os.OperatingSystems.os_type == 'debian12') return; // @todo: remove after Ubuntu support confirmation
+      if (!App.get('supports.ubuntu') && os.OperatingSystems.os_type == 'ubuntu12') return; // @todo: remove after Ubuntu support confirmation
       os.repositories.forEach(function (repository) {
         allRepos.push(Em.Object.create({
           base_url: repository.Repositories.base_url,