Project

Profile

Help

Issue #3951

closed

Cannot dissociate modulemd-defaults

Added by paji@redhat.com about 6 years ago. Updated over 5 years ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Sprint/Milestone:
-
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Quarter:

Description

1) Sync https://repos.fedorapeople.org/pulp/pulp/fixtures/rpm-with-modules/ in a repo called integration_test_id_clone
2)
Get the unit id for one of the modulemd_defaults either by looking in the db or running curl with following info
resource - https://localhost, action_name, - /pulp/api/v2/repositories/integration_test_id/search/units/, params - [:post, "{\"criteria\":{\"type_ids\":[\"modulemd_defaults\"]}}", {"content_type"=>"application/json", "accept"=>"application/json"}]

3)
Try the following action
resource - https://localhost, action_name, - /pulp/api/v2/repositories/integration_test_id_clone/actions/unassociate/, params - [:post, "{\"criteria\":{\"type_ids\":[\"modulemd_defaults\"],\"filters\":{\"association\":{\"unit_id\":{\"$in\":[\"164765f4-3849-40d2-b8a2-8492f0836cc7\"]}}}}}", {"content_type"=>"application/json", "accept"=>"application/json"}]

4) notice that the dissociate does not happen.
infact pulp-admin repo list --detail --repo-id=integration_test_id_clone will still show the same count as before the dissociate.


Related issues

Copied from RPM Support - Story #3863: As a user i can sync and remove modulemd-defaultsCLOSED - CURRENTRELEASEjortel@redhat.com

Actions
Actions #1

Updated by paji@redhat.com about 6 years ago

  • Copied from Story #3863: As a user i can sync and remove modulemd-defaults added
Actions #2

Updated by ipanova@redhat.com about 6 years ago

$ pulp-admin rpm  repo list 
Warning: path should have mode 0700 because it may contain sensitive information: /home/ipanova/.pulp/

+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  modular-copy
Display Name:        None
Description:         None
Content Unit Counts: 
  Modulemd Defaults: 1
  Rpm:               12

$ mongo
switched to db pulp_database
> db.repo_content_units.find({'repo_id':'modular-copy', 'unit_type_id':'modulemd_defaults'})
{ "_id" : ObjectId("5b87bb77a5ca4f71dbdfb966"), "repo_id" : "modular-copy", "unit_id" : "6aaa2b83-e0c7-4698-b756-8c6bda62375c", "unit_type_id" : "modulemd_defaults", "created" : "2018-08-30T09:40:07Z", "updated" : "2018-08-30T09:40:07Z" }

$ curl -i -H "Accept: application/json" -X POST -k -u admin:admin -d '{"criteria": {"type_ids": ["modulemd_defaults"], "filters": {"association":{"unit_id":{"$in":["6aaa2b83-e0c7-4698-b756-8c6bda62375c"]}}}}}' 'https://localhost/pulp/api/v2/repositories/modular-copy/actions/unassociate/'
HTTP/1.1 202 ACCEPTED
Date: Thu, 30 Aug 2018 09:52:24 GMT
Server: Apache/2.4.33 (Fedora) OpenSSL/1.1.0h-fips mod_wsgi/4.5.20 Python/2.7
Content-Length: 172
Content-Type: application/json; charset=utf-8

{"spawned_tasks": [{"_href": "/pulp/api/v2/tasks/972975dd-4ca8-4f3e-869d-28c3d02a3a61/", "task_id": "972975dd-4ca8-4f3e-869d-28c3d02a3a61"}], "result": null, "error": null}[ipanova@ina pulp_rpm]$ 

$ pulp-admin -vv tasks details --task-id 972975dd-4ca8-4f3e-869d-28c3d02a3a61
Warning: path should have mode 0700 because it may contain sensitive information: /home/ipanova/.pulp/

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

2018-08-30 11:52:31,593 - DEBUG - sending GET request to /pulp/api/v2/tasks/972975dd-4ca8-4f3e-869d-28c3d02a3a61/
2018-08-30 11:52:31,778 - INFO - GET request to /pulp/api/v2/tasks/972975dd-4ca8-4f3e-869d-28c3d02a3a61/ with parameters None
2018-08-30 11:52:31,778 - INFO - Response status : 200 

2018-08-30 11:52:31,779 - INFO - Response body :
 {
  "exception": null, 
  "task_type": "pulp.server.managers.repo.unit_association.unassociate_by_criteria", 
  "_href": "/pulp/api/v2/tasks/972975dd-4ca8-4f3e-869d-28c3d02a3a61/", 
  "task_id": "972975dd-4ca8-4f3e-869d-28c3d02a3a61", 
  "tags": [
    "pulp:repository:modular-copy", 
    "pulp:action:unassociate"
  ], 
  "finish_time": "2018-08-30T09:52:24Z", 
  "_ns": "task_status", 
  "start_time": "2018-08-30T09:52:24Z", 
  "traceback": null, 
  "spawned_tasks": [], 
  "progress_report": {}, 
  "queue": "reserved_resource_worker-0@ina.usersys.redhat.com.dq2", 
  "state": "finished", 
  "worker_name": "reserved_resource_worker-0@ina.usersys.redhat.com", 
  "result": {
    "units_successful": [
      {
        "unit_key": {
          "repo_id": "modular-copy", 
          "name": "nodejs"
        }, 
        "type_id": "modulemd_defaults"
      }
    ]
  }, 
  "error": null, 
  "_id": {
    "$oid": "5b87be58a5ca4f71dbdfc48c"
  }, 
  "id": "5b87be58a5ca4f71dbdfc48c"
}

Operations:       unassociate
Resources:        modular-copy (repository)
State:            Successful
Start Time:       2018-08-30T09:52:24Z
Finish Time:      2018-08-30T09:52:24Z
Result:           
  Units Successful: 
    Type Id:  modulemd_defaults
    Unit Key: 
      Name:    nodejs
      Repo Id: modular-copy
Task Id:          972975dd-4ca8-4f3e-869d-28c3d02a3a61
Worker Name:      reserved_resource_worker-0@ina.usersys.redhat.com
Progress Report:  

[ipanova@ina pulp_rpm]$ pulp-admin rpm  repo list 
Warning: path should have mode 0700 because it may contain sensitive information: /home/ipanova/.pulp/

+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  modular-copy
Display Name:        None
Description:         None
Content Unit Counts: 
  Modulemd Defaults: 0
  Rpm:               12

I am not able to reproduce this.

Actions #3

Updated by daviddavis about 6 years ago

  • Assignee deleted (jortel@redhat.com)
  • Sprint/Milestone deleted (2.17.0)
Actions #4

Updated by daviddavis about 6 years ago

  • Parent issue deleted (#3766)
Actions #5

Updated by daviddavis about 6 years ago

  • Platform Release deleted (2.17.0)
Actions #6

Updated by daviddavis about 6 years ago

  • Status changed from NEW to CLOSED - WORKSFORME

Closing as WORKSFORME. Please reopen though if you can reproduce it.

Actions #7

Updated by bmbouter over 5 years ago

  • Tags Pulp 2 added

Also available in: Atom PDF