beaker-pe 1.30.0 → 1.31.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YjViMjE3NDc2NGE0MThhNjc0OGZkODg5ODI1MzU3M2U2ZmNiMzgwNg==
4
+ MjU5OWMzNmI1ODNjYzFhY2I4ZGNiMGYzZjVmZTc0OTEzYWEyNTNkZg==
5
5
  data.tar.gz: !binary |-
6
- OTE3ZmY4YjgyNDQ2ZDRmNGI0ZTQ1OWRkZWVkNWE3Y2E5MTE5NjJjNA==
6
+ MDc4NmNiZmM4NzUwNGZjM2JmZjFkYWY1ODQxMTc0YzFjMDJkNTljYg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- NzhhZGQ3ZjUwZWRhMzkzNTg5ZDcxZDQwNmE5MWM3ZWFmZjU5MzhmOTA5Mzdl
10
- NmRlNjQxMDY4ZmQwOTVkMzRiMTJhNjgxMTA2ODZlODE2NzMzNWVkODg5Zjgy
11
- NzU5ZDM4NjNmMjBlNzNkN2QxMDE5YWZlN2ZhZWE2Y2Y1NWQ4NjA=
9
+ YjhlNWEyMWUyYTI0NjE5MGViNjQwYjNmNjU5N2QzODhiM2ZhZmRhZTEyNGE1
10
+ ZmQ3NjFhNmU0NTFjZjZiYjVmNjY4NDEwZTRhMDFmYWEwYmE1OTdmZDYzYjRm
11
+ MGQ5YTJmZmU2ODA2MjA1NmVmMzk0OWQzNzMyODBkMDdhMzNjZGM=
12
12
  data.tar.gz: !binary |-
13
- MGVmOGQ0NDBiNTEyMjc2MjA4MGI0Zjk0MDM3YWY3MWVjZmFlMmZjM2M2NmFh
14
- YTdiY2RiMTYzYTc4YmYyODJiZTkxYmFiZGE5MjQ3ZTY3MGEzNzdmZGRiMzI3
15
- NWQ2NGVhZWQwYjE4ZTY2NjIyNzQ3ZDdiMjMwY2QxZGY2ZTZhMmM=
13
+ MjFiZjA3ODI0NWZhM2ZlN2YyZTIyNTBiZTUzOTIzNWZjZTFhMjFkNTlhYzgy
14
+ NWVjOTM3ZmRlMGVmYmIyOWQwMzVmNTM4ZTI5NzI5MzQ3ZmJhMWUyOWQ0Mzc2
15
+ ZDM3N2JkZjE2ZGM5NzZmYTAyZDIxZTI2YWFmOWIzMmUyZmZiN2U=
@@ -1342,8 +1342,10 @@ module Beaker
1342
1342
  begin
1343
1343
  execute_installer_cmd(master, opts)
1344
1344
  rescue Beaker::Host::CommandFailure => e
1345
- #The way the master fails to install includes this specific line as of PE 2018.1.x.
1346
- unless e.message =~ /The operation could not be completed because RBACs database has not been initialized/
1345
+ installer_log_dir = '/var/log/puppetlabs/installer'
1346
+ latest_installer_log_file = on(master, "ls -1t #{installer_log_dir} | head -n1").stdout.chomp
1347
+ #Check the lastest install log to confirm the expected failure is there
1348
+ unless on(master, "grep 'The operation could not be completed because RBACs database has not been initialized' #{installer_log_dir}/#{latest_installer_log_file}")
1347
1349
  raise "Install on master failed in an unexpected manner"
1348
1350
  end
1349
1351
  end
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '1.30.0'
6
+ STRING = '1.31.0'
7
7
  end
8
8
 
9
9
  end
@@ -1168,6 +1168,59 @@ describe ClassMixedWithDSLInstallUtils do
1168
1168
  expect{ subject.do_install_pe_with_pe_managed_external_postgres([mono_master, pe_postgres, agent], {}) }.not_to raise_error
1169
1169
  end
1170
1170
 
1171
+ it 'will rescue out of the error and complete the installation' do
1172
+ allow(subject).to receive(:fetch_pe).with([mono_master, pe_postgres], {}).and_return(true)
1173
+ allow(subject).to receive(:master).and_return(mono_master)
1174
+ allow(subject).to receive(:database).and_return(mono_master)
1175
+ allow(subject).to receive(:dashboard).and_return(mono_master)
1176
+ allow(subject).to receive(:pe_postgres).and_return(pe_postgres)
1177
+
1178
+ allow(subject).to receive(:original_pe_ver).and_return('2017.2')
1179
+ allow(subject).to receive(:prepare_host_installer_options).exactly(2).times
1180
+ allow(subject).to receive(:setup_pe_conf).exactly(2).times
1181
+
1182
+ #installer command on master is called twice on install
1183
+ expect(subject).to receive(:execute_installer_cmd).with(mono_master, {}).and_raise(Beaker::Host::CommandFailure).once.ordered
1184
+
1185
+ #Error handling
1186
+ @installer_log_file_name = Beaker::Result.new( {}, '' )
1187
+ @installer_log_file_name.stdout = "installer_log_name"
1188
+ allow(subject).to receive(:on).with(mono_master, "ls -1t /var/log/puppetlabs/installer | head -n1").and_return(@installer_log_file_name)
1189
+ allow(subject).to receive(:on).with(mono_master, "grep 'The operation could not be completed because RBACs database has not been initialized' /var/log/puppetlabs/installer/installer_log_name").and_return(true)
1190
+
1191
+ allow(subject).to receive(:execute_installer_cmd).with(pe_postgres, {}).once
1192
+ expect(subject).to receive(:execute_installer_cmd).with(mono_master, {}).once.ordered
1193
+ allow(subject).to receive(:on).with(mono_master, "puppet agent -t", :acceptable_exit_codes=>[0, 2]).exactly(3).times
1194
+ allow(subject).to receive(:on).with(pe_postgres, "puppet agent -t", :acceptable_exit_codes=> [0, 2]).once
1195
+
1196
+ allow(subject).to receive(:install_agents_only_on).with([agent], {})
1197
+ allow(subject).to receive(:run_puppet_on_non_infrastructure_nodes).with([agent])
1198
+
1199
+ expect{ subject.do_install_pe_with_pe_managed_external_postgres([mono_master, pe_postgres, agent], {}) }.not_to raise_error
1200
+ end
1201
+
1202
+ it 'will fail install as expected if rescue does not match error message' do
1203
+ allow(subject).to receive(:fetch_pe).with([mono_master, pe_postgres], {}).and_return(true)
1204
+ allow(subject).to receive(:master).and_return(mono_master)
1205
+ allow(subject).to receive(:database).and_return(mono_master)
1206
+ allow(subject).to receive(:dashboard).and_return(mono_master)
1207
+ allow(subject).to receive(:pe_postgres).and_return(pe_postgres)
1208
+
1209
+ allow(subject).to receive(:original_pe_ver).and_return('2017.2')
1210
+ allow(subject).to receive(:prepare_host_installer_options).exactly(2).times
1211
+ allow(subject).to receive(:setup_pe_conf).exactly(2).times
1212
+
1213
+ expect(subject).to receive(:execute_installer_cmd).with(mono_master, {}).and_raise(Beaker::Host::CommandFailure).once.ordered
1214
+
1215
+ #Error handling
1216
+ @installer_log_file_name = Beaker::Result.new( {}, '' )
1217
+ @installer_log_file_name.stdout = "installer_log_name"
1218
+ allow(subject).to receive(:on).with(mono_master, "ls -1t /var/log/puppetlabs/installer | head -n1").and_return(@installer_log_file_name)
1219
+ allow(subject).to receive(:on).with(mono_master, "grep 'The operation could not be completed because RBACs database has not been initialized' /var/log/puppetlabs/installer/installer_log_name").and_return(false)
1220
+
1221
+ expect{ subject.do_install_pe_with_pe_managed_external_postgres([mono_master, pe_postgres, agent], {}) }.to raise_error(RuntimeError, "Install on master failed in an unexpected manner")
1222
+ end
1223
+
1171
1224
  it 'will do a monolithic upgrade of PE with an external postgres that is managed by PE' do
1172
1225
  allow(subject).to receive(:fetch_pe).with([mono_master, pe_postgres], {}).and_return(true)
1173
1226
  allow(subject).to receive(:master).and_return(mono_master)
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: 1.30.0
4
+ version: 1.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-02 00:00:00.000000000 Z
11
+ date: 2018-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec