beaker-pe 1.34.0 → 1.35.0

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
  SHA1:
3
- metadata.gz: dddeba9ddd4a3de4df7e891a16a387118dc418c4
4
- data.tar.gz: 2526af158f14ee628af8e2264fc2573d004ca7fd
3
+ metadata.gz: 90ed458292d1bb6544717ab386c9a85410c79b1b
4
+ data.tar.gz: 95447c5d837868bd09b2c97e71c280cae245ca09
5
5
  SHA512:
6
- metadata.gz: 6f0740c55b9cdd292e6ae4048edc86f6953227f6999511be6fbdad62c9c4fd9bb0e93a101c590e93f1bec55ef882ebb9eeb475871ad1ef48c72b636f451b3f9c
7
- data.tar.gz: 50f1466cd21a57c43b16aaff85e76d3bb6878ae8359a363d4ea0dba8c45dc32a4f3420158f53928ec103804d9a11b9d9b6eb80b749297ee23e619cd9df3521ff
6
+ metadata.gz: 8fccbd15d0d9972742f4b38fdda770552a44e38cbff0f286b7559a595499ed883917fea55999d5676793608feced6e43418dba9519afcf173c6ce7b8ff487ecd
7
+ data.tar.gz: 1c7303c454a4bf2905d8be138b5679fd1443a63f3fd581caed7da670916a6fda610a319cc78d5aa7574493d7f38f8e308f8da1eebb1981a9f1eac0a382450d54
data/README.md CHANGED
@@ -70,7 +70,7 @@ you'd like to provide your own hosts file, set the `CONFIG` environment variable
70
70
  # Release
71
71
 
72
72
  To release new versions, we use a
73
- [Jenkins job](https://jenkins-qe.delivery.puppetlabs.net/job/qe_beaker-pe_btc-rls/)
73
+ [Jenkins job](https://cinext-jenkinsmaster-sre-prod-1.delivery.puppetlabs.net/job/qe_beaker-pe-gem_init-multijob_master/)
74
74
  (access to internal infrastructure will be required to view job).
75
75
 
76
76
  To release a new version (from the master branch), you'll need to just provide
@@ -448,6 +448,39 @@ module Beaker
448
448
  end
449
449
  end
450
450
 
451
+ # Check for availability of required network resources
452
+ # @param [Array<Host>] hosts
453
+ # @param [Array<String>] network_resources
454
+ #
455
+ # @example
456
+ # verify_network_resources(hosts, network_resources)
457
+ #
458
+ # @return nil
459
+ #
460
+ # @api private
461
+ def verify_network_resources(hosts, network_resources)
462
+ logger.notify("Checking the availability of network resources.")
463
+ hosts.each do |host|
464
+ # if options[:net_diag_hosts] isn't set, skip this check
465
+ if network_resources != nil
466
+ network_resources.each do |resource|
467
+ # curl the network resource silently (-s), only connect (-I), and don't print the output
468
+ on host, "curl -I -s #{resource} > /dev/null", :accept_all_exit_codes => true
469
+ if host.connection.logger.last_result.exit_code != 0
470
+ logger.warn("Connection error: #{host.host_hash[:vmhostname]} was unable to connect to #{resource}. Please ensure that your test does not require this resource.")
471
+ end
472
+ end
473
+ end
474
+ hosts.each do |target_host|
475
+ ping_opts = host['platform'] =~ /windows/ ? "-n 1" : "-c1"
476
+ on host, "ping #{ping_opts} #{target_host.host_hash[:vmhostname]} > /dev/null", :accept_all_exit_codes => true
477
+ if host.connection.logger.last_result.exit_code != 0
478
+ logger.warn("Connection error: #{host.host_hash[:vmhostname]} was unable to connect to #{target_host.host_hash[:vmhostname]} in your testing infrastructure.")
479
+ end
480
+ end
481
+ end
482
+ end
483
+
451
484
  #Perform a Puppet Enterprise upgrade or install
452
485
  # @param [Array<Host>] hosts The hosts to install or upgrade PE on
453
486
  # @param [Hash{Symbol=>Symbol, String}] opts The options
@@ -480,6 +513,7 @@ module Beaker
480
513
  def do_install hosts, opts = {}
481
514
  # detect the kind of install we're doing
482
515
  install_type = determine_install_type(hosts, opts)
516
+ verify_network_resources(hosts, options[:net_diag_hosts])
483
517
  if opts[:use_proxy]
484
518
  config_master_for_proxy_access
485
519
  end
@@ -564,7 +598,7 @@ module Beaker
564
598
  prepare_hosts(all_hosts, opts)
565
599
  fetch_pe([master], opts)
566
600
  prepare_host_installer_options(master)
567
- generate_installer_conf_file_for(master, [master], opts)
601
+ generate_installer_conf_file_for(master, all_hosts, opts)
568
602
  step "Install PE on master" do
569
603
  on master, installer_cmd(master, opts)
570
604
  end
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '1.34.0'
6
+ STRING = '1.35.0'
7
7
  end
8
8
 
9
9
  end
@@ -10,7 +10,7 @@ class ClassMixedWithDSLInstallUtils
10
10
  include Beaker::DSL::Patterns
11
11
  include Beaker::DSL::PE
12
12
 
13
- attr_accessor :hosts, :metadata, :options
13
+ attr_accessor :hosts, :metadata, :options, :logger
14
14
 
15
15
  def initialize
16
16
  @metadata = {}
@@ -22,10 +22,6 @@ class ClassMixedWithDSLInstallUtils
22
22
  def metadata
23
23
  @metadata ||= {}
24
24
  end
25
-
26
- def logger
27
- @logger ||= RSpec::Mocks::Double.new('logger').as_null_object
28
- end
29
25
  end
30
26
 
31
27
  describe ClassMixedWithDSLInstallUtils do
@@ -71,6 +67,16 @@ describe ClassMixedWithDSLInstallUtils do
71
67
  lei_hosts[3][:working_dir] = '/tmp'
72
68
  lei_hosts }
73
69
 
70
+ let(:logger) do
71
+ logger = double('logger').as_null_object
72
+ allow(logger).to receive(:with_indent).and_yield
73
+ logger
74
+ end
75
+
76
+ before(:each) do
77
+ subject.logger = logger
78
+ end
79
+
74
80
  context '#prep_host_for_upgrade' do
75
81
 
76
82
  it 'sets per host options before global options' 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: 1.34.0
4
+ version: 1.35.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-02-01 00:00:00.000000000 Z
11
+ date: 2018-02-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec