Actions
Issue #2912
closedparsing manifest fails during sync of file repo
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 22
Quarter:
Description
[vagrant@dev devel]$ http POST http://localhost:1234/api/v3/repositories/test-repo/importers/file/test-importer/sync/
2017-07-15 22:12:18,525: ERROR/PoolWorker-1] Task failed : [f53993da-c30d-4ec9-b299-1163a1d02394]
2017-07-15 22:12:18,555: ERROR/PoolWorker-1] Task pulpcore.app.tasks.importer.sync[f53993da-c30d-4ec9-b299-1163a1d02394] raised unexpected: ValueError("invalid literal for int() with base 10: '05afba0da8b8c7d52cad9e04355d3efa30696936767d9cb0130c90c6515d934b'",)
Traceback (most recent call last):
File "/home/vagrant/.virtualenvs/pulp/lib/python3.5/site-packages/celery/app/trace.py", line 367, in trace_task
R = retval = fun(*args, **kwargs)
File "/home/vagrant/devel/pulp/platform/pulpcore/tasking/tasks.py", line 272, in __call__
return super(UserFacingTask, self).__call__(*args, **kwargs)
File "/home/vagrant/.virtualenvs/pulp/lib/python3.5/site-packages/celery/app/trace.py", line 622, in __protected_call__
return self.run(*args, **kwargs)
File "/home/vagrant/devel/pulp/platform/pulpcore/app/tasks/importer.py", line 75, in sync
importer.sync()
File "/home/vagrant/devel/pulp_file/pulp_file/app/models.py", line 85, in sync
changeset = self._build_changeset()
File "/home/vagrant/devel/pulp_file/pulp_file/app/models.py", line 226, in _build_changeset
delta = self._find_delta(manifest, inventory)
File "/home/vagrant/devel/pulp_file/pulp_file/app/models.py", line 150, in _find_delta
for entry in manifest.read():
File "/home/vagrant/devel/pulp_file/pulp_file/manifest.py", line 92, in read
yield Entry.parse(Line(number=n, content=line))
File "/home/vagrant/devel/pulp_file/pulp_file/manifest.py", line 45, in parse
size=int(part[1]),
ValueError: invalid literal for int() with base 10: '05afba0da8b8c7d52cad9e04355d3efa30696936767d9cb0130c90c6515d934b'
The manifest parsing is out of order. Following diff solves the issue:
[dkliban@localhost pulp_file]$ git diff
diff --git a/pulp_file/manifest.py b/pulp_file/manifest.py
index 3a83376..0a8e744 100644
--- a/pulp_file/manifest.py
+++ b/pulp_file/manifest.py
@@ -40,8 +40,8 @@ class Entry:
'must be: <path>, <size>, <digest>').format(
n=line.number))
return Entry(path=part[0],
- size=int(part[1]),
- digest=part[2])
+ size=int(part[2]),
+ digest=part[1])
def __init__(self, path, size, digest):
Actions
Align manifest field ordering with pulp2 PULP_MANIFEST. closes #2912