knife-zero 1.2.0 → 1.2.1

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: b8b3705dafa27da903873188a610945eeefd35d3
4
- data.tar.gz: da2ad9277a6742c1c0ae3b80e73d524e319319e0
3
+ metadata.gz: e729fe2878ec1d2a13f131c08c241a570557bcfa
4
+ data.tar.gz: fc5e3e2e48959607b9b92fafc25d4fe5013af357
5
5
  SHA512:
6
- metadata.gz: d92be972b08258f7ff93818c20c1a669b63590a79556eaa9aae8543137bbe1d0f0b3bea5bdf7649548d148467ff3a3634f54321d5e1bc1f5a71693057831617d
7
- data.tar.gz: e769d2d860c44d4bfeee9aa3ef34211ba6d1dec8ad5d6fded9c0b257aac5e903b35a2e08c722ff04bd7f6a2caacb137762d8656d7e6253f7f05b217ddd8000fb
6
+ metadata.gz: 58de913724633bc5ccfa587bc683f724071945b79f6cad52b6f5d6346c16ad0cd2e77c4638ea0817ddf3d6faa04f5f6b12889ba4e69d89608038d9416b99a248
7
+ data.tar.gz: 88c189a807cfcefb3fddd68363a2f00290c9040070cce47f2194e2ff5355fc196dba363feae603d89e27f457385887fd6f241702f0ef4f89f44e536686bf30c0
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## Unrelesed
4
4
 
5
+ ## v1.2.1
6
+
7
+ - set rescue for debug during ssh session.
8
+
5
9
  ## v1.2.0
6
10
 
7
11
  - change filename knife/chef_client to zero_chef_client
@@ -114,6 +114,7 @@ class Chef
114
114
  :proc => Proc.new { |co| Chef::Config[:knife][:bootstrap_curl_options] = co }
115
115
 
116
116
  def knife_ssh
117
+ begin
117
118
  ssh = Chef::Knife::BootstrapSsh.new
118
119
  ssh.ui = ui
119
120
  ssh.name_args = [ server_name, ssh_command ]
@@ -128,6 +129,11 @@ class Chef
128
129
  ssh.config[:host_key_verify] = Chef::Config[:knife][:host_key_verify] || config[:host_key_verify]
129
130
  ssh.config[:on_error] = :raise
130
131
  ssh
132
+ rescue => e
133
+ ui.error(e.class.to_s + e.message)
134
+ ui.error e.backtrace.join("\n")
135
+ exit 1
136
+ end
131
137
  end
132
138
  end
133
139
  end
@@ -9,6 +9,7 @@ class Chef
9
9
  end
10
10
 
11
11
  def ssh_command(command, subsession=nil)
12
+ begin
12
13
  chef_zero_port = config[:chef_zero_port] ||
13
14
  Chef::Config[:knife][:chef_zero_port] ||
14
15
  URI.parse(Chef::Config.chef_server_url).port
@@ -20,6 +21,11 @@ class Chef
20
21
  session.forward.remote(chef_zero_port, chef_zero_host, chef_zero_port)
21
22
  end
22
23
  super
24
+ rescue => e
25
+ ui.error(e.class.to_s + e.message)
26
+ ui.error e.backtrace.join("\n")
27
+ exit 1
28
+ end
23
29
  end
24
30
  end
25
31
  end
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Zero
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-zero
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sawanoboly
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-22 00:00:00.000000000 Z
11
+ date: 2015-04-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler