Uploaded image for project: 'Satellite'
  1. Satellite
  2. SAT-26835 Repo discovery returns all repos hosted at the provided url
  3. SAT-26840

[DEV] Repo discovery returns all repos hosted at the provided url

XMLWordPrintable

    • Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: Normal Normal
    • None
    • 6.16.0
    • Repositories
    • Sprint 137, Sprint 138, Sprint 139, Sprint 140, Sprint 141

      Description of problem:

      When we trigger repo discovery via API and provide url of particular repo, all repos hosted there are returned in the Discover task instead.

       

      How reproducible:

      Always

       

      Is this issue a regression from an earlier version:

      Yes

       

      Steps to Reproduce:

      1. Run test id 38df5479-9127-49f3-a30e-26b33655971a and watch it fail.

      or

      1. Trigger the discover task via API

      [root@sat ~]# curl -sku admin:changeme -H "Content-type: application/json" -X POST -d '{"id": 5, "url": "http://myfixturehost.redhat.com/repo_discovery", "content_type": "yum"}' https://$(hostname)/katello/api/organizations/5/repo_discover | jq
      {
        "id": "1f5d7e26-9c64-4a3c-a955-39becd16430e",
        "label": "Actions::Katello::Repository::Discover",
        "pending": true,
        "action": "Discover",
        "username": "admin",
        "started_at": "2024-07-29 13:55:12 UTC",
        "ended_at": null,
        "state": "planned",
        "result": "pending",
        "progress": 0.0,
        "input":

      {     "url": "http://myfixturehost.redhat.com/repo_discovery",     "content_type": "yum",     "upstream_username": null,     "upstream_password": null,     "search": "*",     "current_request_id": "822debf7-7f9c-4c81-905c-f3c96a808722",     "current_timezone": "UTC",     "current_organization_id": null,     "current_location_id": null,     "current_user_id": 4   }

      ,
        "output": [],
        "humanized":

      {     "action": "Discover",     "input": [],     "output": "",     "errors": []   }

      ,
        "cli_example": null,
        "start_at": "2024-07-29 13:55:12 UTC",
        "available_actions":

      {     "cancellable": false,     "resumable": false   }

      }

      2. Check the task result

      [root@sat ~]# curl -sku admin:changeme -H "Content-type: application/json" -X GET https://$(hostname)/foreman_tasks/api/tasks/1f5d7e26-9c64-4a3c-a955-39becd16430e | jq

      {
        "id": "1f5d7e26-9c64-4a3c-a955-39becd16430e",
        "label": "Actions::Katello::Repository::Discover",
        "pending": false,
        "action": "Discover",
        "username": "admin",
        "started_at": "2024-07-29 13:55:12 UTC",
        "ended_at": "2024-07-29 13:55:21 UTC",
        "duration": "8.277642",
        "state": "stopped",
        "result": "success",
        "progress": 1.0,
        "input":

      {     "url": "http://myfixturehost.redhat.com/repo_discovery",     "content_type": "yum",     "upstream_username": null,     "upstream_password": null,     "search": "*",     "current_request_id": "822debf7-7f9c-4c81-905c-f3c96a808722",     "current_timezone": "UTC",     "current_organization_id": null,     "current_location_id": null,     "current_user_id": 4   }

      ,
        "output": [
          "http://myfixturehost.redhat.com/repo_discovery/fakerepo01/",
          "http://myfixturehost.redhat.com/repo_discovery/fakerepo01/",
          "http://myfixturehost.redhat.com/fake_yum0/",
          "http://myfixturehost.redhat.com/fake_yum1/",
          "http://myfixturehost.redhat.com/fake_yum2/",
          ...
        ],
        "humanized":

      {     "action": "Discover",     "input": [],     "output": "",     "errors": []   }

      ,
        "cli_example": null,
        "start_at": "2024-07-29 13:55:12 UTC",
        "available_actions":

      {     "cancellable": false,     "resumable": false   }

      }

       

      Actual behavior:
      Returns all repos on that host.

       

      Expected behavior:
      Should return just the one we are looking for.

       

      Business Impact / Additional info:

      Low

      DEV Tracker for https://issues.redhat.com/browse/SAT-26835

            rhn-engineering-sajha Samir Jha
            satellite-jira-automation@redhat.com Satellite Jira-Automation
            Ian Ballou Ian Ballou
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: