Bug 1894441

Summary: Actions::Katello::RepositorySet::ScanCdn is not returning consistent output.
Product: Red Hat Satellite Reporter: Rares Donca <rdonca>
Component: RepositoriesAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED DUPLICATE QA Contact: Stephen Wadeley <swadeley>
Severity: high Docs Contact:
Priority: high    
Version: 6.8.0CC: hyu, jpasqual, jsherril, ktordeur, mschibli, rbertolj, wpinheir
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-11-12 21:14:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Rares Donca 2020-11-04 09:45:01 UTC
Description of problem:

ScanCDN task ('Actions::Katello::RepositorySet::ScanCdn') does not provide reliable output. 

Version-Release number of selected component (if applicable):

katello-3.16.0-1.el7sat.noarch


How reproducible:
All the time


Steps to Reproduce:

Install Satellite 6.8 according to official documentation. 
Select the Red Hat Repositories page
Select one or more products to have their repositories loaded
This is sometimes reporting 'no repositories available', partial list of repos or full list of repos. 
Alternatively using redhat.satellite ansible collection to configure Satellite 6.8 is generating the ScanCDN which are not reliable and thus the ansbile tasks are failing. 

Actual results:

Raw output:
{
  "results": []
}


Expected results:

Raw output:
{
  "results": [
    {
      "substitutions": {
        "releasever": "7.0",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.0/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.0",
      "pulp_id": "d8db98e0-62b3-486a-acd9-aa60fcc61042",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.1",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.1/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.1",
      "pulp_id": "4b812c0f-4198-435f-885d-041a5d5c3a9c",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.2",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.2/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.2",
      "pulp_id": "b1f93056-3b2f-494c-878f-b0706e4c5488",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.4",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.4/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4",
      "pulp_id": "b738795f-9826-4161-99f6-3267e8708fb4",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.5",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.5/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.5",
      "pulp_id": "541f9330-32d1-4a4d-9521-acebf1b73eb8",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.6",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.6/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.6",
      "pulp_id": "b25d81b6-405a-4b37-8e5f-1808ea4fd93c",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.7",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.7/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.7",
      "pulp_id": "3b419e18-55de-470a-9b94-fbfbdb64149e",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.8",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.8/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.8",
      "pulp_id": "607f0559-47b5-40ff-b634-fe67b868369e",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7Server",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7Server/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server",
      "pulp_id": "983a3943-92b3-4697-9a4f-aaec557fc290",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": true,
      "promoted": false,
      "repository_id": 1
    }
  ]
}


Additional info:


Below are two raw outputs of Actions::Katello::RepositorySet::ScanCdn. The input is the same and output is sometimes missing completely, sometime is just partial, sometime I get the full expected ouput.  

Id:a4552b69-3c60-4d27-9591-425c81df2364
Label:Actions::Katello::RepositorySet::ScanCdn
Duration:5 seconds
Raw input:
{
  "product_id": 138,
  "content_id": "2456",
  "remote_user": "admin",
  "remote_cp_user": "admin",
  "current_request_id": null,
  "current_timezone": "UTC",
  "current_user_id": 4,
  "current_organization_id": 1,
  "current_location_id": null
}
Raw output:
{
  "results": []
}
External Id:3fa93028-3a75-4e7e-8d80-0fc3b2832581 


Id:d177a57d-472c-4a2f-886c-435ab85fa31b
Label:Actions::Katello::RepositorySet::ScanCdn
Duration:6 seconds
Raw input:
{
  "product_id": 138,
  "content_id": "2456",
  "remote_user": "admin",
  "remote_cp_user": "admin",
  "current_request_id": null,
  "current_timezone": "UTC",
  "current_user_id": 4,
  "current_organization_id": 1,
  "current_location_id": null
}
Raw output:
{
  "results": [
    {
      "substitutions": {
        "releasever": "7.0",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.0/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.0",
      "pulp_id": "d8db98e0-62b3-486a-acd9-aa60fcc61042",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.1",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.1/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.1",
      "pulp_id": "4b812c0f-4198-435f-885d-041a5d5c3a9c",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.2",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.2/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.2",
      "pulp_id": "b1f93056-3b2f-494c-878f-b0706e4c5488",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.4",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.4/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.4",
      "pulp_id": "b738795f-9826-4161-99f6-3267e8708fb4",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.5",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.5/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.5",
      "pulp_id": "541f9330-32d1-4a4d-9521-acebf1b73eb8",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.6",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.6/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.6",
      "pulp_id": "b25d81b6-405a-4b37-8e5f-1808ea4fd93c",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.7",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.7/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.7",
      "pulp_id": "3b419e18-55de-470a-9b94-fbfbdb64149e",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7.8",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7.8/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7.8",
      "pulp_id": "607f0559-47b5-40ff-b634-fe67b868369e",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": false,
      "promoted": false,
      "repository_id": null
    },
    {
      "substitutions": {
        "releasever": "7Server",
        "basearch": "x86_64"
      },
      "path": "/content/dist/rhel/server/7/7Server/x86_64/os",
      "repo_name": "Red Hat Enterprise Linux 7 Server RPMs x86_64 7Server",
      "pulp_id": "983a3943-92b3-4697-9a4f-aaec557fc290",
      "name": "Red Hat Enterprise Linux 7 Server (RPMs)",
      "enabled": true,
      "promoted": false,
      "repository_id": 1
    }
  ]
}

External Id:5080001e-b682-4cb6-a9cf-822db7641e25

Comment 6 Justin Sherrill 2020-11-12 21:14:53 UTC

*** This bug has been marked as a duplicate of bug 1882690 ***