vagrant 0.6.7 → 0.6.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -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.
@@ -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 {
@@ -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
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 6
8
- - 7
9
- version: 0.6.7
8
+ - 8
9
+ version: 0.6.8
10
10
  platform: ruby
11
11
  authors:
12
12
  - Mitchell Hashimoto
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-03 00:00:00 -07:00
18
+ date: 2010-11-30 00:00:00 -08:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -148,8 +148,8 @@ dependencies:
148
148
  segments:
149
149
  - 0
150
150
  - 7
151
- - 3
152
- version: 0.7.3
151
+ - 6
152
+ version: 0.7.6
153
153
  type: :runtime
154
154
  prerelease: false
155
155
  version_requirements: *id009
@@ -441,7 +441,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
441
441
  requirements:
442
442
  - - ">="
443
443
  - !ruby/object:Gem::Version
444
- hash: -1852392342619946444
444
+ hash: 2622964393659946965
445
445
  segments:
446
446
  - 0
447
447
  version: "0"