Project

Profile

Help

Issue #1879

closed

Incorrect name when syncing puppet module from the filesystem

Added by tomckay@redhat.com almost 8 years ago. Updated about 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
High
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
2.8.3
Platform Release:
2.8.5
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Pulp 2
Sprint:
Sprint 2
Quarter:

Description

### For creating local motd module ###
sudo mkdir /var/www/html/pub/puppet-modules
sudo chmod a+rw /var/www/html/pub/puppet-modules
git clone https://github.com/puppetlabs/puppetlabs-motd.git
cd puppetlabs-motd
sudo pulp-puppet-module-builder --output-dir /var/www/html/pub/puppet-modules .

Sync this into Pulp with:

pulp-admin puppet repo create --repo-id=motd --feed=file:///var/www/html/pub/puppet-modules
pulp-admin puppet repo sync run --repo-id motd

If you look at the name stored in the DB for that puppet module you'll see:

"name" : "puppetlabs-motd",

The module name is puppetlabs-motd in the metadata.json, but for 2 reasons the name is expected to be just 'motd'.

1. When this module is published with the puppet install distributor, the folder name will be 'puppet-motd' which causes puppet to error when it runs. It expects the folder to be the same name as the puppet class which is motd.

2. This is different from the name produced by this same module brought in via sync-from -puppet-forge or traditional upload.

I recommend having the sync from file:// also use split_filename() as the others[0][1] do today.

[0]: https://github.com/pulp/pulp_puppet/blob/c9598b39f21a366dd771b05f9c6e3831f33f78e2/pulp_puppet_plugins/pulp_puppet/plugins/importers/forge.py#L298
[1]: https://github.com/pulp/pulp_puppet/blob/c9598b39f21a366dd771b05f9c6e3831f33f78e2/pulp_puppet_plugins/pulp_puppet/plugins/importers/upload.py#L46

Also available in: Atom PDF