Project

Profile

Help

Issue #1294

Updated by mhrivnak about 7 years ago

CRANE COMMIT: d2445983e24da278b5a4201d9d190a6acaa1f188 

 Hi 

 I have following use case: 

 I want to sync from one pulp env to another pulp env. 
 So sync process is pulp#1->crane#1 -> pulp#2 

 However I got following error, when I was trying to perform the sync: 

     "traceback": "Traceback (most recent call last):\n    File \"/usr/lib/python2.6/site-packages/celery-3.1.16-py2.6.egg/celery/app/trace.py\", line 240, in trace_task\n      R = retval = fun(*args, **kwargs)\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/server/async/tasks.py\", line 328, in __call__\n      return super(Task, self).__call__(*args, **kwargs)\n    File \"/usr/lib/python2.6/site-packages/celery-3.1.16-py2.6.egg/celery/app/trace.py\", line 437, in __protected_call__\n      return self.run(*args, **kwargs)\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/server/managers/repo/sync.py\", line 110, in sync\n      call_config)\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/server/managers/repo/sync.py\", line 164, in _do_sync\n      sync_report = sync_repo(transfer_repo, conduit, call_config)\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/server/async/tasks.py\", line 483, in wrap_f\n      return f(*args, **kwargs)\n    File \"/home/brq/jluza/pulp_docker/plugins/pulp_docker/plugins/importers/importer.py\", line 94, in sync_repo\n      return self.sync_step.sync()\n    File \"/home/brq/jluza/pulp_docker/plugins/pulp_docker/plugins/importers/sync.py\", line 103, in sync\n      self.process_lifecycle()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/publish_step.py\", line 503, in process_lifecycle\n      super(PluginStep, self).process_lifecycle()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/publish_step.py\", line 127, in process_lifecycle\n      step.process()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/publish_step.py\", line 204, in process\n      self._process_block()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/publish_step.py\", line 246, in _process_block\n      self.process_main()\n    File \"/home/brq/jluza/pulp_docker/plugins/pulp_docker/plugins/importers/sync.py\", line 192, in process_main\n      available_tags = self.parent.parent.index_repository.get_tags()\n    File \"/home/brq/jluza/pulp_docker/plugins/pulp_docker/plugins/registry.py\", line 332, in get_tags\n      return json.loads(tags)['tags']\nTypeError: list indices must be integers, not str\n", 


 So I've investigated a bit and found out following difference between official v2 registry and crane: 
 this is what I get from official v2 registry: 

 curl -X GET http://rcm-img-docker01.build.eng.bos.redhat.com:5000/v2/jluza/rsyslog/tags/list 
 {"name":"jluza/rsyslog","tags":["latest"]} 

 And this is what I get from crane: 
 curl --insecure -X GET https://rcm-pulp-01-dev.app.eng.bos.redhat.com:5000/v2/docker/rsyslog/tags/list 
 Redirecting... 

 and after redirection to: 
 curl --insecure -X GET POST https://rcm-pulp-01-dev.app.eng.bos.redhat.com/pulp/docker/v2/docker-rsyslog/tags/list 
 [] 

 ^ problem isn't in empty tag, repository actually doesn't have any tags, but in output format 





Back