Uploaded image for project: 'Ambari'
  1. Ambari
  2. AMBARI-8620

weird directory suggestions upon Docker containers

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0
    • Fix Version/s: 2.1.0
    • Component/s: ambari-web
    • Labels:

      Description

      Ambari cluster install wizard recommends some directory settings (NameNode directories, ZooKeep directory etc.) based upon directories mounted on LInux system.

      The recommendation has some good logic, briefly
      1. hit cluster API e.g. http://host:8080/api/v1/clusters/cluster1/hosts/agent1.mydomain.com

      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com",
      Hosts: {
      cluster_name: "aaa",
      cpu_count: 8,
      disk_info: [
      {
      available: "5911904",
      used: "3737524",
      percent: "39%",
      size: "10190100",
      type: "rootfs",
      mountpoint: "/"
      },
      {
      available: "5911904",
      used: "3737524",
      percent: "39%",
      size: "10190100",
      type: "ext4",
      mountpoint: "/"
      },
      {
      available: "4005892",
      used: "0",
      percent: "0%",
      size: "4005892",
      type: "tmpfs",
      mountpoint: "/dev"
      },
      {
      available: "65536",
      used: "0",
      percent: "0%",
      size: "65536",
      type: "tmpfs",
      mountpoint: "/dev/shm"
      },
      {
      available: "22421136",
      used: "15874140",
      percent: "42%",
      size: "38295276",
      type: "xfs",
      mountpoint: "/etc/resolv.conf"
      },
      {
      available: "22421136",
      used: "15874140",
      percent: "42%",
      size: "38295276",
      type: "xfs",
      mountpoint: "/etc/hostname"
      },
      {
      available: "22421136",
      used: "15874140",
      percent: "42%",
      size: "38295276",
      type: "xfs",
      mountpoint: "/etc/hosts"
      }
      ],
      host_health_report: "",
      host_name: "agent1.mydomain.com",
      host_state: "HEALTHY",
      host_status: "UNHEALTHY",
      ip: "172.17.0.8",
      last_agent_env: {
      stackFoldersAndFiles: [ ],
      alternatives: [ ],
      existingUsers: [ ],
      existingRepos: [
      "unable_to_determine"
      ],
      installedPackages: [ ],
      hostHealth: {
      activeJavaProcs: [ ],
      agentTimeStampAtReporting: 1418160197099,
      serverTimeStampAtReporting: 1418160197173,
      liveServices: [
      {
      desc: "ntpd is stopped ",
      name: "ntpd",
      status: "Unhealthy"
      }
      ]
      },
      umask: 18,
      transparentHugePage: "",
      iptablesIsRunning: true,
      reverseLookup: true
      },
      last_heartbeat_time: 1418160197173,
      last_registration_time: 1418097149332,
      maintenance_state: "OFF",
      os_arch: "x86_64",
      os_type: "centos6",
      ph_cpu_count: 8,
      public_host_name: "agent1.mydomain.com",
      rack_info: "/default-rack",
      total_mem: 8011788,
      desired_configs: {
      capacity-scheduler: {
      default: "version1"
      },
      cluster-env: {
      default: "version1"
      },
      core-site: {
      default: "version1"
      },
      ganglia-env: {
      default: "version1"
      },
      hadoop-env: {
      default: "version1"
      },
      hadoop-policy: {
      default: "version1"
      },
      hdfs-log4j: {
      default: "version1"
      },
      hdfs-site: {
      default: "version1"
      },
      mapred-env: {
      default: "version1"
      },
      mapred-site: {
      default: "version1"
      },
      nagios-env: {
      default: "version1"
      },
      pig-env: {
      default: "version1"
      },
      pig-log4j: {
      default: "version1"
      },
      pig-properties: {
      default: "version1"
      },
      tez-env: {
      default: "version1"
      },
      tez-site: {
      default: "version1"
      },
      yarn-env: {
      default: "version1"
      },
      yarn-log4j: {
      default: "version1"
      },
      yarn-site: {
      default: "version1"
      },
      zoo.cfg: {
      default: "version1"
      },
      zookeeper-env: {
      default: "version1"
      },
      zookeeper-log4j: {
      default: "version1"
      }
      }
      },
      host_components: [
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/DATANODE",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "DATANODE",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/GANGLIA_MONITOR",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "GANGLIA_MONITOR",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/GANGLIA_SERVER",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "GANGLIA_SERVER",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/HDFS_CLIENT",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "HDFS_CLIENT",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/MAPREDUCE2_CLIENT",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "MAPREDUCE2_CLIENT",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/NAGIOS_SERVER",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "NAGIOS_SERVER",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/NAMENODE",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "NAMENODE",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/NODEMANAGER",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "NODEMANAGER",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/PIG",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "PIG",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/SPARK_CLIENT",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "SPARK_CLIENT",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/TEZ_CLIENT",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "TEZ_CLIENT",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/YARN_CLIENT",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "YARN_CLIENT",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/ZOOKEEPER_CLIENT",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "ZOOKEEPER_CLIENT",
      host_name: "agent1.mydomain.com"
      }
      },
      {
      href: "http://ambari_automation_centos7:8080/api/v1/clusters/aaa/hosts/agent1.mydomain.com/host_components/ZOOKEEPER_SERVER",
      HostRoles: {
      cluster_name: "aaa",
      component_name: "ZOOKEEPER_SERVER",
      host_name: "agent1.mydomain.com"
      }
      }
      ]
      }
      

      2. Filter out "/", "/home", "/boot"
      3. Filter out devtmpfs, tmpfs vboxsf

      The problem is, upon docker environment, some directories is concatenated with xfs mounts Docker uses
      e.g. /etc/resolv.conf, /etc/hostname
      Thus, recommended directory paths are weird
      e.g.
      /etc/resolv.conf/hadoop/hdfs/namenode
      /etc/hostname/hadoop/hdfs/namenode
      /etc/hosts/hadoop/hdfs/namenode

      1. AMBARI-8620.patch
        1 kB
        Luciano Resende
      2. screenshot-1.png
        74 kB
        jun aoki
      3. screenshot-2.png
        75 kB
        jun aoki

        Activity

        Hide
        hudson Hudson added a comment -

        ABORTED: Integrated in Ambari-trunk-Commit #2073 (See https://builds.apache.org/job/Ambari-trunk-Commit/2073/)
        AMBARI-8620. weird directory suggestions upon Docker containers (alexantonenko) (hiveww: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d4607e5f14a5c803f20da4f6dbebb66a06471883)

        • ambari-web/app/models/service_config.js
        Show
        hudson Hudson added a comment - ABORTED: Integrated in Ambari-trunk-Commit #2073 (See https://builds.apache.org/job/Ambari-trunk-Commit/2073/ ) AMBARI-8620 . weird directory suggestions upon Docker containers (alexantonenko) (hiveww: http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=d4607e5f14a5c803f20da4f6dbebb66a06471883 ) ambari-web/app/models/service_config.js
        Hide
        aantonenko Antonenko Alexander added a comment -

        Committed to trunk

        Show
        aantonenko Antonenko Alexander added a comment - Committed to trunk
        Show
        aantonenko Antonenko Alexander added a comment - +1 from https://reviews.apache.org/r/32170/
        Hide
        luciano resende Luciano Resende added a comment -

        I definitely need a committer to submit the code.

        Show
        luciano resende Luciano Resende added a comment - I definitely need a committer to submit the code.
        Hide
        aantonenko Antonenko Alexander added a comment -

        Luciano Resende If you wanna, I can assign this ticket on myself and commit this patch.

        Show
        aantonenko Antonenko Alexander added a comment - Luciano Resende If you wanna, I can assign this ticket on myself and commit this patch.
        Hide
        aantonenko Antonenko Alexander added a comment -

        I agree that there is not much risk, but 2.0 is in "blockers only" mode. We commit only blockers to 2.0 branch. So I think, as this is minor fix, we should go with fix version 2.1 for it.

        cc Yusaku Sako

        Show
        aantonenko Antonenko Alexander added a comment - I agree that there is not much risk, but 2.0 is in "blockers only" mode. We commit only blockers to 2.0 branch. So I think, as this is minor fix, we should go with fix version 2.1 for it. cc Yusaku Sako
        Hide
        luciano resende Luciano Resende added a comment -

        This is minor fix, without much risk, so if you guys agree to have it in 2.0 it would be good, otherwise 2.1 would be ok.

        btw, I checked and i can make the change in other projects, but not in Ambari. AFAIK, I would need to be added to the contributor/dev group of this project in JIRA to be able to change it myself.

        Show
        luciano resende Luciano Resende added a comment - This is minor fix, without much risk, so if you guys agree to have it in 2.0 it would be good, otherwise 2.1 would be ok. btw, I checked and i can make the change in other projects, but not in Ambari. AFAIK, I would need to be added to the contributor/dev group of this project in JIRA to be able to change it myself.
        Hide
        aantonenko Antonenko Alexander added a comment -

        Luciano Resende Seems like you do not have rights for such changes. fix version is 2.1 ?

        Show
        aantonenko Antonenko Alexander added a comment - Luciano Resende Seems like you do not have rights for such changes. fix version is 2.1 ?
        Hide
        luciano resende Luciano Resende added a comment -

        BTW, I can't seem to be able to update the fix version, and assign this to myself.

        Show
        luciano resende Luciano Resende added a comment - BTW, I can't seem to be able to update the fix version, and assign this to myself.
        Hide
        luciano resende Luciano Resende added a comment -

        The excluded mounts on this patch excludes the default mount points that docker exposed to some hosts configuration files/folders, and we certainly don't want to use those during installation. Having said that, users can define their own specific docker volumes and those might be valid for installation (e.g. I want to mount /foo/hdp that I want to use for hdp installation).

        Show
        luciano resende Luciano Resende added a comment - The excluded mounts on this patch excludes the default mount points that docker exposed to some hosts configuration files/folders, and we certainly don't want to use those during installation. Having said that, users can define their own specific docker volumes and those might be valid for installation (e.g. I want to mount /foo/hdp that I want to use for hdp installation).
        Hide
        vijikarthi Vijay Srinivasaraghavan added a comment -

        The patch contains only the default mount points that docker exposes. However, if the docker container is created with additional volumes, then those will also be listed as available path. I think the ideal fix will be to inspect the docker container for all mount points including shared volumes instead of going with the hardcoded set of values.

        Show
        vijikarthi Vijay Srinivasaraghavan added a comment - The patch contains only the default mount points that docker exposes. However, if the docker container is created with additional volumes, then those will also be listed as available path. I think the ideal fix will be to inspect the docker container for all mount points including shared volumes instead of going with the hardcoded set of values.
        Hide
        aantonenko Antonenko Alexander added a comment -

        We need to be sure where we wanna apply this patch.

        Show
        aantonenko Antonenko Alexander added a comment - We need to be sure where we wanna apply this patch.
        Hide
        aantonenko Antonenko Alexander added a comment -

        Luciano Resende, jun aoki I don't see fix version. Please specify fix version, so I can tell if it fits for that version/branch.

        Show
        aantonenko Antonenko Alexander added a comment - Luciano Resende , jun aoki I don't see fix version. Please specify fix version, so I can tell if it fits for that version/branch.
        Hide
        hadoopqa Hadoop QA added a comment -

        -1 overall. Here are the results of testing the latest attachment
        http://issues.apache.org/jira/secure/attachment/12704960/AMBARI-8620.patch
        against trunk revision .

        +1 @author. The patch does not contain any @author tags.

        -1 tests included. The patch doesn't appear to include any new or modified tests.
        Please justify why no new tests are needed for this patch.
        Also please list what manual steps were performed to verify this patch.

        +1 javac. The applied patch does not increase the total number of javac compiler warnings.

        +1 release audit. The applied patch does not increase the total number of release audit warnings.

        +1 core tests. The patch passed unit tests in .

        Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/2068//testReport/
        Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/2068//console

        This message is automatically generated.

        Show
        hadoopqa Hadoop QA added a comment - -1 overall . Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12704960/AMBARI-8620.patch against trunk revision . +1 @author . The patch does not contain any @author tags. -1 tests included . The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. +1 javac . The applied patch does not increase the total number of javac compiler warnings. +1 release audit . The applied patch does not increase the total number of release audit warnings. +1 core tests . The patch passed unit tests in . Test results: https://builds.apache.org/job/Ambari-trunk-test-patch/2068//testReport/ Console output: https://builds.apache.org/job/Ambari-trunk-test-patch/2068//console This message is automatically generated.
        Hide
        luciano resende Luciano Resende added a comment -

        Patch to exclude docker specific mount points and avoid weird configuration suggestions when deploying ambari in docker.

        Show
        luciano resende Luciano Resende added a comment - Patch to exclude docker specific mount points and avoid weird configuration suggestions when deploying ambari in docker.
        Hide
        coderigo Rodrigo Martell added a comment -

        I have recently discovered this issue too. Since it's running in a Docker container I tried looking for hdfs-site.xml (multiple ones) and baking the preferences in there but I don't know that that's where AmbariWeb looks. I suspect this might be somewhere in the AmbariWeb API logic. If I'd knew where to start I'd take a look. For the moment, I must go replace /etc/resolv.conf with /etc/resolv.conf.hdp to get the install to work in Docker containers. Will be watching the issue and happy to help where I can :+D.

        Show
        coderigo Rodrigo Martell added a comment - I have recently discovered this issue too. Since it's running in a Docker container I tried looking for hdfs-site.xml (multiple ones) and baking the preferences in there but I don't know that that's where AmbariWeb looks. I suspect this might be somewhere in the AmbariWeb API logic. If I'd knew where to start I'd take a look. For the moment, I must go replace /etc/resolv.conf with /etc/resolv.conf.hdp to get the install to work in Docker containers. Will be watching the issue and happy to help where I can :+D.

          People

          • Assignee:
            luciano resende Luciano Resende
            Reporter:
            jaoki jun aoki
          • Votes:
            1 Vote for this issue
            Watchers:
            11 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development