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

API: filtering by hostname does not work properly

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 1.6.1
    • 1.6.1
    • ambari-web
    • None

    Description

      /api/v1/clusters/c1/hosts?page_size=25&from=10&Hosts/host_name.matches(.1002.)&fields=Hosts/host_name,Hosts/maintenance_state,Hosts/public_host_name,Hosts/cpu_count,Hosts/ph_cpu_count,Hosts/total_mem,Hosts/host_status,Hosts/last_heartbeat_time,Hosts/os_arch,Hosts/os_type,Hosts/ip,host_components/HostRoles/state,host_components/HostRoles/maintenance_state,host_components/HostRoles/stale_configs,host_components/HostRoles/service_name,metrics/disk,metrics/load/load_one,metrics/cpu/cpu_system,metrics/cpu/cpu_user,metrics/memory/mem_total,metrics/memory/mem_free,alerts/summary&minimal_response=true

      The above should have given one matching host.
      The API response was:

      {
        "itemTotal" : "1",
        "items" : [ ]
      }
      

      The total count is correct, but the response was empty.

      Also, this call took more than 40 seconds on the 2k-node cluster.

      Attachments

        1. AMBARI-6308_branch-1.6.1.patch
          3 kB
          Andrii Tkach
        2. AMBARI-6308.patch
          3 kB
          Andrii Tkach

        Activity

          People

            atkach Andrii Tkach
            atkach Andrii Tkach
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: