Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-41188

Satellite UI Displays Wrong Number of Hosts When Filter By Report Origin (Puppet , Ansible)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • 6.18.z, 6.19.0
    • 6.18.1
    • Hosts
    • 2
    • False
    • Proton Sprint 10
    • sat-proton
    • None
    • None
    • None
    • None
    • Yes

      Description of problem:

      The UI is no longer displaying the correct number of Hosts from the Hosts => All Hosts page when you search for origin = Puppet (or Ansible) in the filter box.

      The UI grabs the correct number of hosts, however, when it displays the hosts, it is looking at the number of reports per host to display, and not the hosts themselves. If the first host has more reports then the number of hosts per page, then the UI will only display that 1 host, even though there should be 50 hosts displayed.

       This was first noticed when clicking on the reports from the Dashboard page for the Host Configuration Chart for Puppet report.

      How reproducible:
      always when the number of reports of the hosts are higher than the hosts per page
       

      Is this issue a regression from an earlier version:
      Yes, this was working in 6.17, and in 6.18 it is a regression.
       

      Steps to Reproduce:

      1. Depending on the size of your environment, you may need to determine which host is listed in the UI first, and make sure you modify the reports for that host. This will cause the UI to not load/display any of the hosts after that host.

      2. Navigate to Hosts => All Hosts and type "origin = Puppet* in the filter box. If there is more than 1 host listed, you can just edit the reports for the first host listed. If no hosts are listed, you can just create Puppet reports for 2 random hosts.

      3a. If you don't have any hosts listed in the UI, find 2 hosts ids, and use them in the commands below. I used the ids 10 and 20 for my hosts in my tests below:

      for i in $(seq 0 51); do su - postgres -c "psql -d foreman -c \"insert into reports (id, host_id, origin, reported_at) values ('1000$i','10','Puppet','2025-12-05 17:27:37')\""; done
      
      for i in $(seq 0 51); do su - postgres -c "psql -d foreman -c \"insert into reports (id, host_id, origin, reported_at) values ('2000$i','20','Puppet','2025-12-05 17:27:37')\""; done
      

      3b. If there were hosts listed, you can just added some extra report entries for the first host listed. Find that host's id, and use it in the following command from Satellite (in the following example the host id is 30):

      for i in $(seq 0 51); do su - postgres -c "psql -d foreman -c \"insert into reports (id, host_id, origin, reported_at) values ('2000$i','30','Puppet','2025-12-05 17:27:37')\""; done
      

      4. Navigate to Hosts => All Hosts and type origin = Puppet in the filter box

      Actual behavior:
      Only the first host will get listed in the UI display, even though the count per page shows more hosts

      Expected behavior:
      The UI should display all of the hosts listed, and not just 1 host

      Business Impact / Additional info:
      UI isn't working correctly
       

              rh-ee-nalfassi Nofar Kirshon
              rhn-support-myoder Michael Yoder
              Ladislav Vasina Ladislav Vasina
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: