Project

Profile

Help

Story #1005

closed

pulp-admin docker repo create misses mandatory option --feed

Added by mkovacik@redhat.com almost 9 years ago. Updated about 5 years ago.

Status:
CLOSED - NOTABUG
Priority:
Normal
Assignee:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Platform Release:
Target Release - Docker:
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

At the moment it is possible to create a docker repo without specifying --feed on the command line.
Later when synchronizing the repo, it leads to a server-side exception verifying mandatory fields presence:

[root@ip-172-31-20-145 ~]# pulp-admin -u admin -p admin docker repo create --repo-id hello-world --upstream-name hello-world
Repository [hello-world] successfully created

[root@ip-172-31-20-145 ~]# pulp-admin -u admin -p admin docker repo sync run --repo-id hello-world
+----------------------------------------------------------------------+
                 Synchronizing Repository [hello-world]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.

Task Failed

Missing values for: ['feed']

[root@ip-172-31-20-145 ~]#

### $ cat /var/log/messages
### ------%<---------------
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.strategy:INFO: Received task: pulp.server.managers.repo.sync.sync[4276f7d5-76b9-4e2e-9e28-4ac95600d4d2]
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136) Exception caught from plugin during sync for repo [hello-world]
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136) Traceback (most recent call last):
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py", line 164, in _do_sync
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)     sync_report = sync_repo(transfer_repo, conduit, call_config)
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 483, in wrap_f
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)     return f(*args, **kwargs)
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)   File "/usr/lib/python2.6/site-packages/pulp_docker/plugins/importers/importer.py", line 83, in sync_repo
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)     working_dir=working_dir)
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)   File "/usr/lib/python2.6/site-packages/pulp_docker/plugins/importers/sync.py", line 53, in __init__
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)     self.validate(config)
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)   File "/usr/lib/python2.6/site-packages/pulp_docker/plugins/importers/sync.py", line 89, in validate
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136)     raise MissingValue(missing)
May 27 10:20:56 ip-172-31-20-145 pulp: pulp.server.managers.repo.sync:ERROR: (2836-43136) MissingValue: Missing values for: ['feed']
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.strategy:INFO: Received task: pulp.server.async.tasks._release_resource[0dee8c1f-c3d7-47ac-a783-245379df3755]
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136) Task pulp.server.managers.repo.sync.sync[4276f7d5-76b9-4e2e-9e28-4ac95600d4d2] raised unexpected: MissingValue(['feed'],)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136) Traceback (most recent call last):
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 240, in trace_task
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     R = retval = fun(*args, **kwargs)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 328, in __call__
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     return super(Task, self).__call__(*args, **kwargs)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/celery/app/trace.py", line 437, in __protected_call__
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     return self.run(*args, **kwargs)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py", line 110, in sync
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     call_config)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/pulp/server/managers/repo/sync.py", line 164, in _do_sync
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     sync_report = sync_repo(transfer_repo, conduit, call_config)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/pulp/server/async/tasks.py", line 483, in wrap_f
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     return f(*args, **kwargs)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/pulp_docker/plugins/importers/importer.py", line 83, in sync_repo
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     working_dir=working_dir)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/pulp_docker/plugins/importers/sync.py", line 53, in __init__
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     self.validate(config)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)   File "/usr/lib/python2.6/site-packages/pulp_docker/plugins/importers/sync.py", line 89, in validate
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136)     raise MissingValue(missing)
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:ERROR: (2735-43136) MissingValue: Missing values for: ['feed']
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:INFO: Task pulp.server.async.tasks._queue_reserved_task[f9d11683-4c39-4397-96c8-a3e5cf0c8ba3] succeeded in 0.0382881090045s: None
May 27 10:20:56 ip-172-31-20-145 pulp: celery.worker.job:INFO: Task pulp.server.async.tasks._release_resource[0dee8c1f-c3d7-47ac-a783-245379df3755] succeeded in 0.0315523919999s: None

Please, either introduce a /etc/pulp/admin/conf.d/docker.conf with a default feed or make the command line option mandatory

Also available in: Atom PDF