Bug 840005 - repos automatically associated with the first cds created
Summary: repos automatically associated with the first cds created
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA
Version: 2.1
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ---
: ---
Assignee: mkovacik
QA Contact: Martin Kočí
URL:
Whiteboard:
: 840432 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-07-13 12:43 UTC by mkovacik
Modified: 2012-08-24 13:27 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In Red Hat Update Infrastructure 2.1, repositories are no longer assigned to any pre existing CDS cluster automatically any more. This assignment needs to be done manually.
Clone Of:
Environment:
Last Closed: 2012-08-24 11:55:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screen log (33.58 KB, text/plain)
2012-07-13 12:43 UTC, mkovacik
no flags Details
workflow showing this is only a messaging issue (4.00 KB, text/plain)
2012-07-13 13:16 UTC, wes hayutin
no flags Details
screenshot (21.21 KB, text/plain)
2012-08-01 14:33 UTC, Martin Kočí
no flags Details
screenshot 02 (16.44 KB, text/plain)
2012-08-02 07:32 UTC, Martin Kočí
no flags Details
repoassoc.txt (4.05 KB, text/plain)
2012-08-02 12:49 UTC, wes hayutin
no flags Details
Verifying screen log (16.81 KB, text/plain)
2012-08-02 14:42 UTC, mkovacik
no flags Details
Verifying screen log 1 (67.05 KB, application/octet-stream)
2012-08-12 13:57 UTC, mkovacik
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2012:1205 0 normal SHIPPED_LIVE RHUI 2.1 Enhancement Update 2012-08-24 15:52:31 UTC

Description mkovacik 2012-07-13 12:43:20 UTC
Created attachment 598063 [details]
Screen log

Description of problem:
The rhui-manager fails to associate a Red Hat repository with a cluster. See the attached screen log for more details. No errors reported in /var/log/pulp/ or ~/.rhui/rhui.log


Version-Release number of selected component (if applicable):
RHEL-6.3-RHUI-2.1-20120705.0-Server-x86_64-DVD1.iso

How reproducible:
Always

Steps to Reproduce:
1. create a CDS cluster A
2. upload Red Hat contents certificate
3. add a Red Hat repository
(4. optional: synchronize the repository from step 3)
5. associate the repository with the cluster A
  
Actual results:
Unable to associate a Red Hat repository with a CDS cluster

Expected results:
One is able to associate a Red Hat repository with a CDS cluster

Comment 1 wes hayutin 2012-07-13 13:16:26 UTC
Created attachment 598068 [details]
workflow showing this is only a messaging issue

So.. I think we need some better messaging here:
What you are seeing is that by "default" all the repositories are automatically added when there is only one cds cluster.  When the user goes to add repositories they are already added, hence none available to add.

Perhaps we should list which repo's are already associated to make this more clear..

See my workflow..

Comment 2 wes hayutin 2012-07-13 13:16:52 UTC
Milan, you should be able to move forward with your testing.

Comment 3 wes hayutin 2012-07-13 15:57:24 UTC
OK.. spoke w/ Slagle.  RHUI should not be automatically associating repositories to the default CDS. 

cloude master 9dfffdbb64d9767deb285d025830c315d188400c


index 7658410..52cf2e1 100644
--- a/rhui-2.0/tools/src/rhui/tools/pulp_api.py
+++ b/rhui-2.0/tools/src/rhui/tools/pulp_api.py
@@ -698,17 +698,6 @@ class Pulp:
                 description='RHUI CDS', sync_schedule=schedule, 
                 cluster_id=cluster_name, client_hostname=client_hostname)
 
-            # If this is the first CDS, associate all repos with it; if there
-            # was already a CDS registered it will have the repo associations
-            # and this new one will get them by way of the cluster
-            # normalization.
-            all_cdses = self.cds_list()
-
-            if len(all_cdses) == 1:
-                all_repos = self.repo_list()
-                for repo in all_repos:
-                    self.associate_repo(hostname, repo['id'])
-

Comment 4 wes hayutin 2012-07-18 18:27:38 UTC
*** Bug 840432 has been marked as a duplicate of this bug. ***

Comment 5 Martin Kočí 2012-08-01 14:33:03 UTC
Created attachment 601756 [details]
screenshot

it seems it's automatically associating repositories to the default CDS which it shouldn't be...see my crazy steps in attachment...Moving bug back to ON_DEV

Additional Info:
/root/RHEL-6.3-RHUI-2.1-20120731.0-Server-x86_64-DVD1.iso on /tmp/mnt type iso9660 (rw,loop=/dev/loop0)
[root@ip-10-85-5-60 ~]# rpm -qi rh-rhui-tools
Name        : rh-rhui-tools                Relocations: (not relocatable)
Version     : 2.1.6                             Vendor: Red Hat, Inc.
Release     : 1.el6_3                       Build Date: Mon 30 Jul 2012 01:03:36 PM EDT
Install Date: Wed 01 Aug 2012 08:40:13 AM EDT      Build Host: x86-004.build.bos.redhat.com
Group       : Applications/Internet         Source RPM: rh-rhui-tools-2.1.6-1.el6_3.src.rpm
Size        : 761647                           License: GPLv2
Signature   : (none)
Packager    : Red Hat, Inc. <http://bugzilla.redhat.com/bugzilla>
URL         : http://redhat.com
Summary     : Tools for installing and configuring the Red Hat Update Infrastructure
Description :
Tools necessary to configure the Red Hat Update Infrastructure.

Comment 6 wes hayutin 2012-08-01 15:53:15 UTC
In the text of attachment in comment five.. you are manually associating the repository to the CDS. AFAICT this is working.. 

If the RHUA was automatically associating the repository.. the repo would not be listed when you click "s" associate repo w/ cluster..

Please retest

Comment 7 Martin Kočí 2012-08-02 07:32:11 UTC
Created attachment 601885 [details]
screenshot 02

OK, it still doesn't work for me and here is the story:

If you create repositories as the first before you register CDS then you will see these repos avaialbe for associating (after you register the CDS)..so far so good...however if you then create another repository (while CDS is already registered) this repository will be still automatically associated to the default CDS and you won't see it in available repos. See my steps in attachment. 

In the attachment repos 
    Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
    Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
have been associated automatically.
Moving bug to ON_DEV for discusssion...

/koca

Comment 8 wes hayutin 2012-08-02 12:49:47 UTC
Created attachment 601942 [details]
repoassoc.txt

yup.. I missed something here.. will go back and trace it down.

Comment 9 wes hayutin 2012-08-02 13:08:24 UTC
commit 8a9e35e929d4b11ed57c7ea0d723cf0993573ee3

test run w/ fixed pulp-api.py


The following products will be deployed:
  Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (RPMs)
  Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (debug)
  Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (source)
Proceed? (y/n) y


Importing Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (RPMs)...
  Importing product repository Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (RPMs) (x86_64)...
Importing Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (debug)...
  Importing product repository Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (debug) (x86_64)...
Importing Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (source)...
  Importing product repository Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (source) (x86_64)...

Content will not be downloaded to the newly imported repositories
until the next sync is run.

------------------------------------------------------------------------------
rhui (repo) => <


------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Home =-

   r   manage repositories
   c   manage content delivery servers (CDS)
   s   synchronization status and scheduling
   e   create entitlement certificates and client configuration RPMs
   n   manage Red Hat entitlement certificates
   u   manage users
   i   manage identity certificate

                                        Connected: ip-10-70-90-96.ec2.internal
------------------------------------------------------------------------------
rhui (home) => c





















------------------------------------------------------------------------------
             -= Red Hat Update Infrastructure Management Tool =-


-= Content Delivery Server (CDS) Management =-

   l   list all CDS clusters and instances managed by the RHUI
   i   display detailed information on a CDS cluster
   a   register (add) a new CDS instance
   m   move CDS(s) to a different cluster
   d   unregister (delete) a CDS instance from the RHUI
   s   associate a repository with a CDS cluster
   u   unassociate a repository from a CDS cluster

                                        Connected: ip-10-70-90-96.ec2.internal
------------------------------------------------------------------------------
rhui (cds) => u

-= RHUI Content Delivery Server Clusters =-

Select the CDS Cluster for repo unassociation:
  1  - cluster1
Enter value (1-1) or 'b' to abort: 1

No available repositories for unassociation.


------------------------------------------------------------------------------
rhui (cds) => s

-= RHUI Content Delivery Server Clusters =-

Select the CDS Cluster for repo association:
  1  - cluster1
Enter value (1-1) or 'b' to abort: 1
Select one or more repositories to associate with the cluster1 cluster: 

  Custom Repositories

  Red Hat Repositories
    -  1 : Red Hat Enterprise Linux Server 5 (RPMs) (5Server-i386)
    -  2 : Red Hat Enterprise Linux Server 5 (RPMs) (5Server-x86_64)
    -  3 : Red Hat Enterprise Linux Server 6 (RPMs) (6Server-i386)
    -  4 : Red Hat Enterprise Linux Server 6 (RPMs) (6Server-x86_64)
    -  5 : Red Hat Storage 2.0 (RPMs) for RHUI (x86_64)
    -  6 : Red Hat Storage 2.0 (source) for RHUI (x86_64)
    -  7 : Red Hat Storage 2.0 for RHUI RHEL 6.2 (source) (x86_64)
    -  8 : Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (RPMs) (x86_64)
    -  9 : Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (debug) (x86_64)
    -  10: Red Hat Storage 2.0 for RHUI Scalable Filesystem 6.2 (source) (x86_64)
    -  11: Red Hat Update Infrastructure 2.0 (SRPMS) (6Server-i386)
    -  12: Red Hat Update Infrastructure 2.0 (SRPMS) (6Server-x86_64)

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

Comment 10 mkovacik 2012-08-02 14:42:31 UTC
Created attachment 601973 [details]
Verifying screen log

Verified in build: RHEL-6.3-RHUI-2.1-20120801.0-Server-x86_64-DVD1.iso. See the screen log attached

Comment 11 wes hayutin 2012-08-02 14:48:53 UTC
This was moved to on-qa and verified in error..
I fix was just posted for this issue in https://bugzilla.redhat.com/show_bug.cgi?id=840005#c9

We will be rebuilding an iso this evening that should contain the fix..
Please check comment 9 for details on a recreate

Comment 12 mkovacik 2012-08-02 16:12:49 UTC
> This was moved to on-qa and verified in error..
> I fix was just posted for this issue in
> https://bugzilla.redhat.com/show_bug.cgi?id=840005#c9
> 
> We will be rebuilding an iso this evening that should contain the fix..
> Please check comment 9 for details on a recreate

Sorry; I've missed the comment 7...(In reply to comment #11)

Comment 14 mkovacik 2012-08-12 13:57:20 UTC
Created attachment 603776 [details]
Verifying screen log 1

Verified in build: RHEL-6.3-RHUI-2.1-20120810.1-Server-x86_64-DVD1.iso
Steps:
- create CDS cluster-1
- create CDS cluster-2
- upload RHN entitlement
- add all entitled repositories
- create custom repo
No of the above repos are assigned to the any CDS cluster automatically any more QED ;)

Comment 15 Shikha 2012-08-16 09:45:29 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, repositories are no longer assigned to any pre existing CDS cluster automatically any more. This assignment needs to be done manually.

Comment 17 errata-xmlrpc 2012-08-24 11:55:19 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


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