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:
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.
https://github.com/pulp/pulp/pull/1446
fixed in pulp 2.6.0-0.2.beta
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
Moved to https://pulp.plan.io/issues/583