knife-undev 0.1.2 → 0.1.3

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 122b82fe0c18a8b4bcf5cbb00153a9724cc1ecf3
4
- data.tar.gz: a2415c43393cbac8d79e13bac2baf21c9d91bb8c
3
+ metadata.gz: 230065f37fc817853c1c195f231b517eddeb2bf5
4
+ data.tar.gz: d15eb6eb36e2d3967209cdf42a0bb82d710a7422
5
5
  SHA512:
6
- metadata.gz: 6913046d90d404397c8afc66d16e1fcac32088eb6457636733213f25ddba1b4ba7b09559ff071ac946f47f666390227995d09b527ad8e19387ad6eb2be686f2f
7
- data.tar.gz: 8455e3489b75940b63b9e889da7628403b035d2b35557b12013c14a02c1bf041ba9c1057430304235e2d10bc3b74723f6e9ac92fdf32f78db0aa6ca61eff6fba
6
+ metadata.gz: 2d62d997440b5906e1ff47159b53171620a572f6368e924473d9aa1db70b23cecf25a087bf601e7d8443f1b276b665916c87834cf3bc8134024db618df7e7603
7
+ data.tar.gz: 832def60a62b7e87db734aa129c575e61a69b9682064ed1bd10894501ded0271dc9331742915f89eb86e69ec787379ba8e6d3fc7cdd9ae7968d7baa2246b2b86
@@ -101,7 +101,7 @@ class Chef
101
101
  case config[:on_error]
102
102
  when :skip
103
103
  ui.warn "Failed to connect to #{node_name} -- #{$!.class.name}: #{$!.message}"
104
- $!.backtrace.each { |l| Chef::Log.debug(l) }
104
+ $!.backtrace.each { |l| Chef::Log.error(l) }
105
105
  when :raise
106
106
  #Net::SSH::Multi magic to force exception to be re-raised.
107
107
  throw :go, :raise
@@ -243,7 +243,11 @@ class Chef
243
243
  end
244
244
  ch.on_request "exit-status" do |ichannel, data|
245
245
  exit_status = [exit_status, data.read_long].max
246
- @not_zerro_nodes << { 'node' => ichannel[:host], "message" => "exit status: #{exit_status}" } if exit_status != 0
246
+ if exit_status != 0
247
+ @not_zerro_nodes << { 'node' => ichannel[:host], "message" => "exit status: #{exit_status}" }
248
+ else
249
+ @zerro_nodes << {'node' => ichannel[:host]}
250
+ end
247
251
  end
248
252
  end
249
253
  end
@@ -340,8 +344,8 @@ class Chef
340
344
  failed = @failed_connect_nodes.count + @not_zerro_nodes.count
341
345
  @failed_connect_nodes.each { |msg| ui.error("#{msg['node']} #{msg['message']}") }
342
346
  @not_zerro_nodes.each { |msg| ui.error("#{msg['node']} #{msg['message']}") }
343
- if failed > 0
344
- ui.warn "All: #{@all_nodes.count}, successful: #{succ}, connection problem: #{@failed_connect_nodes.count}, failed: #{@not_zerro_nodes.count}"
347
+ if failed > 0 || @zerro_nodes.count != succ
348
+ ui.warn "All: #{@all_nodes.count}, successful exit: #{@zerro_nodes.count}, connection problem: #{@failed_connect_nodes.count}, failed: #{@not_zerro_nodes.count}"
345
349
  else
346
350
  ui.info "All: #{@all_nodes.count}, successful: #{succ}"
347
351
  end
@@ -355,6 +359,7 @@ class Chef
355
359
  @all_nodes = []
356
360
  @failed_connect_nodes = []
357
361
  @not_zerro_nodes = []
362
+ @zerro_nodes = []
358
363
 
359
364
  configure_attribute
360
365
  configure_user
@@ -386,3 +391,4 @@ class Chef
386
391
  end
387
392
  end
388
393
  end
394
+
@@ -1,5 +1,5 @@
1
1
  module Knife
2
2
  module Undev
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-undev
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vasiliev Dmitry
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-05 00:00:00.000000000 Z
11
+ date: 2014-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef