Actions
Issue #7354
closedRPM Mirrorlist comments cause an exception
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
The fedora mirrorlists have a comment at the top. For example:
https://mirrors.fedoraproject.org/mirrorlist?repo=epel-8&arch=x86_64&country=US
# repo = epel-8 arch = x86_64 country = US
The fetch_mirror
function's docstring says it skips non-matching lines, but the task dies trying to access .group(2)
on None
.
"error": {
"description": "'NoneType' object has no attribute 'group'",
"traceback": " File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/worker.py\", line 934, in perform_job\n rv = job.perform()\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 686, in perform\n self._result = self._execute()\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/rq/job.py\", line 692, in _execute\n return self.func(*self.args, **self.kwargs)\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 211, in synchronize\n remote_url = fetch_remote_url(remote)\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 138, in fetch_remote_url\n return fetch_mirror(remote)\n File \"/usr/local/lib/pulp/lib64/python3.6/site-packages/pulp_rpm/app/tasks/synchronizing.py\", line 124, in fetch_mirror\n repodata_exists = get_repomd_file(remote, match.group(2))\n"
},
Actions
Skip comment lines in mirrorlist
fixes #7354 https://pulp.plan.io/issues/7354
This is important for fedora mirrorlist which has a comment at the top: https://mirrors.fedoraproject.org/mirrorlist?repo=epel-8&arch=x86_64&country=US