Project

Profile

Help

Issue #1776

closed

sync_complete response has changed

Added by jomitsch@redhat.com about 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Master
Platform Release:
2.8.1
OS:
CentOS 7
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

What we are seeing from

/api/v2/repositories/sync_complete

has changed

{"_json"=>
  "{\"call_report\": {\"exception\": null, \"task_type\": \"pulp.server.managers.repo.sync.sync\", \"_href\": \"/pulp/api/v2/tasks/896bffdc-9ad3-479a-9362-2df7ace4b461/\", \"task_id\": \"896bffdc-9ad3-479a-9362-2df7ace4b461\", \"tags\": [\"pulp:repository:default_organization-prod1-dock4\", \"pulp:action:sync\"], \"finish_time\": null, \"_ns\": \"task_status\", \"start_time\": \"2016-03-15T17:23:59Z\", \"traceback\": null, \"spawned_tasks\": [], \"progress_report\": {\"docker_importer\": [{\"num_success\": 27, \"description\": \"Downloading manifests\", \"step_type\": \"sync_step_metadata\", \"items_total\": 27, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"8f9809dc-08d0-4834-9740-24087b14850d\", \"num_processed\": 27}, {\"num_success\": 1, \"description\": \"Copying units already in pulp\", \"step_type\": \"get_local\", \"items_total\": 1, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"60337e8a-cad8-4723-9962-13ab811358dd\", \"num_processed\": 1}, {\"num_success\": 1, \"description\": \"Copying units already in pulp\", \"step_type\": \"get_local\", \"items_total\": 1, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"780b581f-8d72-4a22-9081-ebc8c8257c5a\", \"num_processed\": 1}, {\"num_success\": 0, \"description\": \"Downloading remote files\", \"step_type\": \"sync_step_download\", \"items_total\": 0, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"712f435f-d790-474c-b687-a7ace22edc7a\", \"num_processed\": 0}, {\"num_success\": 0, \"description\": \"Saving Manifests and Blobs\", \"step_type\": \"sync_step_save\", \"items_total\": 1, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"f2159d0e-b8fd-4775-b8c3-f11af7021c0a\", \"num_processed\": 0}, {\"num_success\": 27, \"description\": \"Saving Tags\", \"step_type\": \"sync_step_save\", \"items_total\": 27, \"state\": \"FINISHED\", \"error_details\": [], \"details\": \"\", \"num_failures\": 0, \"step_id\": \"78efa9ba-686c-465f-b468-0a7f0a17d78f\", \"num_processed\": 27}]}, \"state\": \"running\", \"worker_name\": \"reserved_resource_worker-1@lentils.example.com\", \"result\": null, \"error\": null, \"_id\": {\"$oid\": \"56e8452f3419ed6a691a582a\"}, \"id\": \"56e8452f3419ed6a691a582a\"}, \"event_type\": \"repo.sync.finish\", \"payload\": {\"importer_id\": \"docker_importer\", \"exception\": null, \"repo_id\": \"default_organization-prod1-dock4\", \"traceback\": null, \"started\": \"2016-03-15T17:23:59Z\", \"_ns\": \"repo_sync_results\", \"completed\": \"2016-03-15T17:24:07Z\", \"importer_type_id\": \"docker_importer\", \"error_message\": null, \"summary\": {\"sync_step_metadata\": \"FINISHED\", \"sync_step_save\": \"FINISHED\", \"get_local\": \"FINISHED\", \"sync_step_download\": \"FINISHED\"}, \"added_count\": 0, \"result\": \"success\", \"updated_count\": 65, \"details\": [{\"num_processed\": 27, \"items_total\": 27, \"state\": \"FINISHED\", \"num_success\": 27, \"error_details\": [], \"description\": \"Downloading manifests\", \"num_failures\": 0, \"step_id\": \"8f9809dc-08d0-4834-9740-24087b14850d\", \"step_type\": \"sync_step_metadata\", \"details\": \"\"}, {\"num_processed\": 1, \"items_total\": 1, \"state\": \"FINISHED\", \"num_success\": 1, \"error_details\": [], \"description\": \"Copying units already in pulp\", \"num_failures\": 0, \"step_id\": \"60337e8a-cad8-4723-9962-13ab811358dd\", \"step_type\": \"get_local\", \"details\": \"\"}, {\"num_processed\": 1, \"items_total\": 1, \"state\": \"FINISHED\", \"num_success\": 1, \"error_details\": [], \"description\": \"Copying units already in pulp\", \"num_failures\": 0, \"step_id\": \"780b581f-8d72-4a22-9081-ebc8c8257c5a\", \"step_type\": \"get_local\", \"details\": \"\"}, {\"num_processed\": 0, \"items_total\": 0, \"state\": \"FINISHED\", \"num_success\": 0, \"error_details\": [], \"description\": \"Downloading remote files\", \"num_failures\": 0, \"step_id\": \"712f435f-d790-474c-b687-a7ace22edc7a\", \"step_type\": \"sync_step_download\", \"details\": \"\"}, {\"num_processed\": 0, \"items_total\": 1, \"state\": \"FINISHED\", \"num_success\": 0, \"error_details\": [], \"description\": \"Saving Manifests and Blobs\", \"num_failures\": 0, \"step_id\": \"f2159d0e-b8fd-4775-b8c3-f11af7021c0a\", \"step_type\": \"sync_step_save\", \"details\": \"\"}, {\"num_processed\": 27, \"items_total\": 27, \"state\": \"FINISHED\", \"num_success\": 27, \"error_details\": [], \"description\": \"Saving Tags\", \"num_failures\": 0, \"step_id\": \"78efa9ba-686c-465f-b468-0a7f0a17d78f\", \"step_type\": \"sync_step_save\", \"details\": \"\"}], \"id\": \"56e84537192f6336912bef03\", \"removed_count\": 0}}",
 "token"=>"test",
 "api_version"=>"v2",
 "action"=>"sync_complete",
 "controller"=>"katello/api/v2/repositories",
 "repository"=>{}}

It looks like some of the fields were moved to the _json key

Actions #2

Updated by jomitsch@redhat.com about 8 years ago

This is actually a request being sent to katello's api, not a response from pulp.

After some discussion in #pulp (freenode) we suspect that the json request being sent to katello's api may be escaped unnecessarily. i.e.

"{\"name\":\"bar\"}"

instead of

{"name":"bar"}
Actions #3

Updated by jcline@redhat.com about 8 years ago

  • Status changed from NEW to ASSIGNED
  • Assignee set to jcline@redhat.com

Added by Jeremy Cline about 8 years ago

Revision a6f8f835 | View on GitHub

Don't have requests re-serialize the http event data.

We make use of the BSON serializer, so we can't let requests do the serializing for us. Therefore we need to use the data kwarg rather than the json kwarg and just set the content type ourselves.

closes #1776

Added by Jeremy Cline about 8 years ago

Revision a6f8f835 | View on GitHub

Don't have requests re-serialize the http event data.

We make use of the BSON serializer, so we can't let requests do the serializing for us. Therefore we need to use the data kwarg rather than the json kwarg and just set the content type ourselves.

closes #1776

Actions #4

Updated by jcline@redhat.com about 8 years ago

  • Status changed from ASSIGNED to POST
  • Platform Release set to 2.8.1
Actions #5

Updated by Anonymous about 8 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100
Actions #6

Updated by mhrivnak about 8 years ago

  • Triaged changed from No to Yes
Actions #7

Updated by semyers about 8 years ago

  • Status changed from MODIFIED to 5
Actions #8

Updated by pthomas@redhat.com about 8 years ago

  • Status changed from 5 to 6

verified

HEADERS

Host: requestb.in
Connect-Time: 0
Accept-Encoding: gzip, deflate
Accept: */*
Content-Length: 2158
Via: 1.1 vegur
Total-Route-Time: 0
X-Request-Id: d6ff7ec7-9b73-4982-ac1f-e7fc4f58805d
Connection: close
Content-Type: application/json
User-Agent: python-requests/2.6.0 CPython/2.7.5 Linux/3.10.0-327.el7.x86_64
RAW BODY

{"call_report": {"exception": null, "task_type": "pulp.server.managers.repo.sync.sync", "_href": "/pulp/api/v2/tasks/fb3fa382-724b-4cb6-b47e-1f3c63e3fe32/", "task_id": "fb3fa382-724b-4cb6-b47e-1f3c63e3fe32", "tags": ["pulp:repository:zoo", "pulp:action:sync"], "finish_time": null, "_ns": "task_status", "start_time": "2016-03-29T12:29:24Z", "traceback": null, "spawned_tasks": [], "progress_report": {"yum_importer": {"content": {"items_total": 0, "state": "FINISHED", "error_details": [], "details": {"rpm_total": 0, "rpm_done": 0, "drpm_total": 0, "drpm_done": 0}, "size_total": 0, "size_left": 0, "items_left": 0}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FINISHED"}, "distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}}, "state": "running", "worker_name": "", "result": null, "error": null, "_id": {"$oid": "56fa7523fe5eb3c222934531"}, "id": "56fa7523fe5eb3c222934531"}, "event_type": "repo.sync.finish", "payload": {"importer_id": "yum_importer", "exception": null, "repo_id": "zoo", "traceback": null, "started": "2016-03-29T12:29:24Z", "_ns": "repo_sync_results", "completed": "2016-03-29T12:29:29Z", "importer_type_id": "yum_importer", "error_message": null, "summary": {"content": {"state": "FINISHED"}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FINISHED"}, "distribution": {"state": "FINISHED"}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "added_count": 0, "result": "success", "updated_count": 0, "details": {"content": {"size_total": 0, "items_left": 0, "items_total": 0, "state": "FINISHED", "size_left": 0, "details": {"rpm_total": 0, "rpm_done": 0, "drpm_total": 0, "drpm_done": 0}, "error_details": []}, "comps": {"state": "FINISHED"}, "purge_duplicates": {"state": "FINISHED"}, "distribution": {"items_total": 0, "state": "FINISHED", "error_details": [], "items_left": 0}, "errata": {"state": "FINISHED"}, "metadata": {"state": "FINISHED"}}, "id": "56fa75290e8c2309b00a59df", "removed_count": 0}}

Actions #9

Updated by semyers about 8 years ago

  • Status changed from 6 to CLOSED - CURRENTRELEASE
Actions #12

Updated by bmbouter about 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF