caterer 0.7.10 → 0.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -34,7 +34,7 @@ module Caterer
34
34
  @action_runner ||= Vli::Action::Runner.new(action_registry) do
35
35
  {
36
36
  :action_runner => action_runner,
37
- :ui => @ui,
37
+ :ui => ui,
38
38
  :uuid => uuid
39
39
  }
40
40
  end
@@ -104,7 +104,11 @@ module Caterer
104
104
  with_bootstrap_scripts do |script, count|
105
105
 
106
106
  server.ui.info "Running #{script}..."
107
- server.ssh.sudo "#{target_bootstrap_path}-#{count}", :stream => true
107
+ res = server.ssh.sudo "#{target_bootstrap_path}-#{count}", :stream => true
108
+
109
+ unless res == 0
110
+ server.ui.error "#{script} failed with exit code: #{res}"
111
+ end
108
112
 
109
113
  end
110
114
 
@@ -133,7 +137,11 @@ module Caterer
133
137
 
134
138
  # run
135
139
  server.ui.info "Installing chef-solo..."
136
- server.ssh.sudo "#{target_install_path}", :stream => true
140
+ res = server.ssh.sudo "#{target_install_path}", :stream => true
141
+
142
+ unless res == 0
143
+ server.ui.error "install failed with exit code: #{res}"
144
+ end
137
145
  end
138
146
 
139
147
  def provision(server)
@@ -181,7 +189,10 @@ module Caterer
181
189
 
182
190
  # run
183
191
  server.ui.info "Running chef-solo..."
184
- server.ssh.sudo command_string, :stream => true
192
+ res = server.ssh.sudo command_string, :stream => true
193
+ unless res == 0
194
+ server.ui.error "chef-solo failed with exit code: #{res}"
195
+ end
185
196
  end
186
197
 
187
198
  def cleanup(server)
@@ -1,4 +1,5 @@
1
1
  require 'etc'
2
+ require 'digest'
2
3
 
3
4
  module Caterer
4
5
  class Server
@@ -51,7 +52,7 @@ module Caterer
51
52
  @images.each do |i|
52
53
  ui.info "*** Up'ing image: #{i} ***"
53
54
  run_action(:up, opts.merge({:image => i}))
54
- end
55
+ end
55
56
  else
56
57
  ui.info "*** Up'ing ***"
57
58
  run_action(:up, opts.merge({:engine => @engine}))
@@ -179,7 +180,7 @@ module Caterer
179
180
  else
180
181
  # yuck. Heaven help the poor soul who hath not rsync...
181
182
  ui.warn "Rsync unavailable, falling back to scp (slower)..."
182
- unique = Digest::MD5.hexdigest(from)
183
+ unique = ::Digest::MD5.hexdigest(from)
183
184
  ssh.sudo "rm -rf #{to}/*", :stream => true
184
185
  ssh.sudo "mkdir -p #{to}/#{unique}", :stream => true
185
186
  ssh.sudo "chown -R #{username} #{to}/#{unique}", :stream => true
@@ -1,3 +1,3 @@
1
1
  module Caterer
2
- VERSION = "0.7.10"
2
+ VERSION = "0.8.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: caterer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.10
4
+ version: 0.8.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-03 00:00:00.000000000 Z
12
+ date: 2013-01-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: log4r