我遇到了在Vagrant虚拟机中通过puppetlabs/mysql
安装librarian-puppet
的问题。经过大量的对话,似乎最有可能的问题是VirtualBox不允许在共享目录中使用符号链接,但是在应用vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
后我看到行为没有变化,所以我不知道是什么组件实际上是错误的 - Vagrant,Ruby,Puppet,Librarian,puppetlabs / mysql模块,或者(很可能)我?
在主持人身上:
$ vagrant --version
Vagrant 1.4.3
在Vagrant框中:
$ uname -a
Linux host 3.2.0-58-generic #88-Ubuntu SMP Tue Dec 3 17:40:43 UTC 2013 i686 i686 i386 GNU/Linux
$ which ruby
/home/vagrant/.rbenv/shims/ruby
$ ruby --version
ruby 1.9.3p484 (2013-11-22 revision 43786) [i686-linux]
$ bundle --version
Bundler version 1.5.3
$ cat Gemfile.lock | grep -A 3 librarian-puppet
librarian-puppet (0.9.13)
json
librarian (>= 0.1.2)
open3_backport
这是我的Puppetfile
:
forge 'http://forge.puppetlabs.com'
# Stuff that we need directly.
mod 'puppetlabs/stdlib'
# 3rd party modules we proxy.
mod 'jfryman/nginx'
mod 'puppetlabs/mysql'
mod 'saz/memcached'
mod 'thomasvandoren/redis'
当我尝试应用Puppetfile
时,会发生什么。
$ librarian-puppet install --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: i686-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 0.9.13
[Librarian] Project: /vagrant
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.9.5
[Librarian] Git Environment Variables:
[Librarian] (empty)
[Librarian] Pre-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] The specfile is unchanged: nothing to do.
[Librarian] Install: dependencies resolved
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Executing puppet module install for puppetlabs/stdlib 4.1.0
[Librarian] Executing puppet module install for puppetlabs/apt 1.4.1
[Librarian] Executing puppet module install for puppetlabs/concat 1.1.0-rc1
[Librarian] Executing puppet module install for jfryman/nginx 0.0.7
[Librarian] Executing puppet module install for maestrodev/wget 1.3.1
[Librarian] Executing puppet module install for puppetlabs/firewall 1.0.0
[Librarian] Failed to copy from /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/firewall/version/47cd76e43f74bbc2e1baaf194d07e1fa/firewall to /vagrant/modules/firewall preserving file types, trying again without preserving them
[Librarian] Executing puppet module install for puppetlabs/gcc 0.1.0
[Librarian] Executing puppet module install for puppetlabs/mysql 2.2.0
Error: No such file or directory - /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/mysql/version/34e90de1478e8a54af7fd56d4a3a7102/mysql/spec/fixtures/modules/mysql
Error: Try 'puppet help module install' for usage
/home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:114:in `unlink': Directory not empty - /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/mysql/version/34e90de1478e8a54af7fd56d4a3a7102 (Errno::ENOTEMPTY)
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:114:in `unlink'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:114:in `cache_version_unpacked!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:57:in `install_version!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/source/forge.rb:263:in `install!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/manifest.rb:101:in `install!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:49:in `block in install_manifests'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:48:in `each'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:48:in `install_manifests'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:39:in `perform_installation'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/action/install.rb:12:in `run'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:165:in `install!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/lib/librarian/puppet/cli.rb:71:in `install'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block (2 levels) in bin!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:31:in `returning_status'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `block in bin!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:47:in `with_environment'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-0.1.2/lib/librarian/cli.rb:26:in `bin!'
from /home/vagrant/.rbenv/versions/1.9.3-p484/lib/ruby/gems/1.9.1/gems/librarian-puppet-0.9.13/bin/librarian-puppet:7:in `<top (required)>'
from /home/vagrant/.rbenv/versions/1.9.3-p484/bin/librarian-puppet:23:in `load'
from /home/vagrant/.rbenv/versions/1.9.3-p484/bin/librarian-puppet:23:in `<main>'
值得注意的是如果我第二次运行这个完全相同的命令它将一直完成:
$ librarian-puppet install --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: i686-linux
[Librarian] Rubygems Version: 1.8.23
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 0.9.13
[Librarian] Project: /vagrant
[Librarian] Specfile: Puppetfile
[Librarian] Lockfile: Puppetfile.lock
[Librarian] Git: /usr/bin/git
[Librarian] Git Version: 1.7.9.5
[Librarian] Git Environment Variables:
[Librarian] (empty)
[Librarian] Pre-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] The specfile is unchanged: nothing to do.
[Librarian] Install: dependencies resolved
[Librarian] Pre-Cached Sources:
[Librarian] Post-Cached Sources:
[Librarian] [:forge, "http://forge.puppetlabs.com", {}]
[Librarian] Failed to copy from /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/firewall/version/47cd76e43f74bbc2e1baaf194d07e1fa/firewall to /vagrant/modules/firewall preserving file types, trying again without preserving them
[Librarian] Failed to copy from /vagrant/.tmp/librarian/cache/source/puppet/forge/3792e516e3ff92a0ef9f5e827f8e76eb/puppetlabs/mysql/version/34e90de1478e8a54af7fd56d4a3a7102/mysql to /vagrant/modules/mysql preserving file types, trying again without preserving them
[Librarian] Executing puppet module install for saz/memcached 2.4.0
[Librarian] Executing puppet module install for thomasvandoren/redis 0.0.9
在我看来,那些Failed to copy from
错误可能是相关的,但我不知道该怎么做。
答案 0 :(得分:0)
通过跟进,除了mysql之外,这个问题在多个其他模块中重复出现 - 问题表面上是这些模块试图在Vagrant共享目录中创建符号链接(这不起作用[如预期])