You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I ran into a minor issue earlier today. I have my own chef server, and keep a copy of my validation.pem from it in my home directory. I initially set the permissions of this file to 400(So it is a read only file, as it should never change).
Steps to reproduce:
chmod 400 /path/to/your/validation.pem
vagrant up
vagrant provision
Expected results:
Chef to run successfully both times(once after the vagrant up, once after the provision)
Actual results:
When chef runs with the initial vagrant up, it works fine. Subsequent attempts to provision fail with the error below.
Logging in and modifying the permissions of /tmp/vagrant-chef-1/validation.pem to 600 and running vagrant provision again works fine.
I think a solution would be to either force overwriting the "read only" file, or delete it first before copying the new one. I'm not sure what the best approach is, so I'll leave that up to you.
System information
Ubuntu 12.04 LTS
Vagrant --version: Vagrant version 1.0.1 (Installed through the ubuntu repos)
An Ubuntu 12.04 vagrant boxfile, created from https://github.com/cal/vagrant-ubuntu-precise-64
Full log/error message:
$ vagrant provision
[default] Running provisioner: Vagrant::Provisioners::ChefClient...
[default] Creating folder to hold client key...
[default] Uploading chef client validation key...
/usr/lib/ruby/vendor_ruby/net/scp.rb:385:in `await_response_state': �scp: /tmp/vagrant-chef-1/validation.pem: Permission denied (RuntimeError)
from /usr/lib/ruby/vendor_ruby/net/scp.rb:356:in `send'
from /usr/lib/ruby/vendor_ruby/net/scp.rb:356:in `start_command'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/channel.rb:311:in `call'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/channel.rb:311:in `process'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:214:in `preprocess'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:214:in `each'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:214:in `preprocess'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:197:in `process'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:161:in `loop'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:161:in `loop_forever'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/session.rb:161:in `loop'
from /usr/lib/ruby/vendor_ruby/net/ssh/connection/channel.rb:269:in `wait'
from /usr/lib/ruby/vendor_ruby/net/scp.rb:279:in `upload!'
from /usr/lib/ruby/vendor_ruby/vagrant/communication/ssh.rb:81:in `upload'
from /usr/lib/ruby/vendor_ruby/vagrant/communication/ssh.rb:110:in `connect'
from /usr/lib/ruby/vendor_ruby/vagrant/communication/ssh.rb:79:in `upload'
from /usr/lib/ruby/vendor_ruby/vagrant/provisioners/chef_client.rb:68:in `upload_validation_key'
from /usr/lib/ruby/vendor_ruby/vagrant/provisioners/chef_client.rb:52:in `provision!'
from /usr/lib/ruby/vendor_ruby/vagrant/action/vm/provision.rb:36:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/vm/provision.rb:33:in `each'
from /usr/lib/ruby/vendor_ruby/vagrant/action/vm/provision.rb:33:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:33:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/vm/check_accessible.rb:18:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:33:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/general/validate.rb:13:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:33:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/general/check_virtualbox.rb:23:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/warden.rb:33:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/builder.rb:92:in `call'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:49:in `run'
from /usr/lib/ruby/vendor_ruby/vagrant/util/busy.rb:19:in `busy'
from /usr/lib/ruby/vendor_ruby/vagrant/action/runner.rb:49:in `run'
from /usr/lib/ruby/vendor_ruby/vagrant/vm.rb:192:in `run_action'
from /usr/lib/ruby/vendor_ruby/vagrant/vm.rb:164:in `provision'
from /usr/lib/ruby/vendor_ruby/vagrant/command/provision.rb:23:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/command/base.rb:106:in `with_target_vms'
from /usr/lib/ruby/vendor_ruby/vagrant/command/base.rb:101:in `each'
from /usr/lib/ruby/vendor_ruby/vagrant/command/base.rb:101:in `with_target_vms'
from /usr/lib/ruby/vendor_ruby/vagrant/command/provision.rb:19:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/cli.rb:38:in `execute'
from /usr/lib/ruby/vendor_ruby/vagrant/environment.rb:167:in `cli'
from /usr/bin/vagrant:43
The text was updated successfully, but these errors were encountered:
I ran into a minor issue earlier today. I have my own chef server, and keep a copy of my validation.pem from it in my home directory. I initially set the permissions of this file to 400(So it is a read only file, as it should never change).
Steps to reproduce:
Expected results:
Chef to run successfully both times(once after the vagrant up, once after the provision)
Actual results:
When chef runs with the initial vagrant up, it works fine. Subsequent attempts to provision fail with the error below.
Logging in and modifying the permissions of /tmp/vagrant-chef-1/validation.pem to 600 and running vagrant provision again works fine.
I think a solution would be to either force overwriting the "read only" file, or delete it first before copying the new one. I'm not sure what the best approach is, so I'll leave that up to you.
System information
Ubuntu 12.04 LTS
Vagrant --version: Vagrant version 1.0.1 (Installed through the ubuntu repos)
An Ubuntu 12.04 vagrant boxfile, created from https://github.com/cal/vagrant-ubuntu-precise-64
Full log/error message:
The text was updated successfully, but these errors were encountered: