Issue #1294

Updated by mhrivnak about 7 years ago

CRANE COMMIT: d2445983e24da278b5a4201d9d190a6acaa1f188 


 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/\", line 240, in trace_task\n      R = retval = fun(*args, **kwargs)\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/server/async/\", 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/\", line 437, in __protected_call__\n      return*args, **kwargs)\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/server/managers/repo/\", line 110, in sync\n      call_config)\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/server/managers/repo/\", 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/\", line 483, in wrap_f\n      return f(*args, **kwargs)\n    File \"/home/brq/jluza/pulp_docker/plugins/pulp_docker/plugins/importers/\", line 94, in sync_repo\n      return self.sync_step.sync()\n    File \"/home/brq/jluza/pulp_docker/plugins/pulp_docker/plugins/importers/\", line 103, in sync\n      self.process_lifecycle()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/\", line 503, in process_lifecycle\n      super(PluginStep, self).process_lifecycle()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/\", line 127, in process_lifecycle\n      step.process()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/\", line 204, in process\n      self._process_block()\n    File \"/home/brq/jluza/rcm-pulp/server/pulp/plugins/util/\", line 246, in _process_block\n      self.process_main()\n    File \"/home/brq/jluza/pulp_docker/plugins/pulp_docker/plugins/importers/\", 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/\", 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 

 And this is what I get from crane: 
 curl --insecure -X GET 

 and after redirection to: 
 curl --insecure -X GET POST 

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