puppet 4.10.9-x86-mingw32 → 4.10.10-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of puppet might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/lib/puppet/agent.rb +22 -2
- data/lib/puppet/application.rb +18 -1
- data/lib/puppet/application/agent.rb +9 -2
- data/lib/puppet/application/apply.rb +1 -1
- data/lib/puppet/application/config.rb +1 -0
- data/lib/puppet/application/device.rb +1 -2
- data/lib/puppet/application/filebucket.rb +22 -5
- data/lib/puppet/application/help.rb +1 -0
- data/lib/puppet/application/inspect.rb +2 -0
- data/lib/puppet/application/lookup.rb +1 -3
- data/lib/puppet/application_support.rb +6 -1
- data/lib/puppet/defaults.rb +33 -4
- data/lib/puppet/face/config.rb +13 -0
- data/lib/puppet/functions/each.rb +10 -4
- data/lib/puppet/functions/lookup.rb +2 -2
- data/lib/puppet/functions/map.rb +12 -2
- data/lib/puppet/functions/reduce.rb +45 -2
- data/lib/puppet/interface.rb +1 -0
- data/lib/puppet/module_tool/tar/mini.rb +57 -4
- data/lib/puppet/network/http/factory.rb +9 -0
- data/lib/puppet/network/http/webrick.rb +1 -3
- data/lib/puppet/node.rb +10 -0
- data/lib/puppet/node/facts.rb +9 -0
- data/lib/puppet/parser/functions/sprintf.rb +17 -3
- data/lib/puppet/pops/loader/static_loader.rb +2 -2
- data/lib/puppet/pops/lookup/hiera_config.rb +2 -2
- data/lib/puppet/pops/merge_strategy.rb +16 -1
- data/lib/puppet/pops/types/iterable.rb +2 -0
- data/lib/puppet/pops/types/type_factory.rb +1 -1
- data/lib/puppet/pops/types/type_mismatch_describer.rb +15 -5
- data/lib/puppet/pops/types/types.rb +4 -2
- data/lib/puppet/provider/service/smf.rb +2 -2
- data/lib/puppet/provider/service/systemd.rb +1 -0
- data/lib/puppet/provider/service/upstart.rb +1 -1
- data/lib/puppet/settings/environment_conf.rb +10 -2
- data/lib/puppet/transaction.rb +3 -0
- data/lib/puppet/transaction/report.rb +8 -1
- data/lib/puppet/type.rb +1 -9
- data/lib/puppet/type/user.rb +9 -3
- data/lib/puppet/util/http_proxy.rb +14 -6
- data/lib/puppet/version.rb +1 -1
- data/locales/puppet.pot +29 -13
- data/man/man5/puppet.conf.5 +276 -55
- data/man/man8/extlookup2hiera.8 +2 -2
- data/man/man8/puppet-agent.8 +32 -10
- data/man/man8/puppet-apply.8 +21 -6
- data/man/man8/puppet-ca.8 +48 -34
- data/man/man8/puppet-catalog.8 +4 -4
- data/man/man8/puppet-cert.8 +23 -6
- data/man/man8/puppet-certificate.8 +44 -28
- data/man/man8/puppet-certificate_request.8 +4 -4
- data/man/man8/puppet-certificate_revocation_list.8 +4 -4
- data/man/man8/puppet-config.8 +5 -5
- data/man/man8/puppet-describe.8 +3 -3
- data/man/man8/puppet-device.8 +23 -13
- data/man/man8/puppet-doc.8 +5 -5
- data/man/man8/puppet-epp.8 +16 -10
- data/man/man8/puppet-facts.8 +4 -4
- data/man/man8/puppet-file.8 +4 -4
- data/man/man8/puppet-filebucket.8 +63 -6
- data/man/man8/puppet-generate.8 +84 -0
- data/man/man8/puppet-help.8 +4 -4
- data/man/man8/puppet-inspect.8 +8 -5
- data/man/man8/puppet-key.8 +4 -4
- data/man/man8/puppet-lookup.8 +87 -0
- data/man/man8/puppet-man.8 +5 -5
- data/man/man8/puppet-master.8 +5 -5
- data/man/man8/puppet-module.8 +22 -13
- data/man/man8/puppet-node.8 +4 -4
- data/man/man8/puppet-parser.8 +4 -4
- data/man/man8/puppet-plugin.8 +4 -4
- data/man/man8/puppet-report.8 +4 -4
- data/man/man8/puppet-resource.8 +4 -8
- data/man/man8/puppet-resource_type.8 +4 -4
- data/man/man8/puppet-status.8 +5 -5
- data/man/man8/puppet.8 +12 -3
- data/spec/fixtures/unit/application/environments/production/data/common.yaml +2 -0
- data/spec/integration/agent/logging_spec.rb +2 -0
- data/spec/integration/provider/cron/crontab_spec.rb +1 -0
- data/spec/unit/agent_spec.rb +33 -0
- data/spec/unit/application/config_spec.rb +4 -0
- data/spec/unit/application/inspect_spec.rb +11 -0
- data/spec/unit/application/lookup_spec.rb +30 -0
- data/spec/unit/application_spec.rb +18 -0
- data/spec/unit/environments_spec.rb +15 -0
- data/spec/unit/face/config_spec.rb +1 -2
- data/spec/unit/functions/break_spec.rb +108 -49
- data/spec/unit/functions/defined_spec.rb +2 -2
- data/spec/unit/functions/lookup_spec.rb +88 -3
- data/spec/unit/interface_spec.rb +12 -0
- data/spec/unit/module_tool/tar/mini_spec.rb +34 -5
- data/spec/unit/network/http/factory_spec.rb +22 -0
- data/spec/unit/network/http/webrick_spec.rb +30 -29
- data/spec/unit/parser/functions/sprintf_spec.rb +26 -0
- data/spec/unit/pops/loaders/static_loader_spec.rb +1 -1
- data/spec/unit/pops/types/type_calculator_spec.rb +21 -0
- data/spec/unit/pops/types/type_mismatch_describer_spec.rb +9 -0
- data/spec/unit/provider/service/smf_spec.rb +2 -4
- data/spec/unit/provider/service/systemd_spec.rb +14 -0
- data/spec/unit/resource/catalog_spec.rb +10 -0
- data/spec/unit/transaction/report_spec.rb +19 -0
- data/spec/unit/util/http_proxy_spec.rb +37 -0
- metadata +4 -2
@@ -58,6 +58,20 @@ describe Puppet::Type.type(:service).provider(:systemd) do
|
|
58
58
|
end
|
59
59
|
end
|
60
60
|
|
61
|
+
it "should be the default provider on Amazon Linux 2.0" do
|
62
|
+
Facter.stubs(:value).with(:osfamily).returns(:redhat)
|
63
|
+
Facter.stubs(:value).with(:operatingsystem).returns(:amazon)
|
64
|
+
Facter.stubs(:value).with(:operatingsystemmajrelease).returns("2")
|
65
|
+
expect(described_class).to be_default
|
66
|
+
end
|
67
|
+
|
68
|
+
it "should not be the default provider on Amazon Linux 2017.09" do
|
69
|
+
Facter.stubs(:value).with(:osfamily).returns(:redhat)
|
70
|
+
Facter.stubs(:value).with(:operatingsystem).returns(:amazon)
|
71
|
+
Facter.stubs(:value).with(:operatingsystemmajrelease).returns("2017")
|
72
|
+
expect(described_class).not_to be_default
|
73
|
+
end
|
74
|
+
|
61
75
|
it "should be the default provider on cumulus3" do
|
62
76
|
Facter.stubs(:value).with(:osfamily).returns(:debian)
|
63
77
|
Facter.stubs(:value).with(:operatingsystem).returns('CumulusLinux')
|
@@ -653,6 +653,16 @@ describe Puppet::Resource::Catalog, "when compiling" do
|
|
653
653
|
@catalog.apply(:ignoreschedules => true)
|
654
654
|
end
|
655
655
|
|
656
|
+
it "should detect transaction failure and report it" do
|
657
|
+
@transaction.stubs(:evaluate).raises(RuntimeError, 'transaction failed.')
|
658
|
+
report = Puppet::Transaction::Report.new('apply')
|
659
|
+
|
660
|
+
expect { @catalog.apply(:report => report) }.to raise_error(RuntimeError)
|
661
|
+
report.finalize_report
|
662
|
+
|
663
|
+
expect(report.status).to eq('failed')
|
664
|
+
end
|
665
|
+
|
656
666
|
describe "host catalogs" do
|
657
667
|
|
658
668
|
# super() doesn't work in the setup method for some reason
|
@@ -247,6 +247,19 @@ describe Puppet::Transaction::Report do
|
|
247
247
|
end
|
248
248
|
end
|
249
249
|
|
250
|
+
it "should be unchanged if there are no other failures or changes and the transaction completed" do
|
251
|
+
@report.transaction_completed = true
|
252
|
+
@report.finalize_report
|
253
|
+
|
254
|
+
expect(@report.status).to eq("unchanged")
|
255
|
+
end
|
256
|
+
|
257
|
+
it "should be failed if there are no other failures or changes and the transaction did not complete" do
|
258
|
+
@report.finalize_report
|
259
|
+
|
260
|
+
expect(@report.status).to eq("failed")
|
261
|
+
end
|
262
|
+
|
250
263
|
[:time, :resources, :changes, :events].each do |type|
|
251
264
|
it "should add #{type} metrics" do
|
252
265
|
@report.finalize_report
|
@@ -278,12 +291,14 @@ describe Puppet::Transaction::Report do
|
|
278
291
|
|
279
292
|
it "should mark the report as 'failed' if there are failing resources" do
|
280
293
|
add_statuses(1) { |status| status.failed = true }
|
294
|
+
@report.transaction_completed = true
|
281
295
|
@report.finalize_report
|
282
296
|
expect(@report.status).to eq('failed')
|
283
297
|
end
|
284
298
|
|
285
299
|
it "should mark the report as 'failed' if resources_failed_to_generate" do
|
286
300
|
@report.resources_failed_to_generate = true
|
301
|
+
@report.transaction_completed = true
|
287
302
|
@report.finalize_report
|
288
303
|
expect(@report.status).to eq('failed')
|
289
304
|
end
|
@@ -292,12 +307,14 @@ describe Puppet::Transaction::Report do
|
|
292
307
|
describe "for changes" do
|
293
308
|
it "should provide the number of changes from the resource statuses and mark the report as 'changed'" do
|
294
309
|
add_statuses(3) { |status| 3.times { status << Puppet::Transaction::Event.new(:status => 'success') } }
|
310
|
+
@report.transaction_completed = true
|
295
311
|
@report.finalize_report
|
296
312
|
expect(metric(:changes, "total")).to eq(9)
|
297
313
|
expect(@report.status).to eq('changed')
|
298
314
|
end
|
299
315
|
|
300
316
|
it "should provide a total even if there are no changes, and mark the report as 'unchanged'" do
|
317
|
+
@report.transaction_completed = true
|
301
318
|
@report.finalize_report
|
302
319
|
expect(metric(:changes, "total")).to eq(0)
|
303
320
|
expect(@report.status).to eq('unchanged')
|
@@ -595,6 +612,7 @@ describe Puppet::Transaction::Report do
|
|
595
612
|
report.cached_catalog_status = "not_used"
|
596
613
|
report.master_used = "test:000"
|
597
614
|
report.add_resource_status(status)
|
615
|
+
report.transaction_completed = true
|
598
616
|
report.finalize_report
|
599
617
|
report
|
600
618
|
end
|
@@ -612,6 +630,7 @@ describe Puppet::Transaction::Report do
|
|
612
630
|
report.cached_catalog_status = "not_used"
|
613
631
|
report.master_used = "test:000"
|
614
632
|
report.add_resource_status(status)
|
633
|
+
report.transaction_completed = true
|
615
634
|
report.finalize_report
|
616
635
|
report
|
617
636
|
end
|
@@ -213,4 +213,41 @@ describe Puppet::Util::HttpProxy do
|
|
213
213
|
end
|
214
214
|
end
|
215
215
|
end
|
216
|
+
|
217
|
+
describe '.request_with_redirects' do
|
218
|
+
let(:dest) { URI.parse('http://mydomain.com/some/path') }
|
219
|
+
let(:http_ok) { stub('http ok', :code => 200, :message => 'HTTP OK') }
|
220
|
+
|
221
|
+
it 'generates accept and accept-encoding headers' do
|
222
|
+
Net::HTTP.any_instance.stubs(:head).returns(http_ok)
|
223
|
+
Net::HTTP.any_instance.expects(:get).with do |_, headers|
|
224
|
+
expect(headers)
|
225
|
+
.to match({'Accept' => '*/*',
|
226
|
+
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
227
|
+
'User-Agent' => /Puppet/})
|
228
|
+
end.returns(http_ok)
|
229
|
+
|
230
|
+
subject.request_with_redirects(dest, :get, 0)
|
231
|
+
end
|
232
|
+
|
233
|
+
it 'generates accept and accept-encoding headers when a block is provided' do
|
234
|
+
Net::HTTP.any_instance.stubs(:head).returns(http_ok)
|
235
|
+
Net::HTTP.any_instance.expects(:request_get).with do |_, headers, &block|
|
236
|
+
expect(headers)
|
237
|
+
.to match({'Accept' => '*/*',
|
238
|
+
'Accept-Encoding' => 'gzip;q=1.0,deflate;q=0.6,identity;q=0.3',
|
239
|
+
'User-Agent' => /Puppet/})
|
240
|
+
end.returns(http_ok)
|
241
|
+
|
242
|
+
subject.request_with_redirects(dest, :get, 0) do
|
243
|
+
# unused
|
244
|
+
end
|
245
|
+
end
|
246
|
+
|
247
|
+
it 'only makes a single HEAD request' do
|
248
|
+
Net::HTTP.any_instance.expects(:head).with(anything, anything).returns(http_ok)
|
249
|
+
|
250
|
+
subject.request_with_redirects(dest, :head, 0)
|
251
|
+
end
|
252
|
+
end
|
216
253
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.10.
|
4
|
+
version: 4.10.10
|
5
5
|
platform: x86-mingw32
|
6
6
|
authors:
|
7
7
|
- Puppet Labs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: facter
|
@@ -1506,9 +1506,11 @@ files:
|
|
1506
1506
|
- man/man8/puppet-facts.8
|
1507
1507
|
- man/man8/puppet-file.8
|
1508
1508
|
- man/man8/puppet-filebucket.8
|
1509
|
+
- man/man8/puppet-generate.8
|
1509
1510
|
- man/man8/puppet-help.8
|
1510
1511
|
- man/man8/puppet-inspect.8
|
1511
1512
|
- man/man8/puppet-key.8
|
1513
|
+
- man/man8/puppet-lookup.8
|
1512
1514
|
- man/man8/puppet-man.8
|
1513
1515
|
- man/man8/puppet-master.8
|
1514
1516
|
- man/man8/puppet-module.8
|