Bug 1145719 - pulp directory import does not delete missing files
Summary: pulp directory import does not delete missing files
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Pulp
Classification: Retired
Component: rpm-support
Version: Master
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: 2.6.0
Assignee: Jeremy Cline
QA Contact: Preethi Thomas
URL:
Whiteboard:
Depends On:
Blocks: 1131146 1175493
TreeView+ depends on / blocked
 
Reported: 2014-09-23 14:42 UTC by Bryan Kearney
Modified: 2015-02-28 22:21 UTC (History)
8 users (show)

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


Attachments (Terms of Use)


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

Comment 1 Jeremy Cline 2014-11-25 21:28:07 UTC
https://github.com/pulp/pulp_puppet/pull/156

Comment 2 Chris Duryee 2014-12-23 20:53:10 UTC
fixed in pulp 2.6.0-0.2.beta

Comment 3 Preethi Thomas 2015-01-30 16:43:09 UTC
verified

[root@cloud-qe-4 modules]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]# rpm -qa |grep puppet
pulp-puppet-admin-extensions-2.6.0-0.5.beta.el7.noarch
pulp-puppet-tools-2.6.0-0.5.beta.el7.noarch
python-pulp-puppet-common-2.6.0-0.5.beta.el7.noarch
pulp-puppet-plugins-2.6.0-0.5.beta.el7.noarch
puppet-3.6.2-3.el7.noarch
[root@cloud-qe-4 modules]# 


[root@cloud-qe-4 modules]# cd
[root@cloud-qe-4 ~]# cat /etc/pulp/server/plugins.conf.d/puppet_importer.json 

{
 "remove_missing": "True"
}
[root@cloud-qe-4 ~]# 

Here are the steps I followed

1. Enable remove_missing in puppet_importer.json
$ sudo mkdir -p /opt/puppet/modules
$ sudo chmod -R 777 /opt/puppet
$ cd /opt/puppet
$ pulp-puppet-module-builder --url=https://github.com/puppetlabs/puppetlabs-xinetd -o ../modules

$ pulp-puppet-module-builder --working-dir=/opt/puppet --output-dir=/opt/puppet/modules --clean --url=https://github.com/puppetlabs/puppetlabs-mcollective.git -t 2.0.0

$pulp-admin puppet repo sync run --repo-id=puppet-builds

Now I removed the puppetlabs-mcollective-2.0.0.tar.gz

$ rm -rf puppetlabs-mcollective-2.0.0.tar.gz

Also removed it from the PULP_MANIFEST

Now ran pulp-admin puppet repo sync run --repo-id=puppet-builds

listing puppet repo shows that the module is removed from the repo





[root@cloud-qe-4 modules]# ls
PULP_MANIFEST  puppetlabs-inifile-1.1.3.tar.gz  puppetlabs-xinetd-1.4.0.tar.gz  reidmv-mco_profile-0.1.0.tar.gz
[root@cloud-qe-4 modules]# vi PULP_MANIFEST 
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]# rm -rf reidmv-mco_profile-0.1.0.tar.gz
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]# pulp-admin puppet repo sync run --repo-id=puppet-builds
+----------------------------------------------------------------------+
                Synchronizing Repository [puppet-builds]
+----------------------------------------------------------------------+

This command may be exited via ctrl+c without affecting the request.


Downloading metadata...
[==================================================] 100%
Metadata Query: 1/1 items
... completed

Downloading new modules...
[==================================================] 100%
Module: 0/0 items
... completed


Task Succeeded



Publishing modules...
[==================================================] 100%
Module: 2/2 items
... completed

Generating repository metadata...
[-]
... completed

Publishing repository over HTTP...
... completed

Publishing repository over HTTPS...
... skipped

Task Succeeded


[root@cloud-qe-4 modules]# pulp-admin puppet repo list
+----------------------------------------------------------------------+
                          Puppet Repositories
+----------------------------------------------------------------------+

Id:                  repo1
Display Name:        Repo 1
Description:         Mirror of Puppet Forge
Content Unit Counts: 
  Puppet Module: 1835

Id:                  puppet-builds
Display Name:        puppet-builds
Description:         None
Content Unit Counts: 
  Puppet Module: 2


[root@cloud-qe-4 modules]# rpm -qa pulp-server
pulp-server-2.6.0-0.5.beta.el7.noarch
[root@cloud-qe-4 modules]# 
[root@cloud-qe-4 modules]#

Comment 4 Brian Bouterse 2015-02-28 22:21:44 UTC
Moved to https://pulp.plan.io/issues/539


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