Bug 991201 - nodes validation checking plugin IDs instead of type_id
Summary: nodes validation checking plugin IDs instead of type_id
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: nodes
Version: 2.2 Beta
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: 2.2.0
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-01 19:59 UTC by Jeff Ortel
Modified: 2013-09-10 15:42 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-10 15:42:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Jeff Ortel 2013-08-01 19:59:20 UTC
The nodes validation checking plugin IDs instead of type_id.  Caught when the plugin ID is not the same as the type_id.

Comment 1 Michael Hrivnak 2013-08-02 12:57:05 UTC
I agree this is a 2.2 blocker. It should be a very quick fix at least.

This area of distributor IDs and type IDs is very tricky. We may want to consider renaming one or the other at some point in the future to reduce confusion and ambiguity.

Comment 2 Jeff Ortel 2013-08-02 18:34:38 UTC
https://github.com/pulp/pulp/pull/552

Comment 3 Jeff Ortel 2013-08-05 16:19:10 UTC
build: 2.2.0-0.24.beta

Comment 4 Jeff Ortel 2013-08-12 20:19:22 UTC
To verify:

1. Create a repository using the following script instead of pulp-admin.
   This script adds a distributor with an ID that is different than it's type.

2. Enable the repository.

3. Bind the child to the repository.

4. Sync the child node.

--------------------------------------------------------------------

<script>

from pulp.common import pic

pic.connect()

url="/pulp/api/v2/repositories/"

body = {
  "id": "pulp_node_test",
  "display_name": None, 
  "description": None,
  "distributors": [
    {"distributor_id": "REALLY_DIFFERENT_NAME_HERE",
     "auto_publish": True, 
     "distributor_type": "yum_distributor", 
     "distributor_config": {
       "http": False, 
       "https": True, 
       "relative_url": "/repos/pulp/pulp/v2/testing/"
     }}], 
  "notes": {"_repo-type": "rpm-repo"}, 
  "importer_type_id": "yum_importer", 
  "importer_config": {"feed": "http://repos.fedorapeople.org/repos/pulp/pulp/v2/testing/"}
}

pic.POST(url, body)

</script>

Comment 5 Preethi Thomas 2013-08-13 19:24:22 UTC
verified
[root@cloud-qe-9 ~]# rpm -qa pulp-server
pulp-server-2.2.0-0.25.beta.el6.noarch
[root@cloud-qe-9 ~]# 

[root@cloud-qe-9 ~]# python nodes.py 
Request Body
{
  "display_name": null, 
  "description": null, 
  "distributors": [
    {
      "distributor_id": "REALLY_DIFFERENT_NAME_HERE", 
      "auto_publish": true, 
      "distributor_type": "yum_distributor", 
      "distributor_config": {
        "http": false, 
        "relative_url": "/repos/pulp/pulp/v2/testing/", 
        "https": true
      }
    }
  ], 
  "notes": {
    "_repo-type": "rpm-repo"
  }, 
  "importer_type_id": "yum_importer", 
  "importer_config": {
    "feed": "http://repos.fedorapeople.org/repos/pulp/pulp/v2/testing/fedora-19/x86_64/"
  }, 
  "id": "pulp_node_test"
}
Response Body
{
  "scratchpad": {}, 
  "display_name": "pulp_node_test", 
  "description": null, 
  "_ns": "repos", 
  "notes": {
    "_repo-type": "rpm-repo"
  }, 
  "content_unit_counts": {}, 
  "_id": {
    "$oid": "520a82a3d6344947820000ab"
  }, 
  "id": "pulp_node_test", 
  "_href": "/pulp/api/v2/repositories/pulp_node_test/"
}


[root@cloud-qe-9 ~]# pulp-admin node sync run  --node-id node1
This command may be exited via ctrl+c without affecting the request.

[-]
Waiting to begin...



(1/3) Repository: errata
[==================================================] 100%


(2/3) Repository: pulp_node_test
[==================================================] 100%


(3/3) Repository: upload
[==================================================] 100%




Synchronization succeeded

+----------------------------------------------------------------------+
                       Child Node Synchronization
+----------------------------------------------------------------------+

Repository: 
  Action: Merged
  Id:     errata
  Units:  
    Added:   0
    Removed: 0
    Updated: 0

Repository: 
  Action: Added
  Id:     pulp_node_test
  Units:  
 Added:   46
    Removed: 0
    Updated: 0

Repository: 
  Action: Merged
  Id:     upload
  Units:  
    Added:   0
    Removed: 0
    Updated: 0

Comment 6 Preethi Thomas 2013-09-10 15:42:56 UTC
2.2 released
http://repos.fedorapeople.org/repos/pulp/pulp/stable/2.2/


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