puppet 6.19.0-x64-mingw32 → 6.19.1-x64-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a2e4357cafdc23fb83474814b2ce8a4fbd4975980171e3f973bd5df8ef542bba
4
- data.tar.gz: '080c5f00f7ba8ea052e56b7619151344bed4eb316b54e0635046e6d56ffbc414'
3
+ metadata.gz: bebf7c1f070e9b926268d10514168aa9c980571fb38937cca7d0ecd453b46571
4
+ data.tar.gz: 5085ac016a244c154912c61e51d0f7c88e1d0795633087c60d51b1918f69549c
5
5
  SHA512:
6
- metadata.gz: 7bf762c3a6772ddf89d3e4c2cb6b7b8167689a3a2b56e7008fff884d9fc8e7242b4f3087f3492faa400491c0725a676de8bc6c6860a644fa694497719d678b5e
7
- data.tar.gz: '095a9120765d79a27b6dab5f346574e046226a5ea949049f263aadc5b2f04a991e83fd67a1b1407befd4ed8319d7dd0db73498739f0ccf807adf905bf8e549a9'
6
+ metadata.gz: 420e17e3874a6acd6429883fa2933c9128d4d0c8603df758a71cc51d9d00c58cc17f89a67d587516aba460a4fa56ed2a5c44a4c61772536c847215e519193f45
7
+ data.tar.gz: b059f4655feb7d7ef87a443116c28028bcf2a6c9d21222c89614a39014558e436871e3a5c743fe1b102d4949332b405121b8b640cab80095c87c84bd9386a08b
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- puppet (6.19.0)
4
+ puppet (6.19.1)
5
5
  CFPropertyList (~> 2.2)
6
6
  concurrent-ruby (~> 1.0)
7
7
  deep_merge (~> 1.0)
@@ -28,7 +28,7 @@ GEM
28
28
  deep_merge (1.2.1)
29
29
  diff-lcs (1.4.4)
30
30
  docopt (0.6.1)
31
- facter (4.0.43)
31
+ facter (4.0.44)
32
32
  hocon (~> 1.3)
33
33
  thor (>= 1.0.1, < 2.0)
34
34
  fast_gettext (1.1.2)
@@ -385,6 +385,19 @@ class Puppet::Settings
385
385
  call_hooks_deferred_to_application_initialization
386
386
  issue_deprecations
387
387
 
388
+ run_mode = Puppet::Util::RunMode[self.preferred_run_mode]
389
+ if run_mode.agent? || run_mode.server?
390
+ if self.set_in_section?(:masterport, run_mode.name) && !self.set_in_section?(:serverport, run_mode.name)
391
+ self[:serverport] = self[:masterport]
392
+ elsif self.set_by_config?(:masterport) && !self.set_by_config?(:serverport)
393
+ self[:serverport] = self[:masterport]
394
+ elsif self.set_in_section?(:serverport, run_mode.name) && !self.set_in_section?(:masterport, run_mode.name)
395
+ self[:masterport] = self[:serverport]
396
+ elsif self.set_by_config?(:serverport) && !self.set_by_config?(:masterport)
397
+ self[:masterport] = self[:serverport]
398
+ end
399
+ end
400
+
388
401
  REQUIRED_APP_SETTINGS.each do |key|
389
402
  create_ancestors(Puppet[key])
390
403
  end
@@ -916,6 +929,16 @@ class Puppet::Settings
916
929
  end
917
930
  end
918
931
 
932
+ # Allow later inspection to determine if the setting was set by user
933
+ # config, rather than a default setting.
934
+ def set_in_section?(param, section)
935
+ param = param.to_sym
936
+ vals = searchpath_values(SearchPathElement.new(section, :section))
937
+ if vals
938
+ vals.lookup(param)
939
+ end
940
+ end
941
+
919
942
  # Patches the value for a param in a section.
920
943
  # This method is required to support the use case of unifying --dns-alt-names and
921
944
  # --dns_alt_names in the certificate face. Ideally this should be cleaned up.
@@ -6,7 +6,7 @@
6
6
  # Raketasks and such to set the version based on the output of `git describe`
7
7
 
8
8
  module Puppet
9
- PUPPETVERSION = '6.19.0'
9
+ PUPPETVERSION = '6.19.1'
10
10
 
11
11
  ##
12
12
  # version is a public API method intended to always provide a fast and
@@ -897,6 +897,144 @@ describe Puppet::Settings do
897
897
  expect(metadata(@settings.setting(:myfile))).to eq({:mode => "664"})
898
898
  end
899
899
 
900
+ context "when setting serverport and masterport" do
901
+ before(:each) do
902
+ default_values = {}
903
+ PuppetSpec::Settings::TEST_APP_DEFAULT_DEFINITIONS.keys.each do |key|
904
+ default_values[key] = 'default value'
905
+ end
906
+ @settings.define_settings :main, PuppetSpec::Settings::TEST_APP_DEFAULT_DEFINITIONS
907
+ @settings.define_settings :server, :masterport => { :desc => "a", :default => 1000 }
908
+ @settings.define_settings :server, :serverport => { :desc => "a", :default => 1000 }
909
+ @settings.define_settings :server, :ca_port => { :desc => "a", :default => "$serverport" }
910
+ @settings.define_settings :server, :report_port => { :desc => "a", :default => "$serverport" }
911
+ expect(@settings).to receive(:read_file).and_return(text)
912
+ @settings.send(:parse_config_files)
913
+ @settings.initialize_app_defaults(default_values.merge(:run_mode => :agent))
914
+ expect(@settings.preferred_run_mode).to eq(:agent)
915
+ end
916
+
917
+ context 'with serverport in main and masterport in agent' do
918
+ let(:text) do
919
+ "[main]
920
+ serverport = 444
921
+ [agent]
922
+ masterport = 445
923
+ "
924
+ end
925
+
926
+ it { expect(@settings[:serverport]).to eq(445) }
927
+ it { expect(@settings[:ca_port]).to eq("445") }
928
+ it { expect(@settings[:report_port]).to eq("445") }
929
+ end
930
+
931
+ context 'with serverport and masterport in main' do
932
+ let(:text) do
933
+ "[main]
934
+ serverport = 445
935
+ masterport = 444
936
+ "
937
+ end
938
+
939
+ it { expect(@settings[:serverport]).to eq(445) }
940
+ it { expect(@settings[:ca_port]).to eq("445") }
941
+ it { expect(@settings[:report_port]).to eq("445") }
942
+ end
943
+
944
+ context 'with serverport and masterport in agent' do
945
+ let(:text) do
946
+ "[agent]
947
+ serverport = 445
948
+ masterport = 444
949
+ "
950
+ end
951
+
952
+ it { expect(@settings[:serverport]).to eq(445) }
953
+ it { expect(@settings[:ca_port]).to eq("445") }
954
+ it { expect(@settings[:report_port]).to eq("445") }
955
+ end
956
+
957
+ context 'with both serverport and masterport in main and agent' do
958
+ let(:text) do
959
+ "[main]
960
+ serverport = 447
961
+ masterport = 442
962
+ [agent]
963
+ serverport = 445
964
+ masterport = 444
965
+ "
966
+ end
967
+
968
+ it { expect(@settings[:serverport]).to eq(445) }
969
+ it { expect(@settings[:ca_port]).to eq("445") }
970
+ it { expect(@settings[:report_port]).to eq("445") }
971
+ end
972
+
973
+ context 'with serverport in agent and masterport in main' do
974
+ let(:text) do
975
+ "[agent]
976
+ serverport = 444
977
+ [main]
978
+ masterport = 445
979
+ "
980
+ end
981
+
982
+ it { expect(@settings[:serverport]).to eq(444) }
983
+ it { expect(@settings[:ca_port]).to eq("444") }
984
+ it { expect(@settings[:report_port]).to eq("444") }
985
+ end
986
+
987
+ context 'with masterport in main' do
988
+ let(:text) do
989
+ "[main]
990
+ masterport = 445
991
+ "
992
+ end
993
+
994
+ it { expect(@settings[:serverport]).to eq(445) }
995
+ it { expect(@settings[:ca_port]).to eq("445") }
996
+ it { expect(@settings[:report_port]).to eq("445") }
997
+ end
998
+
999
+ context 'with masterport in agent' do
1000
+ let(:text) do
1001
+ "[agent]
1002
+ masterport = 445
1003
+ "
1004
+ end
1005
+
1006
+ it { expect(@settings[:serverport]).to eq(445) }
1007
+ it { expect(@settings[:ca_port]).to eq("445") }
1008
+ it { expect(@settings[:report_port]).to eq("445") }
1009
+ end
1010
+
1011
+ context 'with serverport in agent' do
1012
+ let(:text) do
1013
+ "[agent]
1014
+ serverport = 445
1015
+ "
1016
+ end
1017
+
1018
+ it { expect(@settings[:serverport]).to eq(445) }
1019
+ it { expect(@settings[:masterport]).to eq(445) }
1020
+ it { expect(@settings[:ca_port]).to eq("445") }
1021
+ it { expect(@settings[:report_port]).to eq("445") }
1022
+ end
1023
+
1024
+ context 'with serverport in main' do
1025
+ let(:text) do
1026
+ "[main]
1027
+ serverport = 445
1028
+ "
1029
+ end
1030
+
1031
+ it { expect(@settings[:serverport]).to eq(445) }
1032
+ it { expect(@settings[:masterport]).to eq(445) }
1033
+ it { expect(@settings[:ca_port]).to eq("445") }
1034
+ it { expect(@settings[:report_port]).to eq("445") }
1035
+ end
1036
+ end
1037
+
900
1038
  it "does not use the metadata from the same setting in a different section" do
901
1039
  default_values = {}
902
1040
  PuppetSpec::Settings::TEST_APP_DEFAULT_DEFINITIONS.keys.each do |key|
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: 6.19.0
4
+ version: 6.19.1
5
5
  platform: x64-mingw32
6
6
  authors:
7
7
  - Puppet Labs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-19 00:00:00.000000000 Z
11
+ date: 2020-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facter