beaker-pe 2.11.21 → 2.11.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/beaker-pe/install/pe_utils.rb +19 -6
- data/lib/beaker-pe/version.rb +1 -1
- data/spec/beaker-pe/install/pe_utils_spec.rb +1 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8becd49a23057ad0bd43368413ef30c2902a24904a9049e55ae5a70005f38ba3
|
4
|
+
data.tar.gz: 9f8d19e850b9a64f007e7096fd733159b7b2e74a064572823cf6efcf501312f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
|
148
|
-
|
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
|
-
|
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
|
data/lib/beaker-pe/version.rb
CHANGED
@@ -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.
|
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-
|
11
|
+
date: 2022-10-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|