Bug 1123445 - Puppet Module sync incorrectly calculates module name
Summary: Puppet Module sync incorrectly calculates module name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Packaging
Version: 6.0.3
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: Unspecified
Assignee: Jason Montleon
QA Contact: Og Maciel
URL:
Whiteboard:
Depends On:
Blocks: 1122832 1123446
TreeView+ depends on / blocked
 
Reported: 2014-07-25 16:19 UTC by Justin Sherrill
Modified: 2019-09-26 15:44 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1123446 (view as bug list)
Environment:
Last Closed: 2014-09-11 12:28:47 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Justin Sherrill 2014-07-25 16:19:23 UTC
Description of problem:

When using puppet module sync on a puppet repo created using pulp-puppet-module-builder, puppet modules are imported with a name of 'author-name' instead of just 'name'

The same issue does not occur when using hammer or the webUI to upload the modules 


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

pulp-server-2.4.0-0.23.beta.el6sat.noarch

How reproducible:
Always

Steps to Reproduce:
1.  Download a puppet module such as puppetlabs-concat from puppet forge
2.  Extract the module in a directory /modules
3.  cd /modules && pulp-puppet-module-builder
4.  chmod 755 /modules
5.  Create a puppet repo with url of  file:///modules
6.  Sync the repo

Actual results:
The puppet module is imported with a name of 'puppetlabs-concat'.  The module is viewable via content search or the 'content view puppet modules' page

Expected results:
The puppet module is imported with a name of 'concat'


Additional info:

Comment 1 Justin Sherrill 2014-07-25 16:22:43 UTC
patch from a customer to fix the issue.  (Note it was sent in email, so spacing is likely off)

diff -urN /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers.old/directory.py /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers/directory.py
--- /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers.old/directory.py 2014-06-16 13:00:58.706453008 +0000
+++ /usr/lib/python2.6/site-packages/pulp_puppet/plugins/importers/directory.py 2014-06-16 13:01:10.871179975 +0000
@@ -271,6 +271,7 @@
if self.canceled:
return []
puppet_manifest = self._extract_metadata(module_path)
+ puppet_manifest["name"]=puppet_manifest["name"].replace(puppet_manifest["author"]+"-","")
module = Module.from_dict(puppet_manifest)
if inventory.already_associated(module):
continue

Comment 4 Og Maciel 2014-09-03 15:25:22 UTC
* wget https://forgeapi.puppetlabs.com/v3/files/puppetlabs-concat-1.0.4.tar.gz
* mkdir modules
* tar zxvf puppetlabs-concat-1.0.4.tar.gz -C modules/
* cd modules/
* pulp-puppet-module-builder
* cd
* chmod 755 modules/
* hammer -u admin -p changeme repository create --name='Puppet Concat' --organization='Default_Organization' --product='Forge' --content-type='puppet' --publish-via-http=true --url=file:///modules
* hammer -u admin -p changeme repository synchronize --id 63 --organization='Default_Organization'
[...................                                                                                                                                        ] [12%]
Task 507daed9-d9bc-43b2-91c1-202d6473ec06: error

Comment 5 Og Maciel 2014-09-03 15:50:45 UTC
Ok, so I moved /root/modules to /tmp/modules and it worked.

Comment 6 Og Maciel 2014-09-03 15:51:44 UTC
VERIFIED by QE:

Browser:
=====
* Firefox 31.0 (MacOS)

Build:  
====
* Satellite-6.0.4-RHEL-6-20140829.0

Packages:
======
* apr-util-ldap-1.3.9-3.el6_0.1.x86_64
* candlepin-0.9.23-1.el6_5.noarch
* candlepin-common-1.0.1-1.el6_5.noarch
* candlepin-scl-1-5.el6_4.noarch
* candlepin-scl-quartz-2.1.5-5.el6_4.noarch
* candlepin-scl-rhino-1.7R3-1.el6_4.noarch
* candlepin-scl-runtime-1-5.el6_4.noarch
* candlepin-selinux-0.9.23-1.el6_5.noarch
* candlepin-tomcat6-0.9.23-1.el6_5.noarch
* elasticsearch-0.90.10-6.el6sat.noarch
* foreman-1.6.0.42-1.el6sat.noarch
* foreman-compute-1.6.0.42-1.el6sat.noarch
* foreman-gce-1.6.0.42-1.el6sat.noarch
* foreman-libvirt-1.6.0.42-1.el6sat.noarch
* foreman-ovirt-1.6.0.42-1.el6sat.noarch
* foreman-postgresql-1.6.0.42-1.el6sat.noarch
* foreman-proxy-1.6.0.30-1.el6sat.noarch
* foreman-selinux-1.6.0.14-1.el6sat.noarch
* foreman-vmware-1.6.0.42-1.el6sat.noarch
* katello-1.5.0-30.el6sat.noarch
* katello-ca-consumer-cloud-qe-10.idmqe.lab.eng.bos.redhat.com-1.0-1.noarch
* katello-certs-tools-1.5.6-1.el6sat.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-0.0.64-1.el6sat.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.23-32.el6_4.1.x86_64
* pulp-katello-0.3-4.el6sat.noarch
* pulp-nodes-common-2.4.1-0.5.rc1.el6sat.noarch
* pulp-nodes-parent-2.4.1-0.5.rc1.el6sat.noarch
* pulp-puppet-plugins-2.4.1-0.5.rc1.el6sat.noarch
* pulp-puppet-tools-2.4.1-0.5.rc1.el6sat.noarch
* pulp-rpm-plugins-2.4.1-0.6.beta.el6sat.noarch
* pulp-selinux-2.4.1-0.5.rc1.el6sat.noarch
* pulp-server-2.4.1-0.5.rc1.el6sat.noarch
* python-ldap-2.3.10-1.el6.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el6sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el6sat.noarch
* rubygem-hammer_cli-0.1.1-12.el6sat.noarch
* rubygem-hammer_cli_foreman-0.1.1-16.el6sat.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.3-3.el6sat.noarch
* rubygem-hammer_cli_import-0.10.2-1.2.el6sat.noarch
* rubygem-hammer_cli_katello-0.0.4-14.el6sat.noarch

Browser:
=====
* Firefox 31.0 (MacOS)

Build:  
====
* Satellite/Satellite-6.0.4-RHEL-7-20140829.0

Packages:
======
* candlepin-0.9.23-1.el7.noarch
* candlepin-common-1.0.1-1.el7.noarch
* candlepin-guice-3.0-2_redhat_1.el7.noarch
* candlepin-scl-1-5.el7.noarch
* candlepin-scl-quartz-2.1.5-6.el7.noarch
* candlepin-scl-rhino-1.7R3-3.el7.noarch
* candlepin-scl-runtime-1-5.el7.noarch
* candlepin-selinux-0.9.23-1.el7.noarch
* candlepin-tomcat-0.9.23-1.el7.noarch
* elasticsearch-0.90.10-6.el7sat.noarch
* foreman-1.6.0.42-1.el7sat.noarch
* foreman-compute-1.6.0.42-1.el7sat.noarch
* foreman-gce-1.6.0.42-1.el7sat.noarch
* foreman-libvirt-1.6.0.42-1.el7sat.noarch
* foreman-ovirt-1.6.0.42-1.el7sat.noarch
* foreman-postgresql-1.6.0.42-1.el7sat.noarch
* foreman-proxy-1.6.0.30-1.el7sat.noarch
* foreman-selinux-1.6.0.14-1.el7sat.noarch
* foreman-vmware-1.6.0.42-1.el7sat.noarch
* katello-1.5.0-30.el7sat.noarch
* katello-certs-tools-1.5.6-1.el7sat.noarch
* katello-default-ca-1.0-1.noarch
* katello-installer-0.0.64-1.el7sat.noarch
* katello-server-ca-1.0-1.noarch
* openldap-2.4.39-3.el7.x86_64
* pulp-katello-0.3-4.el7sat.noarch
* pulp-nodes-common-2.4.1-0.5.rc1.el7sat.noarch
* pulp-nodes-parent-2.4.1-0.5.rc1.el7sat.noarch
* pulp-puppet-plugins-2.4.1-0.5.rc1.el7sat.noarch
* pulp-puppet-tools-2.4.1-0.5.rc1.el7sat.noarch
* pulp-rpm-plugins-2.4.1-0.6.beta.el7sat.noarch
* pulp-selinux-2.4.1-0.5.rc1.el7sat.noarch
* pulp-server-2.4.1-0.5.rc1.el7sat.noarch
* python-ldap-2.4.6-6.el7.x86_64
* ruby193-rubygem-net-ldap-0.3.1-3.el7sat.noarch
* ruby193-rubygem-runcible-1.1.0-2.el7sat.noarch
* rubygem-hammer_cli-0.1.1-12.el7sat.noarch
* rubygem-hammer_cli_foreman-0.1.1-16.el7sat.noarch
* rubygem-hammer_cli_foreman_tasks-0.0.3-3.el7sat.noarch
* rubygem-hammer_cli_import-0.10.2-1.2.el7sat.noarch
* rubygem-hammer_cli_katello-0.0.4-14.el7sat.noarch

Comment 7 Bryan Kearney 2014-09-11 12:28:47 UTC
This was delivered with Satellite 6.0 which was released on 10 September 2014.


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