Bug 991139 - RFE: Ability to sync Node 'repo objects' without syncing all units within a repo
RFE: Ability to sync Node 'repo objects' without syncing all units within a repo
Status: CLOSED CURRENTRELEASE
Product: Red Hat Satellite 6
Classification: Red Hat
Component: API (Show other bugs)
6.0.0
Unspecified Unspecified
medium Severity medium (vote)
: Unspecified
: --
Assigned To: satellite6-bugs
Katello QA List
: FutureFeature
Depends On:
Blocks: sat6-pulp-future
  Show dependency treegraph
 
Reported: 2013-08-01 13:25 EDT by Justin Sherrill
Modified: 2017-07-26 15:39 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-12-09 09:30:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Justin Sherrill 2013-08-01 13:25:45 EDT
Description of problem:

Assuming a node is setup for 'mirror' strategy and I:

a)  Bind repos a, b, & c to the node
b) Sync the node causing all 3 repositories to be created & synced on the node
c) unbind repo a from the node

In order for repo a to be removed from the node, i have to resync the entire node.  This would involve a full sync of repos b & c.

Ideally i could cause a to be removed without affecting repos b & c.


Version-Release number of selected component (if applicable):
2.2
Comment 1 Jeff Ortel 2013-09-09 13:53:30 EDT
Provided by 2.3
Comment 2 Jeff Ortel 2013-09-19 17:53:35 EDT
To verify:
1. bind to a repository that is not yet on the child node.
2. using pic, send a request to sync the node.
3. note the repo is created on the child node but has no packages.

units and options in REST request:

{
  "units": [{"type_id": "node", "unit_key": null}],
  "options": {"skip_content_update": true}
}


See: https://pulp-dev-guide.readthedocs.org/en/latest/integration/nodes.html#synchronization
Comment 3 Preethi Thomas 2013-09-20 14:21:35 EDT
[root@pulp-v2-server ~]# rpm -qa pulp-server
pulp-server-2.3.0-0.14.alpha.el6.noarch
[root@pulp-v2-server ~]# 

In [21]: pic.POST('/pulp/api/v2/consumers/node1/actions/content/update/', {"units": [{"type_id": "node"}],"options": {"skip_content_update":True}})
Request Body
{
  "units": [
    {
      "type_id": "node"
    }
  ], 
  "options": {
    "skip_content_update": true
  }
}
Response Body
{
  "task_group_id": null, 
  "call_request_id": "861df6fe-ffb4-406f-ad9d-4d241e5dc402", 
  "exception": null, 
  "_href": "/pulp/api/v2/tasks/861df6fe-ffb4-406f-ad9d-4d241e5dc402/", 
  "task_id": "861df6fe-ffb4-406f-ad9d-4d241e5dc402", 
  "call_request_tags": [
    "pulp:consumer:node1", 
    "pulp:action:unit_update"
  ], 
  "reasons": [], 
  "start_time": null, 
  "traceback": null, 
  "schedule_id": null, 
  "finish_time": null, 
  "state": "waiting", 
  "result": null, 
  "dependency_failures": {}, 
  "call_request_group_id": null, 
  "progress": {}, 
  "principal_login": "admin", 
  "response": "accepted", 
  "tags": [
    "pulp:consumer:node1", 
    "pulp:action:unit_update"
  ]
}
Out[21]: 
(202,
 {u'_href': u'/pulp/api/v2/tasks/861df6fe-ffb4-406f-ad9d-4d241e5dc402/',
  u'call_request_group_id': None,
  u'call_request_id': u'861df6fe-ffb4-406f-ad9d-4d241e5dc402',
  u'call_request_tags': [u'pulp:consumer:node1', u'pulp:action:unit_update'],
  u'dependency_failures': {},
  u'exception': None,
  u'finish_time': None,
  u'principal_login': u'admin',
  u'progress': {},
  u'reasons': [],
  u'response': u'accepted',
  u'result': None,
  u'schedule_id': None,
  u'start_time': None,
  u'state': u'waiting',
  u'tags': [u'pulp:consumer:node1', u'pulp:action:unit_update'],
  u'task_group_id': None,
  u'task_id': u'861df6fe-ffb4-406f-ad9d-4d241e5dc402',
  u'traceback': None})
Comment 4 Preethi Thomas 2013-10-07 09:14:33 EDT
verified
pulp-server-2.3.0-0.17.beta.el6.noarch
[root@pulp-v2-server ~]# rpm -qa pulp-node-parent
[root@pulp-v2-server ~]# rpm -qa pulp-nodes-parent
pulp-nodes-parent-2.3.0-0.17.beta.el6.noarch
[root@pulp-v2-server ~]# 


In [13]: pic.POST('/pulp/api/v2/consumers/pulp.node1.com/actions/content/update/', {"units": [{"type_id": "node", "unit_key": None}],"options": {"skip_content_update":True}})
Request Body
{
  "units": [
    {
      "unit_key": null, 
      "type_id": "node"
    }
  ], 
  "options": {
    "skip_content_update": true
  }
}
Response Body
{
  "task_group_id": null, 
  "call_request_id": "f68f3b07-38ee-4fee-9cf0-7d799e2eb17e", 
  "exception": null, 
  "_href": "/pulp/api/v2/tasks/f68f3b07-38ee-4fee-9cf0-7d799e2eb17e/", 
  "task_id": "f68f3b07-38ee-4fee-9cf0-7d799e2eb17e", 
  "call_request_tags": [
    "pulp:consumer:pulp.node1.com", 
    "pulp:action:unit_update"
  ], 
  "reasons": [], 
  "start_time": null, 
  "traceback": null, 
  "schedule_id": null, 
  "finish_time": null, 
  "state": "waiting", 
  "result": null, 
  "dependency_failures": {}, 
  "call_request_group_id": null, 
  "progress": {}, 
  "principal_login": "admin", 
  "response": "accepted", 
  "tags": [
    "pulp:consumer:pulp.node1.com", 
    "pulp:action:unit_update"
  ]
}
Out[13]: 
(202,
 {u'_href': u'/pulp/api/v2/tasks/f68f3b07-38ee-4fee-9cf0-7d799e2eb17e/',
  u'call_request_group_id': None,
  u'call_request_id': u'f68f3b07-38ee-4fee-9cf0-7d799e2eb17e',
  u'call_request_tags': [u'pulp:consumer:pulp.node1.com',
                         u'pulp:action:unit_update'],
  u'dependency_failures': {},
  u'exception': None,
  u'finish_time': None,
  u'principal_login': u'admin',
  u'progress': {},
  u'reasons': [],
  u'response': u'accepted',
  u'result': None,
  u'schedule_id': None,
  u'start_time': None,
  u'state': u'waiting',
  u'tags': [u'pulp:consumer:pulp.node1.com', u'pulp:action:unit_update'],
  u'task_group_id': None,
  u'task_id': u'f68f3b07-38ee-4fee-9cf0-7d799e2eb17e',
  u'traceback': None})

In [14]: 


In [16]: pic.POST('/pulp/api/v2/consumers/pulp.node1.com/actions/content/update/', {"units": [{"type_id": "repository", "unit_key" : {"repo_id": "pulp"}}],"options": {}})
Request Body
{
  "units": [
    {
      "unit_key": {
        "repo_id": "pulp"
      }, 
      "type_id": "repository"
    }
  ], 
  "options": {}
}
Response Body
{
  "task_group_id": null, 
  "call_request_id": "92a2fda8-034c-4274-8a8c-2f5287c66ca9", 
  "exception": null, 
  "_href": "/pulp/api/v2/tasks/92a2fda8-034c-4274-8a8c-2f5287c66ca9/", 
  "task_id": "92a2fda8-034c-4274-8a8c-2f5287c66ca9", 
  "call_request_tags": [
    "pulp:consumer:pulp.node1.com", 
    "pulp:action:unit_update"
  ], 
  "reasons": [], 
  "start_time": null, 
  "traceback": null, 
  "schedule_id": null, 
  "finish_time": null, 
  "state": "waiting", 
  "result": null, 
  "dependency_failures": {}, 
  "call_request_group_id": null, 
  "progress": {}, 
  "principal_login": "admin", 
  "response": "accepted", 
  "tags": [
    "pulp:consumer:pulp.node1.com", 
    "pulp:action:unit_update"
  ]
}
Out[16]: 
(202,
 {u'_href': u'/pulp/api/v2/tasks/92a2fda8-034c-4274-8a8c-2f5287c66ca9/',
  u'call_request_group_id': None,
  u'call_request_id': u'92a2fda8-034c-4274-8a8c-2f5287c66ca9',
  u'call_request_tags': [u'pulp:consumer:pulp.node1.com',
                         u'pulp:action:unit_update'],
  u'dependency_failures': {},
  u'exception': None,
  u'finish_time': None,
  u'principal_login': u'admin',
  u'progress': {},
  u'reasons': [],
  u'response': u'accepted',
  u'result': None,
  u'schedule_id': None,
  u'start_time': None,
  u'state': u'waiting',
  u'tags': [u'pulp:consumer:pulp.node1.com', u'pulp:action:unit_update'],
  u'task_group_id': None,
  u'task_id': u'92a2fda8-034c-4274-8a8c-2f5287c66ca9',
  u'traceback': None})

In [17]:
Comment 5 Preethi Thomas 2013-12-09 09:30:59 EST
Pulp 2.3 released.

Note You need to log in before you can comment on or make changes to this bug.