Project

Profile

Help

Issue #3951

Cannot dissociate modulemd-defaults

Added by paji@redhat.com 10 months ago. Updated 2 months ago.

Status:
CLOSED - WORKSFORME
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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-defaults CLOSED - CURRENTRELEASE Actions

History

#1 Updated by paji@redhat.com 10 months ago

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

#2 Updated by ipanova@redhat.com 10 months 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.

#3 Updated by daviddavis 10 months ago

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

#4 Updated by daviddavis 10 months ago

  • Parent task deleted (#3766)

#5 Updated by daviddavis 10 months ago

  • Platform Release deleted (2.17.0)

#6 Updated by daviddavis 10 months ago

  • Status changed from NEW to CLOSED - WORKSFORME

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

#7 Updated by bmbouter 2 months ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF