Bug 840977

Summary: newly created custom repositories are automatically associated with cds clusters
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: James Slagle <jslagle>
Component: CDSAssignee: James Slagle <jslagle>
Status: CLOSED ERRATA QA Contact: Martin Kočí <mkoci>
Severity: unspecified Docs Contact:
Priority: high    
Version: 2.1CC: mkoci, snansi, whayutin
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
In Red Hat Update Infrastructure 2.1, newly created custom repositories are no longer automatically associated with cds clusters. This association now needs to be done manually.
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-24 11:55:27 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description James Slagle 2012-07-17 18:25:41 UTC
newly created custom repositories are automatically associated with cds clusters.

This should not be the case, they should only be associated manually.

Comment 1 James Slagle 2012-07-17 19:02:16 UTC
cloude commit 8e810cb6422c050aa14c334f64dd96c750aae575

Comment 2 wes hayutin 2012-08-03 12:20:37 UTC
some how we have duplicate fixes here..


whayutin@minidoe tools]$ git show 8e810cb6422c050aa14c334f64dd96c750aae575
commit 8e810cb6422c050aa14c334f64dd96c750aae575
Author: James Slagle <jslagle>
Date:   Tue Jul 17 14:57:35 2012 -0400

    840977 Do not automatically associate custom repos with CDS clusters

diff --git a/rhui-2.0/tools/src/rhui/tools/pulp_api.py b/rhui-2.0/tools/src/rhui/tools/pulp_api.py
index 52cf2e1..fffd119 100644
--- a/rhui-2.0/tools/src/rhui/tools/pulp_api.py
+++ b/rhui-2.0/tools/src/rhui/tools/pulp_api.py
@@ -373,15 +373,6 @@ class Pulp:
                                  checksum_type=checksum_type)
             self.repo_api.add_note(id, ENTITLEMENT_PATH, entitlement_path)
 
-            # If there are any CDS instances, associate the repo with one
-            # of them; cluster normalization will make sure the associate
-            # takes effect on all of them.
-            all_cdses = self.cds_list()
-
-            if len(all_cdses) > 0:
-                cds = all_cdses[0]
-                self.associate_repo(cds['hostname'], id)
-            
             return True
         except ServerRequestError:
             LOG.exception('Exception creating custom repository [%s]' % id)
[whayutin@minidoe tools]$ 
[whayutin@minidoe tools]$ 
[whayutin@minidoe tools]$ 
[whayutin@minidoe tools]$ git show 8a9e35e929d4b11ed57c7ea0d723cf0993573ee3
commit 8a9e35e929d4b11ed57c7ea0d723cf0993573ee3
Author: Wes Hayutin <whayutin>
Date:   Thu Aug 2 09:04:20 2012 -0400

    840005, missed one place where the pulp-api associates repos to cds's

diff --git a/rhui-2.0/tools/src/rhui/tools/pulp_api.py b/rhui-2.0/tools/src/rhui/tools/pulp_api.py
index d8f543c..35bdf67 100644
--- a/rhui-2.0/tools/src/rhui/tools/pulp_api.py
+++ b/rhui-2.0/tools/src/rhui/tools/pulp_api.py
@@ -353,15 +353,6 @@ class Pulp:
                                  preserve_metadata=True)
             self.repo_api.change_sync_schedule(repo.label, sync_data)
 
-            # If there are any CDS instances, associate the repo with one
-            # of them; cluster normalization will make sure the associate
-            # takes effect on all of them.
-            all_cdses = self.cds_list()
-
-            if len(all_cdses) > 0:
-                cds = all_cdses[0]
-                self.associate_repo(cds['hostname'], repo.label)
-
             return True
         except ServerRequestError:
             LOG.exception('Exception attempting to create Red Hat repository [%s]' % repo.label)
[whayutin@minidoe tools]$

Comment 3 Martin Kočí 2012-08-03 14:55:05 UTC
successfully reproduced with RHEL-6.3-RHUI-2.1-20120705.0-Server-x86_64-DVD1.iso and checked with RHEL-6.3-RHUI-2.1-20120801.0-Server-x86_64-DVD1.iso.

rhui (repo) => l

Custom Repositories
  test_custom_repo
  test_custom_repo01
...
rhui (cds) => i

Select one or more CDS clusters:

  -  1 : cluster01
Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1

Select one or more CDS clusters:

  x  1 : cluster01
Enter value (1-1) to toggle selection, 'c' to confirm selections, or '?' for more commands: c

-= RHUI CDS Clusters =-

  cluster01
  ---------

    CDS Instances
    -------------
    ip-10-110-203-191.ec2.internal
      hostname:        ip-10-110-203-191.ec2.internal
      client hostname: ip-10-110-203-191.ec2.internal

    Repositories
    ------------
    (None)

Moving bug to VERIFIED.

Comment 4 Shikha 2012-08-16 09:33:42 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In Red Hat Update Infrastructure 2.1, newly created custom repositories are no longer automatically associated with cds clusters. This association now needs to be done manually.

Comment 6 errata-xmlrpc 2012-08-24 11:55:27 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHEA-2012-1205.html