Project

Profile

Help

Issue #9071

Getting 500 error while accessing pulp/content/reponame/config.repo

Added by gerogeeg 2 months ago. Updated 2 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 101
Quarter:

Description

I am trying to use auto-publish feature for an RPM repository. I am passing repo href in distribution and keeping publication as NULL. But after that getting an internal server error 500 for config.repo file.

journalctl log states this

Jul 13 04:20:44 pulptest008 gunicorn[1184]: [2021-07-13 11:20:44 +0000] [1703] [ERROR] Error handling request
Jul 13 04:20:44 pulptest008 gunicorn[1184]: Traceback (most recent call last):
Jul 13 04:20:44 pulptest008 gunicorn[1184]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/web_protocol.py", line 422, in _handle_request
Jul 13 04:20:44 pulptest008 gunicorn[1184]: resp = await self._request_handler(request)
Jul 13 04:20:44 pulptest008 gunicorn[1184]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/aiohttp/web_app.py", line 499, in _handle
Jul 13 04:20:44 pulptest008 gunicorn[1184]: resp = await handler(request)
Jul 13 04:20:44 pulptest008 gunicorn[1184]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cache/cache.py", line 169, in cached_function
Jul 13 04:20:44 pulptest008 gunicorn[1184]: response = await self.make_entry(key, bk, func, args, self.default_expires_ttl)
Jul 13 04:20:44 pulptest008 gunicorn[1184]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/cache/cache.py", line 198, in make_entry
Jul 13 04:20:44 pulptest008 gunicorn[1184]: response = await handler(*args)
Jul 13 04:20:44 pulptest008 gunicorn[1184]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/content/handler.py", line 212, in stream_content
Jul 13 04:20:44 pulptest008 gunicorn[1184]: return await self._match_and_stream(path, request)
Jul 13 04:20:44 pulptest008 gunicorn[1184]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulpcore/content/handler.py", line 454, in _match_and_stream
Jul 13 04:20:44 pulptest008 gunicorn[1184]: content_handler_result = distro.content_handler(rel_path)
Jul 13 04:20:44 pulptest008 gunicorn[1184]: File "/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_rpm/app/models/repository.py", line 441, in content_handler
Jul 13 04:20:44 pulptest008 gunicorn[1184]: publication = self.publication.cast()
Jul 13 04:20:44 pulptest008 gunicorn[1184]: AttributeError: 'NoneType' object has no attribute 'cast'
Jul 13 04:20:44 pulptest008 gunicorn[1184]: 127.0.0.1 [13/Jul/2021:11:20:44 +0000] "GET /pulp/content/Local-CSCM/config.repo HTTP/1.0" 500 321 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36"

Distribution Confg:

{
    "pulp_href": "/pulp/api/v3/distributions/rpm/rpm/fe8fa213-e165-48e7-aeae-1d73c4bddeae/",
    "pulp_created": "2021-07-12T10:19:56.138682Z",
    "base_path": "Local-CSCM",
    "base_url": "https://pulptest008.karmalab.net/pulp/content/Local-CSCM/",
    "content_guard": null,
    "pulp_labels": {},
    "name": "Local-CSCM-dist",
    "repository": "/pulp/api/v3/repositories/rpm/rpm/577218d2-c33a-42d9-9250-1ebb64b70544/",
    "publication": null
}

Repo Config:

{
    "pulp_href": "/pulp/api/v3/repositories/rpm/rpm/577218d2-c33a-42d9-9250-1ebb64b70544/",
    "pulp_created": "2021-07-12T07:48:08.572735Z",
    "versions_href": "/pulp/api/v3/repositories/rpm/rpm/577218d2-c33a-42d9-9250-1ebb64b70544/versions/",
    "pulp_labels": {},
    "latest_version_href": "/pulp/api/v3/repositories/rpm/rpm/577218d2-c33a-42d9-9250-1ebb64b70544/versions/3/",
    "name": "Local-CSCM",
    "description": null,
    "retained_versions": 3,
    "remote": null,
    "autopublish": false,
    "metadata_signing_service": null,
    "retain_package_versions": 0,
    "metadata_checksum_type": null,
    "package_checksum_type": null,
    "gpgcheck": 0,
    "repo_gpgcheck": 0,
    "sqlite_metadata": false
}

Related issues

Related to Pulp - Issue #8870: Unpublished content can be accessed if relative path of content is knowCLOSED - CURRENTRELEASE<a title="Actions" class="icon-only icon-actions js-contextmenu" href="#">Actions</a>

Associated revisions

Revision 02f35723 View on GitHub
Added by gerrod 2 months ago

Fix auto-distribute for config.repo

fixes: #9071 https://pulp.plan.io/issues/9071

History

#1 Updated by dkliban@redhat.com 2 months ago

  • Description updated (diff)

#2 Updated by gerrod 2 months ago

  • Project changed from Pulp to RPM Support
  • Assignee set to gerrod

#3 Updated by dalley 2 months ago

  • Related to Issue #8870: Unpublished content can be accessed if relative path of content is know added

#4 Updated by dalley 2 months ago

  • Status changed from NEW to ASSIGNED
  • Sprint set to Sprint 100

#5 Updated by pulpbot 2 months ago

  • Status changed from ASSIGNED to POST

#6 Updated by dalley 2 months ago

  • Triaged changed from No to Yes

#7 Updated by rchan 2 months ago

  • Sprint changed from Sprint 100 to Sprint 101

#8 Updated by gerrod 2 months ago

  • Status changed from POST to MODIFIED

#9 Updated by dalley 2 months ago

  • Sprint/Milestone set to 3.14.0

#10 Updated by pulpbot 2 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF