Project

Profile

Help

Issue #2030

closed

importer config is not validated during the update

Added by ipanova@redhat.com over 8 years ago. Updated over 4 years ago.

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

Description

Importer config is validated during the creation but not during the update call.

$ curl -i -H "Accept: application/json" -X PUT -k -u admin:admin -d '{"importer_config":{"download_policy":"nonsense" }}' 'https://localhost/pulp/api/v2/repositories/123456/importers/yum_importer/'
HTTP/1.1 202 ACCEPTED
Date: Wed, 22 Jun 2016 15:18:15 GMT
Server: Apache/2.4.16 (Fedora) OpenSSL/1.0.1k-fips mod_wsgi/4.4.1 Python/2.7.8
Content-Length: 172
Content-Type: application/json; charset=utf-8

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/4b4df091-36c9-439f-951e-07196e10f476/", "task_id": "4b4df091-36c9-439f-951e-07196e10f476"}], "result": null, "error": null}[ipanova@ina pulp_rpm]$ 
[ipanova@ina pulp_rpm]$ 
[ipanova@ina pulp_rpm]$ pulp-admin tasks details --task-id 4b4df091-36c9-439f-951e-07196e10f476
Warning: path should have mode 0700 because it may contain sensitive information: /home/ipanova/.pulp/

+----------------------------------------------------------------------+
                              Task Details
+----------------------------------------------------------------------+

Operations:       update_importer
Resources:        123456 (repository), yum_importer (repository_importer)
State:            Successful
Start Time:       2016-06-22T15:18:16Z
Finish Time:      2016-06-22T15:18:16Z
Result:           
  Config:           
    Download Policy: nonsense
  Id:               yum_importer
  Importer Type Id: yum_importer
  Last Sync:        None
  Repo Id:          123456
  Scratchpad:       None
Task Id:          4b4df091-36c9-439f-951e-07196e10f476
Progress Report:  

[ipanova@ina pulp_rpm]$ curl -H "Accept: application/json" -X GET -k -u admin:admin 'https://localhost/pulp/api/v2/repositories/123456/importers/yum_importer/'| python -m json.tool
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   328  100   328    0     0   1203      0 --:--:-- --:--:-- --:--:--  1201
{
    "_href": "/pulp/api/v2/repositories/123456/importers/yum_importer/",
    "_id": {
        "$oid": "576a917645ef486cf3e61650"
    },
    "_ns": "repo_importers",
    "config": {

        "download_policy": "nonsense"
    },
    "id": "yum_importer",
    "importer_type_id": "yum_importer",
    "last_sync": null,
    "repo_id": "123456",
    "scratchpad": null
}

Related issues

Blocks RPM Support - Story #1991: As a user, uploaded units which don't pass the signature check are not importedCLOSED - CURRENTRELEASEipanova@redhat.com

Actions

Also available in: Atom PDF