Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refreshing ACS complains about invalid remote URL #2667

Closed
ianballou opened this issue Jul 25, 2022 · 6 comments · Fixed by #2676
Closed

Refreshing ACS complains about invalid remote URL #2667

ianballou opened this issue Jul 25, 2022 · 6 comments · Fixed by #2676

Comments

@ianballou
Copy link
Contributor

Version
Katello nightly
Pulpcore 3.18.5
pulp-rpm 3.17.5

Describe the bug
I created an alternate content source with the following RH CDN path: https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/advanced-virt/os

At refresh time, I saw the following error:

{
  "pulp_href": "/pulp/api/v3/tasks/fa96f3a4-1b2b-4530-a0b4-b6adf4fdc3e5/",
  "pulp_created": "2022-07-25T21:03:44.164063Z",
  "state": "failed",
  "name": "pulp_rpm.app.tasks.synchronizing.synchronize",
  "logging_cid": "660e71d7-6c15-4dda-a381-b2f9f19ca743",
  "started_at": "2022-07-25T21:03:44.196268Z",
  "finished_at": "2022-07-25T21:03:44.441820Z",
  "error": {
    "traceback": "  File \"/usr/local/lib/python3.9/site-packages/pulpcore/tasking/pulpcore_worker.py\", line 410, in _perform_task\n    result = func(*args, **kwargs)\n  File \"/usr/lib/python3.9/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 464, in synchronize\n    remote_url = fetch_remote_url(remote, url)\n  File \"/usr/lib/python3.9/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 292, in fetch_remote_url\n    raise ValueError(\n",
    "description": "Remote URL https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/advanced-virt/os for Alternate Content Source is invalid"
  },
  "worker": "/pulp/api/v3/workers/1591cc69-60de-4f06-b566-5ff37311759f/",
  "parent_task": null,
  "child_tasks": [],
  "task_group": "/pulp/api/v3/task-groups/ba681a0b-44fc-4390-bbe7-a13434ad2a18/",
  "progress_reports": [],
  "created_resources": [],
  "reserved_resources_record": [
    "shared:/pulp/api/v3/acs/rpm/rpm/e69b2e9f-22f6-4310-9265-64fcb8bc586b/",
    "shared:/pulp/api/v3/remotes/rpm/rpm/43c602fd-305d-4765-8695-42c792ec0b84/"
  ]
}

To Reproduce
Steps to reproduce the behavior:

  1. Create an ACS with the appropriate remote configuration to sync the repository above.
  2. Refresh the ACS

Expected behavior
The ACS refreshes without error.

Additional context
Remote options:

{:tls_validation=>true,
 :name=>"Advanced_Virtualization_for_RHEL_8_x86_64_RPMs-12300",
 :url=>"https://cdn.redhat.com/content/dist/layered/rhel8/x86_64/advanced-virt/os",
 :proxy_url=>nil,
 :proxy_username=>nil,
 :proxy_password=>nil,
 :total_timeout=>3600,
 :connect_timeout=>60,
 :sock_connect_timeout=>60,
 :sock_read_timeout=>3600,
 :rate_limit=>0,
 :username=>nil,
 :password=>nil,
 :client_cert=> 'redacted',
 :client_key=>'redacted',
 :ca_cert=>'redacted',
 :policy=>"on_demand"
}
@dralley
Copy link
Contributor

dralley commented Jul 26, 2022

@pavelpicka This would be a good issue to look at

@ianballou Is there / will there be a BZ to go along with this?

@ianballou
Copy link
Contributor Author

@dralley I can make a BZ

@ianballou
Copy link
Contributor Author

@ianballou
Copy link
Contributor Author

Here's the matching ACS config:

{
  "pulp_href": "/pulp/api/v3/acs/rpm/rpm/a7cf54c3-361d-47b5-89a3-81e9a01f8191/",
  "pulp_created": "2022-07-25T21:03:36.922928Z",
  "name": "Simplified_UI_Test-https://centos8-katello-devel-2.cannolo.example.com:9090-6135",
  "last_refreshed": null,
  "paths": [
    ""
  ],
  "remote": "/pulp/api/v3/remotes/rpm/rpm/581b1251-50ef-45e7-8614-b56ac62a72bf/"
}

@ianballou
Copy link
Contributor Author

I was able to refresh the ACS after updating CDN entitlement information. During a repo sync with the same remote, I got a 403 which essentially told me to refresh my manifest in Katello. Perhaps the ACS task should do something similar rather than say that the URL is invalid?

@dralley
Copy link
Contributor

dralley commented Jul 26, 2022

Sounds like an error message that can be improved -- but great news, it sounds like it's not a "bug" exactly.

pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Jul 28, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: pulp#2667
pulp#2667
pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Jul 28, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: pulp#2667
pulp#2667
pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Jul 28, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: pulp#2667
pulp#2667
pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Jul 28, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: pulp#2667
pulp#2667
pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Jul 28, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: pulp#2667
pulp#2667
pavelpicka added a commit to pavelpicka/pulp_rpm that referenced this issue Jul 28, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: pulp#2667
pulp#2667
dralley pushed a commit that referenced this issue Jul 29, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: #2667
#2667
patchback bot pushed a commit that referenced this issue Jul 29, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: #2667
#2667
(cherry picked from commit 85f9af5)
dralley pushed a commit that referenced this issue Aug 1, 2022
Improved error message for Alternate Content Source refresh when it has
insufficient permissions.

closes: #2667
#2667
(cherry picked from commit 85f9af5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants