vagrantup 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e5fd92e8354e17085af61026c73e342a918adf16
4
- data.tar.gz: b37319c1a035013230a1e0b74ef9a89af1fdba53
3
+ metadata.gz: 7598ed358841e407d80c0a20a2a4e0a9b27177a8
4
+ data.tar.gz: 437bd22962ab776b6c36f33fd04910cb27be6816
5
5
  SHA512:
6
- metadata.gz: c9b0e06ef8166ad3b5b883dc4b137d51f438505236f31e2616e4289e7a1af90cae66afec7893d0a8216893afaf62f2c9fa9526c4728d37548c91910a846126ff
7
- data.tar.gz: 8c025092300ff69f38938d38981086e1dc27129db5a4cdfc16236dd85e46790a017184e74607be5f4bc1d3e62467f46318a941176db7bf46be6183e5ec794f66
6
+ metadata.gz: d5a07d37164db4bf64f3586cec0044505a2bffe360f33b14a9d0176f809fcbc02b888bac25d86f42bffc765e3fe595af49ccd04222e7eca6d19e87c328f7c891
7
+ data.tar.gz: 3973e419a68b5b498a3027d992b7a4686b188767c71256c46f0484f4c07ff5fe8f5e1fe58d2bc2eacc23d7a3ee30eb3b319701a061621a4222eab6cb8bebff47
data/CHANGELOG.md CHANGED
@@ -1,3 +1,17 @@
1
+ ## 0.6.8 (unreleased)
2
+
3
+ - Network interfaces are now up/down in distinct commands instead of just
4
+ restarting "networking." [GH-192]
5
+ - Add missing translation for chef binary missing. [GH-203]
6
+ - Fix default settings for Opscode platform and comments. [GH-213]
7
+ - Blank client name for chef server now uses FQDN by default, instead of "client" [GH-214]
8
+ - Run list can now be nil, which will cause it to sync with chef server (when
9
+ chef server is enabled). [GH-214]
10
+ - Multiple NFS folders now work on linux. [GH-215]
11
+ - Add translation for state "stuck" which is very rare. [GH-218]
12
+ - virtualbox gem dependency minimum raised to 0.7.6 to verify FFI < 1.0.0 is used.
13
+ - Fix issue where box downloading from `vagrant up` didn't reload the box collection. [GH-229]
14
+
1
15
  ## 0.6.7 (November 3, 2010)
2
16
 
3
17
  - Added validation to verify that a box is specified.
data/Gemfile.lock CHANGED
@@ -8,7 +8,7 @@ GIT
8
8
  PATH
9
9
  remote: .
10
10
  specs:
11
- vagrant (0.6.7)
11
+ vagrant (0.6.8)
12
12
  archive-tar-minitar (= 0.5.2)
13
13
  erubis (~> 2.6.6)
14
14
  i18n (~> 0.4.1)
@@ -17,7 +17,7 @@ PATH
17
17
  net-scp (~> 1.0.3)
18
18
  net-ssh (~> 2.0.23)
19
19
  thor (~> 0.14.2)
20
- virtualbox (~> 0.7.3)
20
+ virtualbox (~> 0.7.6)
21
21
 
22
22
  GEM
23
23
  remote: http://rubygems.org/
@@ -16,6 +16,7 @@ module Vagrant
16
16
 
17
17
  env.ui.info I18n.t("vagrant.actions.vm.check_box.not_found", :name => box_name)
18
18
  Vagrant::Box.add(env.env, box_name, box_url)
19
+ env["boxes"].reload!
19
20
  end
20
21
 
21
22
  @app.call(env)
@@ -1,3 +1,5 @@
1
+ require 'forwardable'
2
+
1
3
  module Vagrant
2
4
  # Represents a collection of boxes, providing helpful methods for
3
5
  # finding boxes. An instance of this is returned by {Environment#boxes}.
@@ -9,21 +11,25 @@ module Vagrant
9
11
  #
10
12
  # env.boxes.find("base") # => #<Vagrant::Box>
11
13
  #
12
- class BoxCollection < Array
14
+ class BoxCollection
15
+ include Enumerable
16
+ extend Forwardable
17
+ def_delegators :@boxes, :length, :each
18
+
13
19
  # The environment this box collection belongs to
14
20
  attr_reader :env
15
21
 
16
22
  def initialize(env)
17
- super()
18
-
19
23
  @env = env
24
+ @boxes = []
25
+
20
26
  reload!
21
27
  end
22
28
 
23
29
  # Find a box in the collection by the given name. The name must
24
30
  # be a string, for now.
25
31
  def find(name)
26
- each do |box|
32
+ @boxes.each do |box|
27
33
  return box if box.name == name
28
34
  end
29
35
 
@@ -33,12 +39,12 @@ module Vagrant
33
39
  # Loads the list of all boxes from the source. This modifies the
34
40
  # current array.
35
41
  def reload!
36
- clear
42
+ @boxes.clear
37
43
 
38
44
  Dir.open(env.boxes_path) do |dir|
39
45
  dir.each do |d|
40
46
  next if d == "." || d == ".." || !File.directory?(env.boxes_path.join(d))
41
- self << Box.new(env, d)
47
+ @boxes << Box.new(env, d)
42
48
  end
43
49
  end
44
50
  end
@@ -84,7 +84,6 @@ module Vagrant
84
84
  def initialize
85
85
  @validation_client_name = "chef-validator"
86
86
  @client_key_path = "/etc/chef/client.pem"
87
- @node_name = "client"
88
87
 
89
88
  @cookbooks_path = ["cookbooks", [:vm, "cookbooks"]]
90
89
  @roles_path = []
@@ -92,13 +91,12 @@ module Vagrant
92
91
  @log_level = :info
93
92
  @json = {
94
93
  :instance_role => "vagrant",
95
- :run_list => []
96
94
  }
97
95
  end
98
96
 
99
97
  # Returns the run list for the provisioning
100
98
  def run_list
101
- json[:run_list]
99
+ json[:run_list] ||= []
102
100
  end
103
101
 
104
102
  # Sets the run list to the specified value
@@ -138,9 +136,13 @@ module Vagrant
138
136
  errors.add(I18n.t("vagrant.config.chef.validation_key_path")) if !validation_key_path
139
137
  end
140
138
 
141
- if [:chef_solo, :chef_server].include?(top.vm.provisioner)
142
- # Validations shared by both chef solo and server
143
- errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if !run_list || run_list.empty?
139
+ if top.vm.provisioner == :chef_solo
140
+ # On chef solo, a run list MUST be specified
141
+ errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if !json[:run_list] || run_list.empty?
142
+ elsif top.vm.provisioner == :chef_server
143
+ # On chef server, the run list is allowed to be nil, which causes it
144
+ # to sync with the chef server.
145
+ errors.add(I18n.t("vagrant.config.chef.run_list_empty")) if json[:run_list] && run_list.empty?
144
146
  end
145
147
  end
146
148
  end
@@ -80,8 +80,9 @@ module Vagrant
80
80
  vm.ssh.upload!(StringIO.new(entry), "/tmp/vagrant-network-entry")
81
81
 
82
82
  vm.ssh.execute do |ssh|
83
+ ssh.exec!("sudo /sbin/ifdown eth#{net_options[:adapter]} 2> /dev/null")
83
84
  ssh.exec!("sudo su -c 'cat /tmp/vagrant-network-entry >> /etc/network/interfaces'")
84
- ssh.exec!("sudo /etc/init.d/networking restart")
85
+ ssh.exec!("sudo /sbin/ifup eth#{net_options[:adapter]}")
85
86
  end
86
87
  end
87
88
 
@@ -2,5 +2,5 @@ module Vagrant
2
2
  # This will always be up to date with the current version of Vagrant,
3
3
  # since it is used to generate the gemspec and is also the source of
4
4
  # the version for `vagrant -v`
5
- VERSION = "0.6.7"
5
+ VERSION = "0.6.8"
6
6
  end
@@ -1,6 +1,8 @@
1
1
  log_level <%= log_level.inspect %>
2
2
  log_location STDOUT
3
+ <% if node_name %>
3
4
  node_name "<%= node_name %>"
5
+ <% end %>
4
6
  ssl_verify_mode :verify_none
5
7
  chef_server_url "<%= chef_server_url %>"
6
8
 
@@ -1,4 +1,6 @@
1
+ <% if node_name %>
1
2
  node_name "<%= node_name %>"
3
+ <% end %>
2
4
  file_cache_path "<%= provisioning_path %>"
3
5
  cookbook_path <%= cookbooks_path %>
4
6
  role_path <%= roles_path %>
@@ -24,7 +24,7 @@ Vagrant::Config.run do |config|
24
24
  # Share an additional folder to the guest VM. The first argument is
25
25
  # an identifier, the second is the path on the guest to mount the
26
26
  # folder, and the third is the path on the host to the actual folder.
27
- # config.vm.share_folder "v-data", "/vagrant_data", "../data")
27
+ # config.vm.share_folder("v-data", "/vagrant_data", "../data")
28
28
 
29
29
  # Enable provisioning with chef solo, specifying a cookbooks path (relative
30
30
  # to this Vagrantfile), and adding some recipes and/or roles.
@@ -40,12 +40,22 @@ Vagrant::Config.run do |config|
40
40
  # Enable provisioning with chef server, specifying the chef server URL,
41
41
  # and the path to the validation key (relative to this Vagrantfile).
42
42
  #
43
+ # The Opscode Platform uses HTTPS. Substitute your organization for
44
+ # ORGNAME in the URL and validation key.
45
+ #
46
+ # If you have your own Chef Server, use the appropriate URL, which may be
47
+ # HTTP instead of HTTPS depending on your configuration. Also change the
48
+ # validation key to validation.pem.
49
+ #
43
50
  # config.vm.provisioner = :chef_server
44
- # config.chef.chef_server_url = "http://api.opscode.com/organizations/organization"
45
- # config.chef.validation_key_path = "kiip-validator.pem"
51
+ # config.chef.chef_server_url = "https://api.opscode.com/organizations/ORGNAME"
52
+ # config.chef.validation_key_path = "ORGNAME-validator.pem"
53
+ #
54
+ # If you're using the Opscode platform, your validator client is
55
+ # ORGNAME-validator, replacing ORGNAME with your organization name.
56
+ #
57
+ # IF you have your own Chef Server, the default validation client name is
58
+ # chef-validator, unless you changed the configuration.
46
59
  #
47
- # If you're using the OpsCode platform, you'll have to set this as well.
48
- # If you're using your own chef server, you may have to set it, but it depends
49
- # on how your Chef server is configured.
50
- # config.chef.validation_client_name = "organization-validator"
60
+ # config.chef.validation_client_name = "ORGNAME-validator"
51
61
  end
@@ -9,6 +9,10 @@ en:
9
9
  errors:
10
10
  base_vm_not_found: The base VM with the name '%{name}' was not found.
11
11
  box_not_found: Box '%{name}' could not be found.
12
+ chef_not_detected: |-
13
+ The chef (either `chef-solo` or `chef-client`) binary was not found on
14
+ the VM and is required for chef provisioning. Please verify that chef
15
+ is installed and that the binary is available on the PATH.
12
16
  cli_missing_env: This command requires that a Vagrant environment be properly passed in as the last parameter.
13
17
  config_validation: |-
14
18
  There was a problem with the configuration of Vagrant. The error message(s)
@@ -146,6 +150,11 @@ en:
146
150
  suspend the virtual machine. In either case, to restart it again,
147
151
  simply run `vagrant up`.
148
152
  saved: To resume this VM, simply run `vagrant up`.
153
+ stuck: |-
154
+ The VM is "stuck!" This is a very rare state which means that
155
+ VirtualBox is unable to recover the current state of the VM.
156
+ The only known solution to this problem is to restart your
157
+ machine, sorry.
149
158
  listing: |-
150
159
  This environment represents multiple VMs. The VMs are all listed
151
160
  above with their current state. For more information about a specific
@@ -1,3 +1,5 @@
1
1
  # VAGRANT-BEGIN: <%= uuid %>
2
- <% folders.each do |name, opts| %><%= opts[:hostpath] %> <%= ip %>(rw,no_subtree_check,all_squash<% if opts[:map_uid] %>,anonuid=<%= opts[:map_uid] %><% end %><% if opts[:map_gid] %>,anongid=<%= opts[:map_gid] %><% end %>)<% end %>
3
- # VAGRANT-END: <%= uuid %>
2
+ <% folders.each do |name, opts| %>
3
+ <%= opts[:hostpath] %> <%= ip %>(rw,no_subtree_check,all_squash<% if opts[:map_uid] %>,anonuid=<%= opts[:map_uid] %><% end %><% if opts[:map_gid] %>,anongid=<%= opts[:map_gid] %><% end %>)
4
+ <% end %>
5
+ # VAGRANT-END: <%= uuid %>
@@ -6,9 +6,6 @@ class CheckBoxVMActionTest < Test::Unit::TestCase
6
6
  end
7
7
 
8
8
  context "calling" do
9
- setup do
10
- end
11
-
12
9
  should "raise error if box not specified" do
13
10
  app, env = action_env(vagrant_env(vagrantfile(<<-vf)))
14
11
  config.vm.box = nil
@@ -47,6 +44,7 @@ class CheckBoxVMActionTest < Test::Unit::TestCase
47
44
  seq = sequence("seq")
48
45
  env.env.boxes.expects(:find).returns(nil)
49
46
  Vagrant::Box.expects(:add).with(env.env, env["config"].vm.box, env["config"].vm.box_url).in_sequence(seq)
47
+ env.env.boxes.expects(:reload!).in_sequence(seq)
50
48
  app.expects(:call).with(env).once.in_sequence(seq)
51
49
 
52
50
  assert_nothing_raised {
data/vagrant.gemspec CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
21
21
  s.add_dependency "net-scp", "~> 1.0.3"
22
22
  s.add_dependency "i18n", "~> 0.4.1"
23
23
  s.add_dependency "thor", "~> 0.14.2"
24
- s.add_dependency "virtualbox", "~> 0.7.3"
24
+ s.add_dependency "virtualbox", "~> 0.7.6"
25
25
 
26
26
  s.add_development_dependency "rake"
27
27
  s.add_development_dependency "contest", ">= 0.1.2"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrantup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.7
4
+ version: 0.6.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitchell Hashimoto
@@ -129,14 +129,14 @@ dependencies:
129
129
  requirements:
130
130
  - - ~>
131
131
  - !ruby/object:Gem::Version
132
- version: 0.7.3
132
+ version: 0.7.6
133
133
  type: :runtime
134
134
  prerelease: false
135
135
  version_requirements: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - ~>
138
138
  - !ruby/object:Gem::Version
139
- version: 0.7.3
139
+ version: 0.7.6
140
140
  - !ruby/object:Gem::Dependency
141
141
  name: rake
142
142
  requirement: !ruby/object:Gem::Requirement