beaker-pe 2.11.21 → 2.11.22

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: 11cedfa7e51e26dc8c86bba1f90f58246281a4ecd807bf478257faf65ab6222a
4
+ data.tar.gz: 11aa7c6788e083087b365f3ece9c776152192729620d7c445991f28321daf10f
5
5
  SHA512:
6
- metadata.gz: 1626c5e8d6cabd70eadef2c69262f1c3af5364092abe76f395198726c6aa98c86a273308edb2dbd400b3e77647a75f567bb7551d1c7f7e20cf4ed9e1cee958ed
7
- data.tar.gz: a9f9764d8fdeaf123d498f90c63b571d7f759ce3b776022640a24dd6e91eefe84d18232ee992ea7cc074694a9c984791e4683f0497b453d34d5d9842fe989611
6
+ metadata.gz: f4b5e2f23e69e501026ac935cbf9d1f921f9bcc46c1547a192f89a7dcb83b867f3e24390ce270740b82fb40a8709340b74ec9ac2a1fefa7590b287b25f540df8
7
+ data.tar.gz: 9d98e876622f630b5d300c12e4a19cf8dbe08b4ba0a44cb5ec45f6bcc5c21d9c6af6d24bbd024b5c0da9688182364f7528fc9cf185efce9d8c96a9a68d8044d7
@@ -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)
@@ -982,7 +991,7 @@ module Beaker
982
991
  install_hosts.each do |host|
983
992
  # waitforlock in case stopping the agent run after stopping the agent service
984
993
  # takes a little longer than usual
985
- on host, puppet_agent("-t #{waitforlock_flag}"), :acceptable_exit_codes => [0,2]
994
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
986
995
 
987
996
  # Workaround for PE-1105 when deploying 3.0.0
988
997
  # The installer did not respect our database host answers in 3.0.0,
@@ -1023,7 +1032,7 @@ module Beaker
1023
1032
  install_hosts.each do |host|
1024
1033
  # waitforlock in case stopping the agent run after stopping the agent service
1025
1034
  # takes a little longer than usual
1026
- on host, puppet_agent("-t #{waitforlock_flag}"), :acceptable_exit_codes => [0,2]
1035
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
1027
1036
  # To work around PE-14318 if we just ran puppet agent on the
1028
1037
  # database node we will need to wait until puppetdb is up and
1029
1038
  # running before continuing
@@ -2128,7 +2137,9 @@ EOM
2128
2137
  # waitforlock in case stopping the agent run after stopping the agent service
2129
2138
  # takes a little longer than usual
2130
2139
  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
2140
+ block_on(agent_nodes, {:run_in_parallel => true}) do |host|
2141
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
2142
+ end
2132
2143
  end
2133
2144
 
2134
2145
  #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.22'
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.22
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-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec