beaker-pe 0.1.1 → 0.1.2

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
- NDdmODU1MjE4MDIwZjBkYjUyMWZkYTU3OWI3MzU0ZjFkMmQyZGRkMw==
4
+ OWZjMjMxMzZmYjc5ZWYzN2NiYmYwYmY2YzUyOWM3ZGM2YTZiZWI5MA==
5
5
  data.tar.gz: !binary |-
6
- NzA3N2NiMzAxNjdlODA1ZmIwZTg1MThmZmFmMDFjZmViNmZkMDJjMw==
6
+ YzAwOTlhOGJhMmUzYWU1Nzg0Y2RmOWNkNGY4MWU3YjlkM2Q0ZTE5OQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZDc1ZWVjMDg0MWJjYTBkZTNkM2Y3ODIzMTU3NTg5ZmMyMzc1OTRmOTVkMzMx
10
- NWE4ZTc5MTM5YjM1NTljMTZhMmM3ZmJlMTExNWViMDhkNTdiZGUwZTQwNjA2
11
- ZTZiYmIzNjJhZmRhM2I4ZWQzYmIyNDhiZjkzOTgzYTIwMzc2Njk=
9
+ ZGZhOTYzNzE3MDY2YzUxNTU4ODg4ZWJkM2U4NDFkYmRjYTk3ODNjODA5OTRj
10
+ MzM3ZGM4ODI5OWEyOTRmYjNkNTEzZmFlYTU5M2M5OTZmNTc0ZDYzZDYzZDQz
11
+ MjY5YTZmNDA5ZDNiZTdjZDA5MzAyZWUxNTJjMDJlYTQyYTk4MjQ=
12
12
  data.tar.gz: !binary |-
13
- N2EyZTkwYTc4MTYxZWZkMDUyZjI4Zjg5ODQxYzgxZTljZjU2Y2VhZWFlZjUw
14
- MjZiMDFiMDRiMWE2ZjE5ODIwMzYyMzM5ODUxY2UyZDQ3MDEyZTVhYmUxYjFh
15
- MDQ0OGVmMzg2NWQxODk2ZWM4ZTI1ZmQ4MzkyYjA5ODVjMWFiMDU=
13
+ MTUzMzMwNzc3MzFiOTAzMzM1MDlkOWEyZTQ3NGYwNmQ3Y2JiNjNjMjE4YzNk
14
+ ZWY0MjljM2QyYTQ3OTUxMWQzMTk5N2M1MTEzOTI4ZjZhYjE4YmE4MzNjYzYx
15
+ MzVkZjdiYTlkYjgwNWMxNzAzNDQyZDkwMzA1NGM4NzZlMGQ5YjU=
data/HISTORY.md CHANGED
@@ -1,10 +1,38 @@
1
1
  # default - History
2
2
  ## Tags
3
- * [LATEST - 4 Apr, 2016 (6ccb5a59)](#LATEST)
3
+ * [LATEST - 4 Apr, 2016 (b3175863)](#LATEST)
4
+ * [0.1.1 - 4 Apr, 2016 (8203d928)](#0.1.1)
4
5
  * [0.1.0 - 29 Feb, 2016 (4fc88d8c)](#0.1.0)
5
6
 
6
7
  ## Details
7
- ### <a name = "LATEST">LATEST - 4 Apr, 2016 (6ccb5a59)
8
+ ### <a name = "LATEST">LATEST - 4 Apr, 2016 (b3175863)
9
+
10
+ * (GEM) update beaker-pe version to 0.1.2 (b3175863)
11
+
12
+ * Merge pull request #3 from demophoon/fix/master/pe-14934-robust-puppetdb-check (c3bebe59)
13
+
14
+
15
+ ```
16
+ Merge pull request #3 from demophoon/fix/master/pe-14934-robust-puppetdb-check
17
+
18
+ (PE-14934) Add more robust puppetdb check
19
+ ```
20
+ * (PE-14934) Add more robust puppetdb check (7112971a)
21
+
22
+
23
+ ```
24
+ (PE-14934) Add more robust puppetdb check
25
+
26
+ Before this commit we were still failing before the last puppet agent
27
+ run in do_install because we also run puppet agent in some cases before
28
+ the last run. This commit adds in the wait during that agent run as well
29
+ as a check on the status endpoint in puppetdb to be sure that it is
30
+ running in the case that the port is open but puppetdb is not ready for
31
+ requests.
32
+ ```
33
+ ### <a name = "0.1.1">0.1.1 - 4 Apr, 2016 (8203d928)
34
+
35
+ * (HISTORY) update beaker-pe history for gem release 0.1.1 (8203d928)
8
36
 
9
37
  * (GEM) update beaker-pe version to 0.1.1 (6ccb5a59)
10
38
 
@@ -2,6 +2,7 @@
2
2
  require "beaker/dsl/install_utils/#{lib}"
3
3
  end
4
4
  require "beaker-answers"
5
+ require "timeout"
5
6
  module Beaker
6
7
  module DSL
7
8
  module InstallUtils
@@ -443,17 +444,20 @@ module Beaker
443
444
  # Wait for PuppetDB to be totally up and running (post 3.0 version of pe only)
444
445
  sleep_until_puppetdb_started(database) unless pre30database
445
446
 
446
- # Run the agent once to ensure everything is in the dashboard
447
- install_hosts.each do |host|
448
- on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]
449
-
450
- # Workaround for PE-1105 when deploying 3.0.0
451
- # The installer did not respect our database host answers in 3.0.0,
452
- # and would cause puppetdb to be bounced by the agent run. By sleeping
453
- # again here, we ensure that if that bounce happens during an upgrade
454
- # test we won't fail early in the install process.
455
- if host['pe_ver'] == '3.0.0' and host == database
456
- sleep_until_puppetdb_started(database)
447
+ step "First puppet agent run" do
448
+ # Run the agent once to ensure everything is in the dashboard
449
+ install_hosts.each do |host|
450
+ on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]
451
+
452
+ # Workaround for PE-1105 when deploying 3.0.0
453
+ # The installer did not respect our database host answers in 3.0.0,
454
+ # and would cause puppetdb to be bounced by the agent run. By sleeping
455
+ # again here, we ensure that if that bounce happens during an upgrade
456
+ # test we won't fail early in the install process.
457
+ if host == database && ! pre30database
458
+ sleep_until_puppetdb_started(database)
459
+ check_puppetdb_status_endpoint(database)
460
+ end
457
461
  end
458
462
  end
459
463
 
@@ -471,15 +475,18 @@ module Beaker
471
475
  on dashboard, "/opt/puppet/bin/rake -sf /opt/puppet/share/puppet-dashboard/Rakefile #{task} RAILS_ENV=production"
472
476
  end
473
477
 
474
- # Now that all hosts are in the dashbaord, run puppet one more
475
- # time to configure mcollective
476
- install_hosts.each do |host|
477
- on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]
478
- # To work around PE-14318 if we just ran puppet agent on the
479
- # database node we will need to wait until puppetdb is up and
480
- # running before continuing
481
- if host == database
482
- sleep_until_puppetdb_started(database)
478
+ step "Final puppet agent run" do
479
+ # Now that all hosts are in the dashbaord, run puppet one more
480
+ # time to configure mcollective
481
+ install_hosts.each do |host|
482
+ on host, puppet_agent('-t'), :acceptable_exit_codes => [0,2]
483
+ # To work around PE-14318 if we just ran puppet agent on the
484
+ # database node we will need to wait until puppetdb is up and
485
+ # running before continuing
486
+ if host == database && ! pre30database
487
+ sleep_until_puppetdb_started(database)
488
+ check_puppetdb_status_endpoint(database)
489
+ end
483
490
  end
484
491
  end
485
492
  end
@@ -540,6 +547,22 @@ module Beaker
540
547
  install_pe_on(hosts, options)
541
548
  end
542
549
 
550
+ def check_puppetdb_status_endpoint(host)
551
+ if version_is_less(host['pe_ver'], '2016.1.0')
552
+ return true
553
+ end
554
+ Timeout.timeout(60) do
555
+ match = nil
556
+ while not match
557
+ output = on(host, "curl -s http://localhost:8080/pdb/meta/v1/version", :accept_all_exit_codes => true)
558
+ match = output.stdout =~ /version.*\d+\.\d+\.\d+/
559
+ sleep 1
560
+ end
561
+ end
562
+ rescue Timeout::Error
563
+ fail_test "PuppetDB took too long to start"
564
+ end
565
+
543
566
  #Install PE based upon host configuration and options
544
567
  #
545
568
  # @param [Host, Array<Host>] install_hosts One or more hosts to act upon
@@ -3,7 +3,7 @@ module Beaker
3
3
  module PE
4
4
 
5
5
  module Version
6
- STRING = '0.1.1'
6
+ STRING = '0.1.2'
7
7
  end
8
8
 
9
9
  end
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: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppetlabs
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-04-04 00:00:00.000000000 Z
11
+ date: 2016-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec