Please review pull request #121: Handle a machine that is both master *and* agent in git tests. opened by (daniel-pittman)

Description:

The master signs it's own agent certificate implicitly, which was breaking a
test that validated that all agents didn't have a certificate.

This skips over the master, although not the validation that the certificate
works, which keeps things running as expected.

Signed-off-by: Daniel Pittman [email protected]

  • Opened: Tue Jan 24 00:00:44 UTC 2012
  • Based on: puppetlabs:master (99238dd039587bacddafc93aeaec4b551ff54129)
  • Requested merge: daniel-pittman:handle-machine-that-is-master-and-agent (54985a3471861ea4beb950903f63d3eefd0cceef)

Diff follows:

diff --git a/setup/git/03_ValidateSignCert.rb b/setup/git/03_ValidateSignCert.rb
index 11c6cef..b605ee7 100755
--- a/setup/git/03_ValidateSignCert.rb
+++ b/setup/git/03_ValidateSignCert.rb
@@ -2,8 +2,12 @@
 
 step "Master: Start Puppet Master"
 with_master_running_on(master, "--dns_alt_names=\"puppet,$(hostname -s),$(hostname -f)\" --verbose") do
-  step "Agents: Run agent --test first time to gen CSR"
-  on agents, puppet_agent("--test"), :acceptable_exit_codes => [1]
+  hosts.each do |host|
+    next if host['roles'].include? 'master'
+
+    step "Agents: Run agent --test first time to gen CSR"
+    on host, puppet_agent("--test"), :acceptable_exit_codes => [1]
+  end
 
   # Sign all waiting certs
   step "Master: sign all certs"

    

--
You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to