Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot switch module from forge to git #30

Closed
adrienthebo opened this issue May 20, 2013 · 3 comments
Closed

Cannot switch module from forge to git #30

adrienthebo opened this issue May 20, 2013 · 3 comments
Labels
Milestone

Comments

@adrienthebo
Copy link
Contributor

The Forge and Git modules don't take into consideration that an existing module might be switched from one to the other. As such, doing this could make things explode pretty badly. Modules should be able to determine if they need to wipe an existing directory when installing or updating.

This issue addresses the problem raised in #2 (comment)

@eliasp
Copy link
Contributor

eliasp commented Aug 21, 2013

A related issue is: replacing a modules implementation, e.g. changing this:

mod 'puppetlabs/firewall'

to this:

mod 'firewall'
    :git => 'https://github.com/example42/puppet-firewall.git'

The result is this error message:

root@puppetmaster production [production] # r10k puppetfile install
[R10K::TaskRunner - ERROR] Task #<R10K::Task::Module::Sync:0x00000002884c60> failed while running:
"git clone --reference /root/.r10k/git/https---github.com-example42-puppet-firewall.git
https://github.com/example42/puppet-firewall.git /etc/puppet/environments/production/modules/firewall"
returned with non-zero exit value 128

@ssm
Copy link
Contributor

ssm commented Aug 23, 2013

Just to add the git error message to this ticket.

The error message from r10k is:

[R10K::TaskRunner - ERROR] Task #<R10K::Task::Module::Sync:0x000000020a6020> failed while running: \
  "git clone --reference /srv/puppet/cache/git---github.com-puppetlabs-puppetlabs-apt.git \
  git://github.com/puppetlabs/puppetlabs-apt.git /srv/puppet/env/production/modules/apt" \
  returned with non-zero exit value 128

While the error message from that git command line is:

# git clone --reference /srv/puppet/cache/git---github.com-puppetlabs-puppetlabs-apt.git \
  git://github.com/puppetlabs/puppetlabs-apt.git /srv/puppet/env/production/modules/apt
fatal: destination path '/srv/puppet/env/production/modules/apt' already exists \
 and is not an empty directory.

Deleting the directory /srv/puppet/env/production/modules/apt (and for the other environments as well) lets r10k check out the module from the cache git repository.

adrienthebo added a commit that referenced this issue Feb 9, 2014
@adrienthebo
Copy link
Contributor Author

This issue should be fixed in 1.2.0, if this still persists reopen this ticket and we can continue this discussion.

sarameisburger pushed a commit to sarameisburger/r10k that referenced this issue Apr 12, 2019
(maint) Update peversion to 4.0 for the 4.0.x branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants