Bug 796934 - Removing a cds node shouldn't remove the repos association with other cds node.
Summary: Removing a cds node shouldn't remove the repos association with other cds node.
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Pulp
Classification: Retired
Component: nodes
Version: unspecified
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: ---
Assignee: James Slagle
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On: 796771
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-23 21:57 UTC by James Slagle
Modified: 2012-05-25 14:13 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 796771
Environment:
Last Closed: 2012-05-25 14:13:24 UTC


Attachments (Terms of Use)

Description James Slagle 2012-02-23 21:57:41 UTC
+++ This bug was initially created as a clone of Bug #796771 +++

Description of problem:
I'm not sure if it's just the issue in the 'cds list' command of pulp-admin or its really disassociating the repo from one of CDS server in the following scenario. 

Scenario is like:
I synced few repos on rhua and later registered two CDS nodes. All the added repos automatically get associated with both CDS nodes. 

Later I un-register one of the cds node (cds2), and when I check the cds list from pulp-admin, it was showing 'none' association under CDS1 as well.



Version-Release number of selected component (if applicable):


How reproducible:
always on this build

Steps to Reproduce:
1. sync repos
2. register 2 cds nodes using rhui-manager
3. check 'cds list' from pulp-admin
4. unregister one cds node using rhui-manager
5. again check 'cds list' from pulp-admin
  
Actual results:
pulp-admin should show the list of associated repos for cds1, even after un-registering cds2.

Expected results:
Removing a cds node shouldn't remove the repos association with other cds node.

Additional info:

Added following repos:
=======================

------------------------------------------------------------------------------
rhui (repo) => l

Custom Repositories
  pulp

Red Hat Repositories
  Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-i386)
  Red Hat Update Infrastructure 1.2 (RPMs) (5Server-x86_64)
  Red Hat Update Infrastructure 2.0 (Source RPMs) (6Server-x86_64)
  Red Hat Update Infrastructure 1.2 (RPMs) (5Server-i386)
  Red Hat Enterprise Linux 6 Server (RPMs) from RHUI (6Server-i386)
  Red Hat Enterprise Linux 6 Server (RPMs) from RHUI (6Server-x86_64)
  Red Hat Enterprise Linux 5 Server from RHUI (RPMs) (5Server-i386)
  Red Hat Enterprise Linux 5 Server from RHUI (RPMs) (5Server-x86_64)



Then registered two cds nodes, all the repo's are associated with both cds nodes:
===============================================================================
[root@ip-10-123-39-120 ~]# pulp-admin -u admin -p admin cds list
+------------------------------------------+
                CDS Instances
+------------------------------------------+

Name                	cds1                     
Hostname            	ip-10-123-43-173.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-02-23T16:21:26-05:00/PT6H
Repos               	rhel-x86_64-6-rhui-2-source-rpms-6Server-i386, rhel-x86_64-5-rhui-1-rpms-5Server-x86_64, rhel-x86_64-6-rhui-2-source-rpms-6Server-x86_64, rhel-x86_64-5-rhui-1-rpms-5Server-i386, rhel-6-rhui-server-rpms-6Server-i386, rhel-6-rhui-server-rpms-6Server-x86_64, rhel-5-server-rhui-rpms-5Server-i386, rhel-5-server-rhui-rpms-5Server-x86_64, custom_001
Last Sync           	Never                    
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-23 15:22:22.259408+00:00


Name                	cds2                     
Hostname            	ip-10-122-77-231.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-02-23T16:21:53-05:00/PT6H
Repos               	rhel-x86_64-6-rhui-2-source-rpms-6Server-i386, rhel-x86_64-5-rhui-1-rpms-5Server-x86_64, rhel-x86_64-6-rhui-2-source-rpms-6Server-x86_64, rhel-x86_64-5-rhui-1-rpms-5Server-i386, rhel-6-rhui-server-rpms-6Server-i386, rhel-6-rhui-server-rpms-6Server-x86_64, rhel-5-server-rhui-rpms-5Server-i386, rhel-5-server-rhui-rpms-5Server-x86_64, custom_001
Last Sync           	Never                    
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-23 15:22:22.976496+00:00


unregister one cds node ( cds2 ):
===============================

------------------------------------------------------------------------------
rhui (cds) => d

Select the CDS instances to be removed from the RHUI: 
  -  1 : cds1
  -  2 : cds2
Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 2

Select the CDS instances to be removed from the RHUI: 
  -  1 : cds1
  x  2 : cds2
Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


All previously deployed repositories will be deleted when a CDS is unregistered.

The following CDS instances will be unregistered:
  cds2
Proceed? (y/n) y


Unregistering cds2...

------------------------------------------------------------------------------
rhui (cds) => ^




cds list shows 'none for cds1:
==========================
[root@ip-10-123-39-120 ~]# pulp-admin -u admin -p admin cds list
+------------------------------------------+
                CDS Instances
+------------------------------------------+

Name                	cds1                     
Hostname            	ip-10-123-43-173.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-02-23T16:21:26-05:00/PT6H
Repos               	None                     
Last Sync           	Never                    
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-23 15:24:52.510747+00:00

--- Additional comment from sghai on 2012-02-23 11:02:00 EST ---

Found with latest RHUI2.0.2 iso (RHEL-6.2-RHUI-2.0.2-20120222.0-Server-x86_64-DVD1.iso)

--- Additional comment from sghai on 2012-02-23 11:03:34 EST ---

I went ahead  and re-register the CDS2 node again. Still repo association was displayed as none both cds1 and 2 nodes.

+------------------------------------------+
                CDS Instances
+------------------------------------------+

Name                	cds1                     
Hostname            	ip-10-123-43-173.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-02-23T16:21:26-05:00/PT6H
Repos               	None                     
Last Sync           	Never                    
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-23 15:30:03.026844+00:00


Name                	cds2                     
Hostname            	ip-10-122-77-231.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-02-23T16:29:56-05:00/PT6H
Repos               	None                     
Last Sync           	Never                    
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-23 15:30:03.598722+00:00

--- Additional comment from sghai on 2012-02-23 11:18:37 EST ---

Another observation, if we removed both nodes or all nodes in one cds cluster and re-register them again then 'cds list' shows correct repo's


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


-= Content Delivery Server (CDS) Management =-

   l   list all CDS instances registered to the RHUI
   a   register (add) a new CDS instance
   d   unregister (delete) a CDS instance from the RHUI

                                      Connected: ip-10-123-39-120.ec2.internal
------------------------------------------------------------------------------
rhui (cds) => d

Select the CDS instances to be removed from the RHUI: 
  -  1 : cds1
  -  2 : cds2
Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: 1-2

Select the CDS instances to be removed from the RHUI: 
  x  1 : cds1
  x  2 : cds2
Enter value (1-2) to toggle selection, 'c' to confirm selections, or '?' for more commands: c


All previously deployed repositories will be deleted when a CDS is unregistered.

The following CDS instances will be unregistered:
  cds1
  cds2
Proceed? (y/n) y


Unregistering cds1...
Unregistering cds2...

------------------------------------------------------------------------------
rhui (cds) => a

Prior to registering a CDS, the CDS must be configured and running.

Hostname of the CDS to register:
ip-10-123-43-173.ec2.internal

Display name for the CDS [ip-10-123-43-173.ec2.internal]:
cds1


The following CDS instance will be registered:
  Hostname: ip-10-123-43-173.ec2.internal
  Name:     cds1
Proceed? (y/n) y


Successfully registered cds1

------------------------------------------------------------------------------
rhui (cds) => a

Prior to registering a CDS, the CDS must be configured and running.

Hostname of the CDS to register:
ip-10-122-77-231.ec2.internal 

Display name for the CDS [ip-10-122-77-231.ec2.internal]:
cds2


The following CDS instance will be registered:
  Hostname: ip-10-122-77-231.ec2.internal
  Name:     cds2
Proceed? (y/n) y


Successfully registered cds2

------------------------------------------------------------------------------
rhui (cds) => exit
[root@ip-10-123-39-120 ~]# pulp-admin -u admin -p admin cds list
+------------------------------------------+
                CDS Instances
+------------------------------------------+

Name                	cds1                     
Hostname            	ip-10-123-43-173.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-02-23T17:04:38-05:00/PT6H
Repos               	rhel-x86_64-6-rhui-2-source-rpms-6Server-i386, rhel-x86_64-5-rhui-1-rpms-5Server-x86_64, rhel-x86_64-6-rhui-2-source-rpms-6Server-x86_64, rhel-x86_64-5-rhui-1-rpms-5Server-i386, rhel-6-rhui-server-rpms-6Server-i386, rhel-6-rhui-server-rpms-6Server-x86_64, rhel-5-server-rhui-rpms-5Server-i386, rhel-5-server-rhui-rpms-5Server-x86_64, custom_001
Last Sync           	Never                    
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-23 16:05:16.656943+00:00


Name                	cds2                     
Hostname            	ip-10-122-77-231.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-02-23T17:05:09-05:00/PT6H
Repos               	rhel-x86_64-6-rhui-2-source-rpms-6Server-i386, rhel-x86_64-5-rhui-1-rpms-5Server-x86_64, rhel-x86_64-6-rhui-2-source-rpms-6Server-x86_64, rhel-x86_64-5-rhui-1-rpms-5Server-i386, rhel-6-rhui-server-rpms-6Server-i386, rhel-6-rhui-server-rpms-6Server-x86_64, rhel-5-server-rhui-rpms-5Server-i386, rhel-5-server-rhui-rpms-5Server-x86_64, custom_001
Last Sync           	Never                    
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-02-23 16:05:17.509209+00:00


[root@ip-10-123-39-120 ~]#

--- Additional comment from kbidarka on 2012-02-23 14:04:06 EST ---

Strange, it does show None even for me, but has no effect on the rhui end.

I was able to pull in packages from the  CDS node for clients which is still running, but difficult to foresee what side effects this could cause in future.

1) I re-synced the CDS which was still connected and it works
2) I added another repo on rhua and synced to cds.
( Now new repos get displayed under cds list)


I guess , as all the repos get synced from RHUA to CDS, this is not causing any effect at the rhui end.

--- Additional comment from jslagle on 2012-02-23 16:56:56 EST ---

I was able to reproduce this bug.  The problem is that any CDS you add to RHUI gets put into a cluster.  When you unregister a CDS in pulp in unassociates it from all repos, which affects all other CDS's in the cluster.

The fix is to first remove the CDS from the cluster before doing the unassociation in pulp.

Comment 1 James Slagle 2012-02-24 19:24:44 UTC
committed to pulp master and rhui branch c07abadac04b5ecc72a0330653af2b0f542a4425

Comment 2 James Slagle 2012-02-24 19:25:43 UTC
QA:
add a cds to a cluster and associate some repos to it.  Add another cds to that same cluster. 'pulp-admin cds list' should show the set of repos associated to both cds's.

now unregister one of the cds's, the repos should still be associated with the remaining cds.

Comment 3 Jeff Ortel 2012-02-29 23:16:11 UTC
build: 0.270

Comment 4 Sachin Ghai 2012-03-02 12:34:04 UTC

[root@ip-10-90-202-254 packages6]# pulp-admin -u admin -p admin cds list
+------------------------------------------+
                CDS Instances
+------------------------------------------+

Name                	cds1                     
Hostname            	ip-10-122-205-120.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-03-01T11:36:03-05:00/PT6H
Repos               	rhel-x86_64-5-rhui-1-debug-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-debug-rpms-5Server-i386, rhel-x86_64-5-rhui-1-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-rpms-5Server-i386, rhel-x86_64-5-rhui-1-source-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-source-rpms-5Server-i386, rhel-x86_64-6-rhui-2-debug-rpms-6Server-i386, rhel-x86_64-6-rhui-2-debug-rpms-6Server-x86_64, rhel-x86_64-6-rhui-2-rpms-6Server-i386, rhel-x86_64-6-rhui-2-source-rpms-6Server-i386, rhel-x86_64-6-rhui-2-rpms-6Server-x86_64, rhel-x86_64-6-rhui-2-source-rpms-6Server-x86_64, rhel-6-server-rhui-optional-rpms-6Server-i386, rhel-6-server-rhui-optional-rpms-6Server-x86_64, rhel-6-server-rhui-rpms-6Server-x86_64, rhel-6-server-rhui-rpms-6Server-i386, rhel-5-server-rhui-rpms-5Server-i386, rhel-5-server-rhui-rpms-5Server-x86_64, custom_001, custom_02, custom_03
Last Sync           	2012-03-02 07:04:22-05:00
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-03-02 12:31:24.658994+00:00


Name                	cds2                     
Hostname            	ip-10-124-99-145.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-03-01T11:39:21-05:00/PT6H
Repos               	rhel-x86_64-5-rhui-1-debug-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-debug-rpms-5Server-i386, rhel-x86_64-5-rhui-1-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-rpms-5Server-i386, rhel-x86_64-5-rhui-1-source-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-source-rpms-5Server-i386, rhel-x86_64-6-rhui-2-debug-rpms-6Server-i386, rhel-x86_64-6-rhui-2-debug-rpms-6Server-x86_64, rhel-x86_64-6-rhui-2-rpms-6Server-i386, rhel-x86_64-6-rhui-2-source-rpms-6Server-i386, rhel-x86_64-6-rhui-2-rpms-6Server-x86_64, rhel-x86_64-6-rhui-2-source-rpms-6Server-x86_64, rhel-6-server-rhui-optional-rpms-6Server-i386, rhel-6-server-rhui-optional-rpms-6Server-x86_64, rhel-6-server-rhui-rpms-6Server-x86_64, rhel-6-server-rhui-rpms-6Server-i386, rhel-5-server-rhui-rpms-5Server-i386, rhel-5-server-rhui-rpms-5Server-x86_64, custom_001, custom_02, custom_03
Last Sync           	2012-03-02 07:06:19-05:00
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-03-02 12:31:20.635899+00:00


[root@ip-10-90-202-254 packages6]#

Comment 5 Sachin Ghai 2012-03-02 12:37:55 UTC
unregistering one cds node,remains the repo association with other:
============================

[root@ip-10-90-202-254 packages6]# pulp-admin -u admin -p admin cds unregister --hostname ip-10-124-99-145.ec2.internal
Successfully unregistered CDS [ip-10-124-99-145.ec2.internal]

[root@ip-10-90-202-254 packages6]# pulp-admin -u admin -p admin cds list+------------------------------------------+
                CDS Instances
+------------------------------------------+

Name                	cds1                     
Hostname            	ip-10-122-205-120.ec2.internal
Description         	RHUI CDS                 
Cluster             	rhui-cds-cluster         
Sync Schedule       	2012-03-01T11:36:03-05:00/PT6H
Repos               	rhel-x86_64-5-rhui-1-debug-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-debug-rpms-5Server-i386, rhel-x86_64-5-rhui-1-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-rpms-5Server-i386, rhel-x86_64-5-rhui-1-source-rpms-5Server-x86_64, rhel-x86_64-5-rhui-1-source-rpms-5Server-i386, rhel-x86_64-6-rhui-2-debug-rpms-6Server-i386, rhel-x86_64-6-rhui-2-debug-rpms-6Server-x86_64, rhel-x86_64-6-rhui-2-rpms-6Server-i386, rhel-x86_64-6-rhui-2-source-rpms-6Server-i386, rhel-x86_64-6-rhui-2-rpms-6Server-x86_64, rhel-x86_64-6-rhui-2-source-rpms-6Server-x86_64, rhel-6-server-rhui-optional-rpms-6Server-i386, rhel-6-server-rhui-optional-rpms-6Server-x86_64, rhel-6-server-rhui-rpms-6Server-x86_64, rhel-6-server-rhui-rpms-6Server-i386, rhel-5-server-rhui-rpms-5Server-i386, rhel-5-server-rhui-rpms-5Server-x86_64, custom_001, custom_02, custom_03
Last Sync           	2012-03-02 07:04:22-05:00
Status:
   Responding       	Yes                      
   Last Heartbeat   	2012-03-02 12:36:35.187145+00:00


[root@ip-10-90-202-254 packages6]#

Comment 6 Preethi Thomas 2012-05-25 14:13:24 UTC
Pulp v1.1 Release


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