Project

Profile

Help

Issue #1309

pulp-puppet-module-builder DELETEs working_dir (and is severely broken in other ways...)

Added by jortel@redhat.com about 5 years ago. Updated over 1 year ago.

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

Description

Description of problem:

  • malformed URLs can even make pulp-puppet-module-builder DELETE the whole working_dir (dont try --url=/srv/git/puppet-modules.git/ or anything ending with a slash)
  • it does not work if a git repo contains more than one puppet module
  • it does not work for URLs with relative path names like --url=:puppet-modules.git
  • --clean option does not work for any repo where the remote puppet-modules.git is cloned to a local puppet-modules/

Version-Release number of selected component (if applicable):
pulp-puppet-tools-2.6.0.14-1
python-pulp-puppet-common-2.6.0.14-1

How reproducible:
Just try anything of the above.

Actual results:
Nothing useful at best or in case of malformed URL complete loss of data in working_dir

Associated revisions

Revision 17738f98 View on GitHub
Added by jortel@redhat.com over 4 years ago

Fix --clean option. closes #1309

Revision d62b86ba View on GitHub
Added by jortel@redhat.com over 4 years ago

Fix --clean option. closes #130

History

#1 Updated by jortel@redhat.com about 5 years ago

Let's discuss each issue separately:

- The behavior of --clean when the URL has a trailing '/' is definitely a bug and needs to be fixed.

- The issue of: "it does not work if a git repo contains more than one puppet module". Can you include the URL for a git repository containing more than one module? Tested with: :puppetlabs/puppetlabs-strings.git/ and it built (2) modules: username-test-0.0.1.tar.gz, puppetlabs-strings-0.2.0.tar.gz.

- The issue of: it "does not work for URLs with relative path names like --url=:puppet-modules.git". Can be more specific about what does not work?

The issue of: "--clean option does not work for any repo where the remote puppet-modules.git is cloned to a local puppet-modules". is definitely a bug and needs to be fixed.

#2 Updated by dkliban@redhat.com about 5 years ago

  • Triaged changed from No to Yes

Please create separate issues as you see appropriate.

#3 Updated by jortel@redhat.com over 4 years ago

  • Status changed from NEW to POST
  • Assignee set to jortel@redhat.com
  • Platform Release set to 2.8.1

#4 Updated by jortel@redhat.com over 4 years ago

Fixed --clean but still cannot reproduce the reported issues related to finding and building puppet modules. Ran this using the git repository suggested by the reporter.

[jortel@f23d ~]$ pulp-puppet-module-builder -w /tmp/puppet/ -cu https://github.com/shetze/puppet-modules.git/
rm -rf /tmp/puppet/puppet-modules
cd /tmp/puppet/
git clone --recursive https://github.com/shetze/puppet-modules.git
cd puppet-modules
git status
git remote show -n origin
git fetch
git fetch --tags
find . -name Modulefile -o -name metadata.json
puppet module build ./module-git
mkdir -p /tmp/puppet/
cp ./module-git/pkg/LunetIX-git-0.6.5.tar.gz /tmp/puppet/
puppet module build ./profile-buildhost
mkdir -p /tmp/puppet/
cp ./profile-buildhost/pkg/LunetIX-buildhost-0.4.5.tar.gz /tmp/puppet/
puppet module build ./profile-dockerhost
mkdir -p /tmp/puppet/
cp ./profile-dockerhost/pkg/LunetIX-dockerhost-0.3.0.tar.gz /tmp/puppet/
cp ./profile-dockerhost/pkg/LunetIX-dockerhost-0.1.0.tar.gz /tmp/puppet/
cd /tmp/puppet/
cd /tmp/puppet/puppet-modules
cd /home/jortel
rm -rf /tmp/puppet/puppet-modules
[jortel@f23d ~]$ ll /tmp/puppet
total 48
-rw-rw-r-- 1 jortel jortel 27334 Mar  7 12:36 LunetIX-buildhost-0.4.5.tar.gz
-rw-rw-r-- 1 jortel jortel  3799 Mar  7 12:36 LunetIX-dockerhost-0.1.0.tar.gz
-rw-rw-r-- 1 jortel jortel  3757 Mar  7 12:36 LunetIX-dockerhost-0.3.0.tar.gz
-rw-rw-r-- 1 jortel jortel  5931 Mar  7 12:36 LunetIX-git-0.6.5.tar.gz
-rw-rw-r-- 1 jortel jortel   401 Mar  7 12:36 PULP_MANIFEST
[jortel@f23d ~]$ cat /tmp/puppet/PULP_MANIFEST 
LunetIX-dockerhost-0.1.0.tar.gz,f66dede1e6be15bbc9b6bbe6397b75d24fd1b7c931a66276ed8959bee7621716,3799
LunetIX-dockerhost-0.3.0.tar.gz,5650f8e3a4e87c116445275b53d216e54494f41123600208e8edf08e84f75316,3757
LunetIX-buildhost-0.4.5.tar.gz,7d0a22531211c5fe8c49a6a26f92a548e67fdb9dd2940800e5f11fbd1dc0784a,27334
LunetIX-git-0.6.5.tar.gz,bc933e9e7449267fd1df8c719fd5235719dc58ba08d17a2ad9a52e6070c1b958,5931

#5 Updated by jortel@redhat.com over 4 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#6 Updated by jortel@redhat.com over 4 years ago

  • Status changed from MODIFIED to POST

#7 Updated by semyers over 4 years ago

  • Platform Release changed from 2.8.1 to 2.8.2

#8 Updated by jcline@redhat.com over 4 years ago

  • Status changed from POST to 5
  • Platform Release changed from 2.8.2 to 2.8.1

This was not moved to the correct state when it was merged. It is contained in the ``pulp-puppet-2.8.1-0.1.beta`` tag so I'm moving it to a 2.8.1 release target.

#9 Updated by semyers over 4 years ago

  • Status changed from 5 to CLOSED - CURRENTRELEASE

#11 Updated by bmbouter over 1 year ago

  • Tags Pulp 2 added

Please register to edit this issue

Also available in: Atom PDF