This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 840005 - repos automatically associated with the first cds created
repos automatically associated with the first cds created
Status: CLOSED ERRATA
Product: Red Hat Update Infrastructure for Cloud Providers
Classification: Red Hat
Component: RHUA (Show other bugs)
2.1
Unspecified Unspecified
high Severity unspecified
: ---
: ---
Assigned To: mkovacik
Martin Kočí
:
: 840432 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-13 08:43 EDT by mkovacik
Modified: 2012-08-24 09:27 EDT (History)
7 users (show)

See Also:
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.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-08-24 07:55:19 EDT
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)
Screen log (33.58 KB, text/plain)
2012-07-13 08:43 EDT, mkovacik
no flags Details
workflow showing this is only a messaging issue (4.00 KB, text/plain)
2012-07-13 09:16 EDT, wes hayutin
no flags Details
screenshot (21.21 KB, text/plain)
2012-08-01 10:33 EDT, Martin Kočí
no flags Details
screenshot 02 (16.44 KB, text/plain)
2012-08-02 03:32 EDT, Martin Kočí
no flags Details
repoassoc.txt (4.05 KB, text/plain)
2012-08-02 08:49 EDT, wes hayutin
no flags Details
Verifying screen log (16.81 KB, text/plain)
2012-08-02 10:42 EDT, mkovacik
no flags Details
Verifying screen log 1 (67.05 KB, application/octet-stream)
2012-08-12 09:57 EDT, mkovacik
no flags Details

  None (edit)
Description mkovacik 2012-07-13 08:43:20 EDT
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 09:16:26 EDT
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 09:16:52 EDT
Milan, you should be able to move forward with your testing.
Comment 3 wes hayutin 2012-07-13 11:57:24 EDT
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 14:27:38 EDT
*** Bug 840432 has been marked as a duplicate of this bug. ***
Comment 5 Martin Kočí 2012-08-01 10:33:03 EDT
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 11:53:15 EDT
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 03:32:11 EDT
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 08:49:47 EDT
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 09:08:24 EDT
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 10:42:31 EDT
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 10:48:53 EDT
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 12:12:49 EDT
> 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 09:57:20 EDT
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 05:45:29 EDT
    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 07:55:19 EDT
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.