beaker-pe 2.11.21 → 2.11.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 527fe6d6360dfb51c8f1e2dbd9f032802b8b41b27f0c46e4ac80e96df585014e
4
- data.tar.gz: 7c6a69a2b023551ca1332b2319583fba658536194d228fa29478bf33f906b58c
3
+ metadata.gz: 8becd49a23057ad0bd43368413ef30c2902a24904a9049e55ae5a70005f38ba3
4
+ data.tar.gz: 9f8d19e850b9a64f007e7096fd733159b7b2e74a064572823cf6efcf501312f1
5
5
  SHA512:
6
- metadata.gz: 1626c5e8d6cabd70eadef2c69262f1c3af5364092abe76f395198726c6aa98c86a273308edb2dbd400b3e77647a75f567bb7551d1c7f7e20cf4ed9e1cee958ed
7
- data.tar.gz: a9f9764d8fdeaf123d498f90c63b571d7f759ce3b776022640a24dd6e91eefe84d18232ee992ea7cc074694a9c984791e4683f0497b453d34d5d9842fe989611
6
+ metadata.gz: b286e0c93899aa70cfd61d6729f46c6db9042c407f7c4ee64618cb251738677af21d1f499a746b62eb18d15afd83eebab7dc9e6b9a7b6184cbf2fff3fb53c539
7
+ data.tar.gz: a6bb05de8a00d72ef78887b24eea5db7b5835329a2b0d36ded5f2a492890e62d61b0da143377cc5c477561f8db8b30c12fcaba1ad9a206633da971a9aa98a75e
@@ -144,8 +144,17 @@ module Beaker
144
144
  end
145
145
 
146
146
  #Return '--waitforlock 1' if the agent is >= 6.16 which was used in 2019.8.0.
147
- def waitforlock_flag
148
- version_is_less(master['pe_ver'], '2019.8.0') ? '' : '--waitforlock 1'
147
+ #In the test running with legacy agents, the pe_ver value on that host
148
+ #corresponds to the PE version the old agent comes from. Also, puppet_agent_version
149
+ #is present on these host objects.
150
+ def waitforlock_flag(host)
151
+ agent_version = host['puppet_agent_version']
152
+ pe_ver = host['pe_ver']
153
+ if (agent_version && version_is_less(agent_version, '6.16.0')) || version_is_less(host['pe_ver'], '2019.8.0')
154
+ ''
155
+ else
156
+ '--waitforlock 1'
157
+ end
149
158
  end
150
159
 
151
160
  # Generate the command line string needed to from a frictionless puppet-agent
@@ -731,7 +740,7 @@ module Beaker
731
740
  # waitforlock in case stopping the agent run after stopping the agent service
732
741
  # takes a little longer than usual
733
742
  step "Run puppet to setup mcollective and pxp-agent" do
734
- on(master, puppet_agent("-t #{waitforlock_flag}"), :acceptable_exit_codes => [0,2])
743
+ on(master, puppet_agent("-t #{waitforlock_flag(master)}"), :acceptable_exit_codes => [0,2])
735
744
  end
736
745
 
737
746
  install_agents_only_on(agents, opts)
@@ -814,6 +823,8 @@ module Beaker
814
823
  # The next two lines clear the rest of the internal puppet lan
815
824
  on host, "iptables -A OUTPUT -p tcp -d 10.16.0.0/16 -j ACCEPT"
816
825
  on host, "iptables -A OUTPUT -p tcp -d 10.32.0.0/16 -j ACCEPT"
826
+ # And for GCP scratchpad hosts
827
+ on host, "iptables -A OUTPUT -p tcp -d 10.253.0.0/16 -j ACCEPT"
817
828
  # This allows udp on a port bundler requires
818
829
  on host, 'iptables -A OUTPUT -p udp -m udp --dport 53 -j ACCEPT'
819
830
  # Next two lines allow host to access itself via localhost or 127.0.0.1
@@ -982,7 +993,7 @@ module Beaker
982
993
  install_hosts.each do |host|
983
994
  # waitforlock in case stopping the agent run after stopping the agent service
984
995
  # takes a little longer than usual
985
- on host, puppet_agent("-t #{waitforlock_flag}"), :acceptable_exit_codes => [0,2]
996
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
986
997
 
987
998
  # Workaround for PE-1105 when deploying 3.0.0
988
999
  # The installer did not respect our database host answers in 3.0.0,
@@ -1023,7 +1034,7 @@ module Beaker
1023
1034
  install_hosts.each do |host|
1024
1035
  # waitforlock in case stopping the agent run after stopping the agent service
1025
1036
  # takes a little longer than usual
1026
- on host, puppet_agent("-t #{waitforlock_flag}"), :acceptable_exit_codes => [0,2]
1037
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
1027
1038
  # To work around PE-14318 if we just ran puppet agent on the
1028
1039
  # database node we will need to wait until puppetdb is up and
1029
1040
  # running before continuing
@@ -2128,7 +2139,9 @@ EOM
2128
2139
  # waitforlock in case stopping the agent run after stopping the agent service
2129
2140
  # takes a little longer than usual
2130
2141
  step "Run puppet on all agent nodes" do
2131
- on agent_nodes, puppet_agent("-t #{waitforlock_flag}"), :acceptable_exit_codes => [0,2], :run_in_parallel => true
2142
+ block_on(agent_nodes, {:run_in_parallel => true}) do |host|
2143
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
2144
+ end
2132
2145
  end
2133
2146
 
2134
2147
  #Workaround for windows frictionless install, see BKR-943
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '2.11.21'
6
+ STRING = '2.11.23'
7
7
  end
8
8
 
9
9
  end
@@ -2026,7 +2026,7 @@ describe ClassMixedWithDSLInstallUtils do
2026
2026
 
2027
2027
  it 'installs agent on agent hosts' do
2028
2028
  agents = [agent, agent]
2029
- expect(subject).to receive(:block_on).with(agents, :run_in_parallel => true)
2029
+ expect(subject).to receive(:block_on).with(agents, :run_in_parallel => true).twice
2030
2030
  subject.install_agents_only_on(agents, opts)
2031
2031
  end
2032
2032
 
@@ -2036,13 +2036,6 @@ describe ClassMixedWithDSLInstallUtils do
2036
2036
  expect(subject).to receive(:stop_agent_on).with(agents, :run_in_parallel => true)
2037
2037
  subject.install_agents_only_on(agents, opts)
2038
2038
  end
2039
-
2040
- it 'runs puppet on agent hosts' do
2041
- agents = [agent, agent]
2042
- expect(subject).to receive(:on).with(agents, proc {
2043
- |cmd| cmd.command == "puppet agent"}, hash_including(:run_in_parallel => true)).once
2044
- subject.install_agents_only_on(agents, opts)
2045
- end
2046
2039
  end
2047
2040
 
2048
2041
  describe 'do_higgs_install' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker-pe
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.11.21
4
+ version: 2.11.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-09-26 00:00:00.000000000 Z
11
+ date: 2022-10-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec