Project

Profile

Help

Issue #9071

closed

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

Added by gerogeeg over 3 years ago. Updated over 3 years 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 - CURRENTRELEASEgerrodActions
Actions #1

Updated by dkliban@redhat.com over 3 years ago

  • Description updated (diff)
Actions #2

Updated by gerrod over 3 years ago

  • Project changed from Pulp to RPM Support
  • Assignee set to gerrod
Actions #3

Updated by dalley over 3 years ago

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

Updated by dalley over 3 years ago

  • Status changed from NEW to ASSIGNED
  • Sprint set to Sprint 100
Actions #5

Updated by pulpbot over 3 years ago

  • Status changed from ASSIGNED to POST
Actions #6

Updated by dalley over 3 years ago

  • Triaged changed from No to Yes
Actions #7

Updated by rchan over 3 years ago

  • Sprint changed from Sprint 100 to Sprint 101

Added by gerrod over 3 years ago

Revision 02f35723 | View on GitHub

Fix auto-distribute for config.repo

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

Actions #8

Updated by gerrod over 3 years ago

  • Status changed from POST to MODIFIED
Actions #9

Updated by dalley over 3 years ago

  • Sprint/Milestone set to 3.14.0
Actions #10

Updated by pulpbot over 3 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF