beaker-pe 2.11.20 → 2.11.22

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 21a476e83cec11a4482e2ef0ad3a98f4ab4c6f8ded3f4f9f29d4bf581a91fb97
4
- data.tar.gz: f0896760878018b6d733d6a6064f502ba25fcaf9b4f4fe5590f02e7e1d7f56a2
3
+ metadata.gz: 11cedfa7e51e26dc8c86bba1f90f58246281a4ecd807bf478257faf65ab6222a
4
+ data.tar.gz: 11aa7c6788e083087b365f3ece9c776152192729620d7c445991f28321daf10f
5
5
  SHA512:
6
- metadata.gz: 40f9d7178a59bc28ce4a6faf7df20e0a6bf93d8ddd3a7083a0f82c84a6521d35c1570b6ddf7a8634f36dbc6ea317593f708b12ca6d6f837f6919478cce28e1f3
7
- data.tar.gz: 5fa09470a51a6564a68f37679900ca2567906db681dc36cca687016d1285de6a2e0b324af5242462d9772112ba7d3928402a99130c37749038b2315d8983f80b
6
+ metadata.gz: f4b5e2f23e69e501026ac935cbf9d1f921f9bcc46c1547a192f89a7dcb83b867f3e24390ce270740b82fb40a8709340b74ec9ac2a1fefa7590b287b25f540df8
7
+ data.tar.gz: 9d98e876622f630b5d300c12e4a19cf8dbe08b4ba0a44cb5ec45f6bcc5c21d9c6af6d24bbd024b5c0da9688182364f7528fc9cf185efce9d8c96a9a68d8044d7
@@ -143,6 +143,20 @@ module Beaker
143
143
  return tlsv1_platforms.any? {|platform_regex| host['platform'] =~ platform_regex}
144
144
  end
145
145
 
146
+ #Return '--waitforlock 1' if the agent is >= 6.16 which was used in 2019.8.0.
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
158
+ end
159
+
146
160
  # Generate the command line string needed to from a frictionless puppet-agent
147
161
  # install on this host in a PE environment.
148
162
  #
@@ -726,7 +740,7 @@ module Beaker
726
740
  # waitforlock in case stopping the agent run after stopping the agent service
727
741
  # takes a little longer than usual
728
742
  step "Run puppet to setup mcollective and pxp-agent" do
729
- on(master, puppet_agent('-t --waitforlock 1'), :acceptable_exit_codes => [0,2])
743
+ on(master, puppet_agent("-t #{waitforlock_flag(master)}"), :acceptable_exit_codes => [0,2])
730
744
  end
731
745
 
732
746
  install_agents_only_on(agents, opts)
@@ -977,7 +991,7 @@ module Beaker
977
991
  install_hosts.each do |host|
978
992
  # waitforlock in case stopping the agent run after stopping the agent service
979
993
  # takes a little longer than usual
980
- on host, puppet_agent('-t --waitforlock 1'), :acceptable_exit_codes => [0,2]
994
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
981
995
 
982
996
  # Workaround for PE-1105 when deploying 3.0.0
983
997
  # The installer did not respect our database host answers in 3.0.0,
@@ -1018,7 +1032,7 @@ module Beaker
1018
1032
  install_hosts.each do |host|
1019
1033
  # waitforlock in case stopping the agent run after stopping the agent service
1020
1034
  # takes a little longer than usual
1021
- on host, puppet_agent('-t --waitforlock 1'), :acceptable_exit_codes => [0,2]
1035
+ on host, puppet_agent("-t #{waitforlock_flag(host)}"), :acceptable_exit_codes => [0,2]
1022
1036
  # To work around PE-14318 if we just ran puppet agent on the
1023
1037
  # database node we will need to wait until puppetdb is up and
1024
1038
  # running before continuing
@@ -2123,7 +2137,9 @@ EOM
2123
2137
  # waitforlock in case stopping the agent run after stopping the agent service
2124
2138
  # takes a little longer than usual
2125
2139
  step "Run puppet on all agent nodes" do
2126
- on agent_nodes, puppet_agent('-t --waitforlock 1'), :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
2127
2143
  end
2128
2144
 
2129
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.20'
6
+ STRING = '2.11.22'
7
7
  end
8
8
 
9
9
  end
@@ -1969,6 +1969,7 @@ describe ClassMixedWithDSLInstallUtils do
1969
1969
  allow(subject).to receive(:generate_installer_conf_file_for)
1970
1970
  allow(subject).to receive(:deploy_frictionless_to_master)
1971
1971
  allow(subject).to receive(:install_agents_only_on)
1972
+ allow(subject).to receive(:waitforlock_flag).and_return('')
1972
1973
 
1973
1974
  allow(subject).to receive(:installer_cmd).with(monolithic, anything()).and_return("install master")
1974
1975
  allow(subject).to receive(:installer_cmd).with(el_agent, anything()).and_return("install el agent")
@@ -2025,7 +2026,7 @@ describe ClassMixedWithDSLInstallUtils do
2025
2026
 
2026
2027
  it 'installs agent on agent hosts' do
2027
2028
  agents = [agent, agent]
2028
- 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
2029
2030
  subject.install_agents_only_on(agents, opts)
2030
2031
  end
2031
2032
 
@@ -2035,13 +2036,6 @@ describe ClassMixedWithDSLInstallUtils do
2035
2036
  expect(subject).to receive(:stop_agent_on).with(agents, :run_in_parallel => true)
2036
2037
  subject.install_agents_only_on(agents, opts)
2037
2038
  end
2038
-
2039
- it 'runs puppet on agent hosts' do
2040
- agents = [agent, agent]
2041
- expect(subject).to receive(:on).with(agents, proc {
2042
- |cmd| cmd.command == "puppet agent"}, hash_including(:run_in_parallel => true)).once
2043
- subject.install_agents_only_on(agents, opts)
2044
- end
2045
2039
  end
2046
2040
 
2047
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.20
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-20 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