Project

General

Profile

Actions

Bug #28504

open

uplaod file to pulp mit python oder curl fails with "Completed 204 No Content"

Added by Sven Vogel almost 5 years ago. Updated almost 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
API
Target version:
-
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

Description

Hi,

foreman: 1.23.1
katello: 3.13.2

i try to upload a rpm file with api call to katello. i tried curl and python but i get always the following error.

"Completed 204 No Content"

steps to reproduce:

1. get an upload id (step one looks good)

curl -s -H 'Accept:application/json,version=2' -H "Content-Type:application/json" -X POST -u 'admin:xxx' -k -d "{}" 'https://katello01.example.com/katello/api/repositories/876/content_uploads'

response

2019-12-13T15:11:39 [D|kat|9755849f] POST: https://katello01.example.com/pulp/api/v2/content/uploads/: : {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 201: {"upload_id": "2c3e3b0f-bc4c-4999-8c23-1e9282b3a331", "_href": "/pulp/api/v2/content/uploads/2c3e3b0f-bc4c-4999-8c23-1e9282b3a331/"}
2019-12-13T15:11:39 [D|app|9755849f] Body: {"upload_id":"2c3e3b0f-bc4c-4999-8c23-1e9282b3a331","_href":"/pulp/api/v2/content/uploads/2c3e3b0f-bc4c-4999-8c23-1e9282b3a331/"}
2019-12-13T15:11:39 [I|app|9755849f] Completed 200 OK in 180ms (Views: 0.4ms | ActiveRecord: 13.6ms)
2019-12-13T15:11:39 [D|app|9755849f] With body: {"upload_id":"2c3e3b0f-bc4c-4999-8c23-1e9282b3a331","_href":"/pulp/api/v2/content/uploads/2c3e3b0f-bc4c-4999-8c23-1e9282b3a331/"}

2. upload an file

curl -s -H 'Accept:application/json,version=2' -H "Content-Type:multipart/form-data" -X PUT -u 'admin:xxx' -k --data-urlencode "content@CUnit-devel-2.1.3-17.el8.i686.rpm" --data-urlencode offset=0 'https://katello01.example.com/katello/api/repositories/876/content_uploads/2c3e3b0f-bc4c-4999-8c23-1e9282b3a331'

response

2019-12-13T15:11:55 [I|app|02b2197a] Started PUT "/katello/api/repositories/876/content_uploads/2c3e3b0f-bc4c-4999-8c23-1e9282b3a331" for 10.24.48.44 at 2019-12-13 15:11:55 +0100
2019-12-13T15:11:55 [I|app|02b2197a] Processing by Katello::Api::V2::ContentUploadsController#update as JSON
2019-12-13T15:11:55 [I|app|02b2197a]   Parameters: {"content"=>"[FILTERED]", "offset"=>"1048576", "api_version"=>"v2", "repository_id"=>"876", "id"=>"2c3e3b0f-bc4c-4999-8c23-1e9282b3a331"}
2019-12-13T15:11:56 [D|app|02b2197a] Authenticated user admin against INTERNAL authentication source
2019-12-13T15:11:56 [I|app|02b2197a] Authorized user admin(Admin User)
2019-12-13T15:11:56 [D|tax|02b2197a] Current location set to none
2019-12-13T15:11:56 [D|tax|02b2197a] Current organization set to none
2019-12-13T15:11:56 [D|tax|02b2197a] Current location set to none
2019-12-13T15:11:56 [D|tax|02b2197a] Current organization set to none
2019-12-13T15:11:56 [D|kat|02b2197a] PUT: https://katello01.example.com/pulp/api/v2/content/uploads/2c3e3b0f-bc4c-4999-8c23-1e9282b3a331/1048576//: {"content_type"=>"application/json", "accept"=>"application/json"}
Response: 200: null
2019-12-13T15:11:56 [D|app|02b2197a] Body:
2019-12-13T15:11:56 [I|app|02b2197a] Completed 204 No Content in 130ms (ActiveRecord: 10.0ms)
2019-12-13T15:11:56 [D|app|02b2197a] With body:

i dont know its seems not normal... there any hints or maybe its a bug?

Actions #1

Updated by Sven Vogel almost 5 years ago

  • Triaged changed from No to Yes
  • Fixed in Releases deleted (Katello 3.13.2)
  • Found in Releases Katello 3.13.2 added
Actions

Also available in: Atom PDF