Bug 1154790 - Node sync seems to be deleting the local repos on the node child with update strategy additive
Summary: Node sync seems to be deleting the local repos on the node child with update ...
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: nodes
Version: 2.4 Beta
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.6.0
Assignee: Jeff Ortel
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-10-20 18:56 UTC by Preethi Thomas
Modified: 2015-02-28 22:40 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-28 22:40:12 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Pulp Redmine 583 0 None None None Never

Description Preethi Thomas 2014-10-20 18:56:34 UTC
Description of problem:

If you have local repos on the node child and you are doing a node sync (Additive strategy) the local repos seems to be getting deleted
Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Setup node parent and child (I did not specify a strategy so the default is Additive)
2. Create and couple of repos on the node child
3.Create a repo on node parent in order to do a node sync 
4. Run node sync.
5. Observe that the local repos on the child node gets removed while node sync

Actual results:


On the parent

[root@cloud-qe-1-vm-1 ~]# pulp-admin node bind --repo-id zoon --node-id rhel66
Node bind succeeded.

Note: Repository [ zoon ] will be included in node synchronization.

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




(1/1) Repository: zoon
[==================================================] 100%




Synchronization succeeded

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

Repository: 
  Action:          Added
  Content Sources: 
    Downloads:     
      Source Id:       Parent Node
      Total Failed:    0
      Total Succeeded: 32
    Total Passes:  1
    Total Sources: 0
  Id:              zoon
  Units:           
    Added:   39
    Removed: 0
    Updated: 0



[root@cloud-qe-1-vm-1 ~]# pulp-admin node list
+----------------------------------------------------------------------+
                              Child Nodes
+----------------------------------------------------------------------+

Id:               rhel66
Display Name:     rhel66
Description:      None
Bindings:         
  Additive: zoon
Update Strategy:  additive
Notes:            


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




(1/1) Repository: zoon
[==================================================] 100%




Synchronization succeeded

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

Repository: 
  Action:          Removed
  Content Sources: 
    Downloads: 
  Id:              cdn
  Units:           
    Added:   0
    Removed: 0
    Updated: 0

Repository: 
  Action:          Merged
  Content Sources: 
    Downloads:     
    Total Passes:  0
    Total Sources: 0
  Id:              zoon
  Units:           
    Added:   0
    Removed: 0
    Updated: 0



[root@cloud-qe-1-vm-1 ~]# 



On the child


[root@cloud-qe-22 ~]# pulp-admin rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  zoon
Display Name:        zoon
Description:         None
Content Unit Counts: 
  Erratum:          4
  Package Category: 1
  Package Group:    2
  Rpm:              32

Id:                  cdn
Display Name:        cdn
Description:         None
Content Unit Counts: 
  Erratum:                4
  Package Category:       1
  Package Group:          6
  Rpm:                    36
  Yum Repo Metadata File: 1


[root@cloud-qe-22 ~]# pulp-admin rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  zoon
Display Name:        zoon
Description:         None
Content Unit Counts: 
  Erratum:          4
  Package Category: 1
  Package Group:    2
  Rpm:              32


[root@cloud-qe-22 ~]# 




Expected results:


Additional info:

Comment 1 Jeff Ortel 2014-10-21 21:22:03 UTC
Investigated and looks like the strategy stored in the consumer notes is never injected into the options sent to the child node when sync is requested.  Satellite currently hard codes the strategy to 'mirror' which is the default applied by nodes anyway.  So, this does not have an immediate affect on satellite.  But, still needs to be fixed.  Short term, I suggest we have the nodes profiler inject the strategy into the request stream like it (currently) injects other information.

Comment 2 Jeff Ortel 2014-12-18 22:00:59 UTC
https://github.com/pulp/pulp/pull/1446

Comment 3 Chris Duryee 2014-12-23 20:52:35 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 4 Preethi Thomas 2015-01-29 21:13:47 UTC
verified

[root@cloud-qe-4 ~]# rpm -qa |grep pulp-nodes
pulp-nodes-admin-extensions-2.6.0-0.5.beta.el7.noarch
pulp-nodes-parent-2.6.0-0.5.beta.el7.noarch
pulp-nodes-common-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 ~]# 
[root@cloud-qe-4 ~]# 
[root@cloud-qe-4 ~]# 
[root@cloud-qe-4 ~]# pulp-admin node list
+----------------------------------------------------------------------+
                              Child Nodes
+----------------------------------------------------------------------+

Id:               foo
Display Name:     foo
Description:      None
Bindings:         
  Additive: pulp-el6
Update Strategy:  additive
Notes:            


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




(1/1) Repository: pulp-el6
[==================================================] 100%




Synchronization succeeded

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

Repository: 
  Action:          Merged
  Content Sources: 
    Downloads:     
    Total Sources: 0
  Id:              pulp-el6
  Units:           
    Added:   0
    Removed: 0
    Updated: 0



[root@cloud-qe-4 ~]# 


After node sync on the node child

[root@ibm-x3550m3-07 ~]# pulp-admin rpm repo list
+----------------------------------------------------------------------+
                            RPM Repositories
+----------------------------------------------------------------------+

Id:                  pulp-el6
Display Name:        pulp-el6
Description:         None
Content Unit Counts: 
  Package Group: 7
  Rpm:           71

Id:                  zoo
Display Name:        zoo
Description:         None
Content Unit Counts: 
  Erratum:          4
  Package Category: 1
  Package Group:    2
  Rpm:              32

Comment 5 Brian Bouterse 2015-02-28 22:40:12 UTC
Moved to https://pulp.plan.io/issues/583


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