opscode-pushy-client 2.3.0 → 2.4.11

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
- SHA1:
3
- metadata.gz: 35aaa8aa957140b06ed1c7bd1fa8850734e46153
4
- data.tar.gz: 5788b3fd6c36560be520628c756b20d96bdc646d
2
+ SHA256:
3
+ metadata.gz: bd455699417a076f318d51e9521395d286698a06f00a2dbfe0e35d227edc351f
4
+ data.tar.gz: 03017f2efa50c78b3afc558714c497e584771521f183bf743880b308a5959a12
5
5
  SHA512:
6
- metadata.gz: 65ab5d3e8402b98c5ce319c9c254188912e5be20330f45369bbac4cc9376e9c7216432c15c6b123d32d2a1248efb5d3faf26f54c1d516ee7e606ee74a7971f99
7
- data.tar.gz: a5bac0ca2e7d48e6a0b0a445bac6244c353ff80e18e99c1b549dcb2eb2bba281f76d502826c3eceeb9b1cba3bf00217602f94da83fc86fbc0676c688a3c33f3c
6
+ metadata.gz: 6c0e0a19acc56d240fd0d9b75612db7e533ee71dd7c7b1c7a00af9aae6764333a617a3da0bef4d04a70445adeb55b2f83d21e668c966ce90d3c8491365605c34
7
+ data.tar.gz: 1c71e5968153037ad0fcfe8c2d13d8dbdb858106243e56aa994d46e3c04b609155b3ed66ae8f32374cf42cce1102f2c33149e1fd5cdfda7ad603170e98b8742d
@@ -1,4 +1,53 @@
1
1
  # Chef Push Client Changes
2
+ <!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
3
+ <!-- latest_release 2.4.11 -->
4
+ ## [2.4.11](https://github.com/chef/opscode-pushy-client/tree/2.4.11) (2018-04-24)
5
+
6
+ #### Merged Pull Requests
7
+ - expeditor config: bundle update every time [#155](https://github.com/chef/opscode-pushy-client/pull/155) ([lamont-granquist](https://github.com/lamont-granquist))
8
+ <!-- latest_release -->
9
+
10
+ <!-- release_rollup since=2.4.8 -->
11
+ ### Changes since 2.4.8 release
12
+
13
+ #### Merged Pull Requests
14
+ - expeditor config: bundle update every time [#155](https://github.com/chef/opscode-pushy-client/pull/155) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 2.4.11 -->
15
+ - refactor timeout on message send [#152](https://github.com/chef/opscode-pushy-client/pull/152) ([jeremymv2](https://github.com/jeremymv2)) <!-- 2.4.10 -->
16
+ - Optimize `get_config` by eliminating extensive retry behavior [#151](https://github.com/chef/opscode-pushy-client/pull/151) ([jeremymv2](https://github.com/jeremymv2)) <!-- 2.4.9 -->
17
+ <!-- release_rollup -->
18
+
19
+ <!-- latest_stable_release -->
20
+ ## [2.4.8](https://github.com/chef/opscode-pushy-client/tree/2.4.8) (2018-02-05)
21
+
22
+ #### Merged Pull Requests
23
+ - Add CODEOWNERS file [#148](https://github.com/chef/opscode-pushy-client/pull/148) ([schisamo](https://github.com/schisamo))
24
+ - Add AIX support [#149](https://github.com/chef/opscode-pushy-client/pull/149) ([jeremiahsnapp](https://github.com/jeremiahsnapp))
25
+ - update dependency versions [#150](https://github.com/chef/opscode-pushy-client/pull/150) ([jaymalasinha](https://github.com/jaymalasinha))
26
+ <!-- latest_stable_release -->
27
+
28
+ ## [2.4.5](https://github.com/chef/opscode-pushy-client/tree/2.4.5) (2017-11-03)
29
+
30
+ #### Merged Pull Requests
31
+ - Wrap ZMQ request in timeout [#143](https://github.com/chef/opscode-pushy-client/pull/143) ([nsdavidson](https://github.com/nsdavidson))
32
+
33
+ ## [2.4.4](https://github.com/chef/opscode-pushy-client/tree/2.4.4) (2017-09-21)
34
+
35
+ #### Merged Pull Requests
36
+ - Update Expeditor config to meet 0.5.0 requirements [#142](https://github.com/chef/opscode-pushy-client/pull/142) ([tduffield](https://github.com/tduffield))
37
+ - Update ruby to 2.4.2 [#145](https://github.com/chef/opscode-pushy-client/pull/145) ([PrajaktaPurohit](https://github.com/PrajaktaPurohit))
38
+ - Updating bundler to 1.15.4. Some README updates. [#146](https://github.com/chef/opscode-pushy-client/pull/146) ([PrajaktaPurohit](https://github.com/PrajaktaPurohit))
39
+
40
+ ## [2.4.1](https://github.com/chef/opscode-pushy-client/tree/2.4.1) (2017-08-16)
41
+
42
+ #### Merged Pull Requests
43
+ - Perform version bump on correct path [#134](https://github.com/chef/opscode-pushy-client/pull/134) ([schisamo](https://github.com/schisamo))
44
+ - Ensure version bump sed matches the correct line [#135](https://github.com/chef/opscode-pushy-client/pull/135) ([schisamo](https://github.com/schisamo))
45
+ - Update SHA1 fingerprint for MSI signing cert [#136](https://github.com/chef/opscode-pushy-client/pull/136) ([schisamo](https://github.com/schisamo))
46
+ - Update the CHANGELOG when push-client is promoted to stable [#137](https://github.com/chef/opscode-pushy-client/pull/137) ([tduffield](https://github.com/tduffield))
47
+ - Allow push jobs to build libzmq from source on windows [#128](https://github.com/chef/opscode-pushy-client/pull/128) ([ksubrama](https://github.com/ksubrama))
48
+ - Add Option to manage environment variables that could be overwritten [#140](https://github.com/chef/opscode-pushy-client/pull/140) ([jaym](https://github.com/jaym))
49
+
50
+
2
51
 
3
52
  ## 2.2.0
4
53
 
@@ -85,4 +134,4 @@
85
134
 
86
135
  * Add Apache 2 license and headers in preparation for open sourcing.
87
136
 
88
- * Unify gem and repo tag versioning scheme.
137
+ * Unify gem and repo tag versioning scheme.
@@ -1,22 +1,22 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- opscode-pushy-client (2.3.0)
5
- chef (>= 12.19, < 14.0)
4
+ opscode-pushy-client (2.4.11)
5
+ chef (>= 12.19, < 15.0)
6
6
  ffi-rzmq
7
- ohai (>= 8.23, < 14.0)
7
+ ohai (>= 8.23, < 15.0)
8
8
  uuidtools
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- addressable (2.5.1)
14
- public_suffix (~> 2.0, >= 2.0.2)
13
+ addressable (2.5.2)
14
+ public_suffix (>= 2.0.2, < 4.0)
15
15
  builder (3.2.3)
16
- chef (13.0.118)
16
+ chef (14.0.202)
17
17
  addressable
18
18
  bundler (>= 1.10)
19
- chef-config (= 13.0.118)
19
+ chef-config (= 14.0.202)
20
20
  chef-zero (>= 13.0)
21
21
  diff-lcs (~> 1.2, >= 1.2.4)
22
22
  erubis (~> 2.7)
@@ -25,14 +25,14 @@ GEM
25
25
  iniparse (~> 1.4)
26
26
  iso8601 (~> 0.9.1)
27
27
  mixlib-archive (~> 0.4)
28
- mixlib-authentication (~> 1.4)
28
+ mixlib-authentication (~> 2.0)
29
29
  mixlib-cli (~> 1.7)
30
- mixlib-log (~> 1.3)
30
+ mixlib-log (~> 2.0, >= 2.0.3)
31
31
  mixlib-shellout (~> 2.0)
32
32
  net-sftp (~> 2.1, >= 2.1.2)
33
- net-ssh (>= 2.9, < 5.0)
33
+ net-ssh (~> 4.2)
34
34
  net-ssh-multi (~> 1.2, >= 1.2.1)
35
- ohai (~> 13.0)
35
+ ohai (~> 14.0)
36
36
  plist (~> 3.2)
37
37
  proxifier (~> 1.0)
38
38
  rspec-core (~> 3.5)
@@ -43,10 +43,10 @@ GEM
43
43
  specinfra (~> 2.10)
44
44
  syslog-logger (~> 1.6)
45
45
  uuidtools (~> 2.1.5)
46
- chef (13.0.118-universal-mingw32)
46
+ chef (14.0.202-universal-mingw32)
47
47
  addressable
48
48
  bundler (>= 1.10)
49
- chef-config (= 13.0.118)
49
+ chef-config (= 14.0.202)
50
50
  chef-zero (>= 13.0)
51
51
  diff-lcs (~> 1.2, >= 1.2.4)
52
52
  erubis (~> 2.7)
@@ -56,14 +56,14 @@ GEM
56
56
  iniparse (~> 1.4)
57
57
  iso8601 (~> 0.9.1)
58
58
  mixlib-archive (~> 0.4)
59
- mixlib-authentication (~> 1.4)
59
+ mixlib-authentication (~> 2.0)
60
60
  mixlib-cli (~> 1.7)
61
- mixlib-log (~> 1.3)
61
+ mixlib-log (~> 2.0, >= 2.0.3)
62
62
  mixlib-shellout (~> 2.0)
63
63
  net-sftp (~> 2.1, >= 2.1.2)
64
- net-ssh (>= 2.9, < 5.0)
64
+ net-ssh (~> 4.2)
65
65
  net-ssh-multi (~> 1.2, >= 1.2.1)
66
- ohai (~> 13.0)
66
+ ohai (~> 14.0)
67
67
  plist (~> 3.2)
68
68
  proxifier (~> 1.0)
69
69
  rspec-core (~> 3.5)
@@ -84,110 +84,113 @@ GEM
84
84
  win32-service (~> 0.8.7)
85
85
  windows-api (~> 0.4.4)
86
86
  wmi-lite (~> 1.0)
87
- chef-config (13.0.118)
87
+ chef-config (14.0.202)
88
88
  addressable
89
89
  fuzzyurl
90
90
  mixlib-config (~> 2.0)
91
91
  mixlib-shellout (~> 2.0)
92
- chef-zero (13.0.0)
92
+ tomlrb (~> 1.2)
93
+ chef-zero (14.0.6)
93
94
  ffi-yajl (~> 2.2)
94
95
  hashie (>= 2.0, < 4.0)
95
- mixlib-log (~> 1.3)
96
+ mixlib-log (~> 2.0)
96
97
  rack (~> 2.0)
97
98
  uuidtools (~> 2.1)
98
99
  diff-lcs (1.3)
99
100
  erubis (2.7.0)
100
- ffi (1.9.18)
101
- ffi (1.9.18-x86-mingw32)
102
- ffi-rzmq (2.0.5)
101
+ ffi (1.9.23)
102
+ ffi (1.9.23-x64-mingw32)
103
+ ffi (1.9.23-x86-mingw32)
104
+ ffi-rzmq (2.0.6)
103
105
  ffi-rzmq-core (>= 1.0.6)
104
106
  ffi-rzmq-core (1.0.6)
105
107
  ffi
106
108
  ffi-win32-extensions (1.0.3)
107
109
  ffi
108
- ffi-yajl (2.3.0)
110
+ ffi-yajl (2.3.1)
109
111
  libyajl2 (~> 1.2)
110
112
  fuzzyurl (0.9.0)
111
- hashie (3.5.5)
112
- highline (1.7.8)
113
- iniparse (1.4.2)
113
+ hashie (3.5.7)
114
+ highline (1.7.10)
115
+ iniparse (1.4.4)
114
116
  ipaddress (0.8.3)
115
117
  iso8601 (0.9.1)
116
118
  libyajl2 (1.2.0)
117
119
  mixlib-archive (0.4.1)
118
120
  mixlib-log
119
- mixlib-authentication (1.4.1)
120
- mixlib-log
121
+ mixlib-authentication (2.0.0)
121
122
  mixlib-cli (1.7.0)
122
- mixlib-config (2.2.4)
123
- mixlib-log (1.7.1)
124
- mixlib-shellout (2.2.7)
125
- mixlib-shellout (2.2.7-universal-mingw32)
123
+ mixlib-config (2.2.6)
124
+ tomlrb
125
+ mixlib-log (2.0.4)
126
+ mixlib-shellout (2.3.2)
127
+ mixlib-shellout (2.3.2-universal-mingw32)
126
128
  win32-process (~> 0.8.2)
127
129
  wmi-lite (~> 1.0)
128
- multi_json (1.12.1)
130
+ multi_json (1.13.1)
129
131
  net-scp (1.2.1)
130
132
  net-ssh (>= 2.6.5)
131
133
  net-sftp (2.1.2)
132
134
  net-ssh (>= 2.6.5)
133
- net-ssh (4.1.0)
135
+ net-ssh (4.2.0)
134
136
  net-ssh-gateway (2.0.0)
135
137
  net-ssh (>= 4.0.0)
136
138
  net-ssh-multi (1.2.1)
137
139
  net-ssh (>= 2.6.5)
138
140
  net-ssh-gateway (>= 1.2.0)
139
141
  net-telnet (0.1.1)
140
- ohai (13.0.1)
141
- chef-config (>= 12.5.0.alpha.1, < 14)
142
+ ohai (14.0.29)
143
+ chef-config (>= 12.8, < 15)
142
144
  ffi (~> 1.9)
143
145
  ffi-yajl (~> 2.2)
144
146
  ipaddress
145
147
  mixlib-cli
146
148
  mixlib-config (~> 2.0)
147
- mixlib-log (>= 1.7.1, < 2.0)
149
+ mixlib-log (~> 2.0, >= 2.0.1)
148
150
  mixlib-shellout (~> 2.0)
149
151
  plist (~> 3.1)
150
152
  systemu (~> 2.6.4)
151
153
  wmi-lite (~> 1.0)
152
- plist (3.2.0)
154
+ plist (3.4.0)
153
155
  proxifier (1.0.3)
154
- public_suffix (2.0.5)
155
- rack (2.0.1)
156
- rake (12.0.0)
157
- rdoc (5.1.0)
156
+ public_suffix (3.0.2)
157
+ rack (2.0.5)
158
+ rake (12.3.1)
159
+ rdoc (6.0.3)
158
160
  rdp-ruby-wmi (0.3.1)
159
- rspec (3.5.0)
160
- rspec-core (~> 3.5.0)
161
- rspec-expectations (~> 3.5.0)
162
- rspec-mocks (~> 3.5.0)
163
- rspec-core (3.5.4)
164
- rspec-support (~> 3.5.0)
165
- rspec-expectations (3.5.0)
161
+ rspec (3.7.0)
162
+ rspec-core (~> 3.7.0)
163
+ rspec-expectations (~> 3.7.0)
164
+ rspec-mocks (~> 3.7.0)
165
+ rspec-core (3.7.1)
166
+ rspec-support (~> 3.7.0)
167
+ rspec-expectations (3.7.0)
166
168
  diff-lcs (>= 1.2.0, < 2.0)
167
- rspec-support (~> 3.5.0)
169
+ rspec-support (~> 3.7.0)
168
170
  rspec-its (1.2.0)
169
171
  rspec-core (>= 3.0.0)
170
172
  rspec-expectations (>= 3.0.0)
171
- rspec-mocks (3.5.0)
173
+ rspec-mocks (3.7.0)
172
174
  diff-lcs (>= 1.2.0, < 2.0)
173
- rspec-support (~> 3.5.0)
174
- rspec-support (3.5.0)
175
+ rspec-support (~> 3.7.0)
176
+ rspec-support (3.7.1)
175
177
  rspec_junit_formatter (0.2.3)
176
178
  builder (< 4)
177
179
  rspec-core (>= 2, < 4, != 2.12.0)
178
- serverspec (2.38.0)
180
+ serverspec (2.41.3)
179
181
  multi_json
180
182
  rspec (~> 3.0)
181
183
  rspec-its
182
- specinfra (~> 2.53)
184
+ specinfra (~> 2.72)
183
185
  sfl (2.3)
184
- specinfra (2.67.8)
186
+ specinfra (2.73.3)
185
187
  net-scp
186
188
  net-ssh (>= 2.7, < 5.0)
187
189
  net-telnet
188
190
  sfl
189
191
  syslog-logger (1.6.8)
190
192
  systemu (2.6.5)
193
+ tomlrb (1.2.6)
191
194
  uuidtools (2.1.5)
192
195
  win32-api (1.5.3-universal-mingw32)
193
196
  win32-dir (0.5.1)
@@ -217,8 +220,8 @@ GEM
217
220
 
218
221
  PLATFORMS
219
222
  ruby
223
+ x64-mingw32
220
224
  x86-mingw32
221
- x86-mswin32
222
225
 
223
226
  DEPENDENCIES
224
227
  ffi
@@ -239,4 +242,4 @@ DEPENDENCIES
239
242
  windows-pr
240
243
 
241
244
  BUNDLED WITH
242
- 1.14.6
245
+ 1.16.1
@@ -0,0 +1,9 @@
1
+ # Push Jobs Client Release Notes
2
+
3
+ ## 2.4.9
4
+
5
+ This release ships with notable fixes for a long standing issue where the Client could become deadlocked after encoutering network disruptions communicating with the Server.
6
+
7
+ *Note*
8
+
9
+ Due to the nature of the fixes above we are eager to hear your feedback on _any_ changes obeserved from the typical behavior of previous Client versions!
@@ -39,7 +39,7 @@ Currently, push-client must be manually tested to verify that it behaves correct
39
39
  ### Building and Releasing the Release
40
40
 
41
41
  - [ ] Tag the opscode-pushy-client repository with the release version: `git
42
- tag -a VERSION_NUMBER`.
42
+ tag -a VERSION_NUMBER`. - This is currently done by Chef Expediter.
43
43
 
44
44
  - [ ] Push the new tag: `git push origin master --tags`.
45
45
 
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 2.4.11
@@ -23,7 +23,11 @@ require_relative 'pushy_client/periodic_reconfigurer'
23
23
  require_relative 'pushy_client/whitelist'
24
24
  require 'ohai'
25
25
  require 'uuidtools'
26
- require 'ffi-rzmq'
26
+ if RUBY_PLATFORM =~ /aix/
27
+ require 'rbzmq/zmq'
28
+ else
29
+ require 'ffi-rzmq'
30
+ end
27
31
  require 'cgi'
28
32
 
29
33
  class PushyClient
@@ -36,6 +40,7 @@ class PushyClient
36
40
  @hostname = options[:hostname]
37
41
  @file_dir = options[:file_dir] || '/tmp/pushy'
38
42
  @file_dir_expiry = options[:file_dir_expiry] || 86400
43
+ @allowed_overwritable_env_vars = options[:allowed_overwritable_env_vars]
39
44
 
40
45
  @allow_unencrypted = options[:allow_unencrypted] || false
41
46
  @client_curve_pub_key, @client_curve_sec_key = ZMQ::Util.curve_keypair
@@ -76,6 +81,7 @@ class PushyClient
76
81
  attr_accessor :whitelist
77
82
  attr_reader :incarnation_id
78
83
  attr_reader :legacy_mode # indicate we've fallen back to 1.x
84
+ attr_reader :allowed_overwritable_env_vars
79
85
 
80
86
  # crypto
81
87
  attr_reader :client_curve_pub_key
@@ -172,6 +178,10 @@ class PushyClient
172
178
  @protocol_handler.send_heartbeat(sequence)
173
179
  end
174
180
 
181
+ def update_reconfigure_deadline(delay)
182
+ @periodic_reconfigurer.update_reconfigure_deadline(delay)
183
+ end
184
+
175
185
  def commit(job_id, command, opts)
176
186
  @job_runner.commit(job_id, command, opts)
177
187
  end
@@ -214,27 +224,55 @@ class PushyClient
214
224
  resource = "/pushy/config/#{node_name}"
215
225
 
216
226
  Chef::Log.info "[#{node_name}] Retrieving configuration from #{chef_server_url}/#{resource}: ..."
217
- esc_key = CGI::escape(@client_curve_pub_key)
227
+ esc_key = CGI.escape(@client_curve_pub_key)
218
228
  version = PushyClient::PROTOCOL_VERSION
219
229
  resource = "pushy/config/#{node_name}?ccpk=#{esc_key}&version=#{version}"
220
230
 
221
- config = rest.get(resource)
231
+ Chef::Config[:rest_timeout] = 5
232
+
233
+ if @config.nil?
234
+ # We are being called from the `start` method not `trigger_reconfigure`
235
+ # so we know this is the first time fetching the config after a clean service start/restart.
236
+ # We therefore want to give ample opportunity to fetch the config, otherwise
237
+ # we raise and exception and the service stops - hopefully to be started again
238
+ # on the next chef-client run by push-jobs cookbook.
239
+
240
+ Chef::Config[:http_retry_delay] = 30
241
+ Chef::Config[:http_retry_count] = 5
242
+ else
243
+ # We have already fetched the config once, therefore we're being called from `trigger_reconfigure`
244
+ # Here we do not want the typical retry behavior from Chef::HTTP since `reconfigure` already
245
+ # implements an effective retry mechanism. Otherwise, `reconfigure` threads have the potential to
246
+ # start to pile up.
247
+
248
+ Chef::Config[:http_retry_delay] = 0
249
+ Chef::Config[:http_retry_count] = 0
250
+ end
251
+
252
+ begin
253
+ config = rest.get(resource)
254
+ rescue
255
+ Chef::Log.info('Could not download push jobs config')
256
+ update_reconfigure_deadline(120)
257
+ raise 'Could not download push jobs config'
258
+ end
222
259
 
223
- if config.has_key?("curve_public_key")
224
- # Version 2.0 or greater, we should use encryption
260
+ if config && config.key?('curve_public_key')
261
+ # Version 2.0 or greater, we should use encryption
225
262
  @using_curve = true
226
263
  @legacy_mode = false
227
- elsif allow_unencrypted then
264
+ elsif allow_unencrypted
228
265
  @using_curve = false
229
266
  @legacy_mode = true
230
267
  Chef::Log.info "[#{node_name}] No key returned from server; falling back to 1.x protocol (no encryption)"
231
268
  else
232
- msg = "[#{node_name}] Exiting: No key returned from server; server may be using 1.x protocol. The config flag 'allow_unencrypted' disables encryption and allows use of 1.x server. Use with caution!"
269
+ msg = "[#{node_name}] Exiting: No key returned from server; server may be using 1.x protocol. \
270
+ The config flag 'allow_unencrypted' disables encryption and allows use of 1.x server. Use with caution!"
233
271
  Chef::Log.error msg
234
272
  Kernel.abort msg
235
273
  config = nil
236
274
  end
237
- return config
275
+ config
238
276
  end
239
277
 
240
278
  # XXX Should go in a separate file
@@ -132,7 +132,8 @@ class PushyClient
132
132
  :whitelist => Chef::Config[:whitelist] || { 'chef-client' => 'chef-client' },
133
133
  :hostname => ohai[:hostname],
134
134
  :filedir => Chef::Config[:file_dir],
135
- :allow_unencrypted => Chef::Config[:allow_unencrypted]
135
+ :allow_unencrypted => Chef::Config[:allow_unencrypted],
136
+ :allowed_overwritable_env_vars => Chef::Config[:allowed_overwritable_env_vars]
136
137
  )
137
138
 
138
139
  @client.start