puppet 6.19.0-x86-mingw32 → 6.19.1-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1615d1d29b75fe44fd65ed6dc2d48298340d0fa0edbfb1734aa9bdaf9cc39ec9
4
- data.tar.gz: 3ca003bdffb4f95ccca4bbfca3d7788efdf47ef0f4930e5df97e336021fc7f99
3
+ metadata.gz: 6ebe66e99cba6e8ddd5f163e4b2c3ed685bff3c789ae2e635cf6113a0d407ce8
4
+ data.tar.gz: 5d556caf450df0599525c2137dfbf31cde14d2df1840c33e4dc3b381d8b7a8e3
5
5
  SHA512:
6
- metadata.gz: efdaa4c37bc9aee7cecfb81f59c3cd0a1a9c8fe8210330a09b1911e94b0cd6169635db957cb8c1a6c9f2e5c027a3b87acaa29db34c06e145010ddb7fb545da04
7
- data.tar.gz: 43e61b831bb76498ac3dab3312f02ac1437643c962b2e1328d0c9a8348c249b5bc6f2d2ddf8e97d850434005a0a26b61e405d9a66adabcefa720fe182103ded8
6
+ metadata.gz: '091cc6410881cc9e883a8e1180d5e722a57b0dcced17e4cfd0eb02747ef8b2c2bf51b090b6f3d8849054d1c774f5286435260932004853e108639a6d170a166b'
7
+ data.tar.gz: 10721b45cfbf7482f5ab8bff8f5e33171a870fce254a3c31ac34d1c410e27e0bae2538c6b3ce18807d8de0a175556f8755592e74d7ebd76dcd5651500e29f248
@@ -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: x86-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