Project

General

Profile

Actions

Bug #2693

closed

unattended installation without Puppet CA is failing

Added by Anonymous almost 11 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Unattended installations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

Unattended installations work very well in my environment... Today a collegue forgot to select the Puppet master and Puppet CA while provivisoning a new host.

While I could preview /unattended/provision?spoof=<ip> without problems, the client came across an internal server error:

Started GET "/unattended/provision?token=1771b184-6c0c-4789-8fc3-ee2b6f77495c" for 1.2.3.4 at Fri Jun 21 20:32:17 +0200 2013
Processing by UnattendedController#provision as HTML
  Parameters: {"token"=>"1771b184-6c0c-4789-8fc3-ee2b6f77495c"}
Found nasign.test.1234.de
  Rendered text template (0.0ms)
Filter chain halted as :handle_ca rendered or redirected
Completed 500 Internal Server Error in 8ms (Views: 0.5ms | ActiveRecord: 0.7ms)

Dominic said: "Sounds like an issue relating to when they were made optional"


Related issues 1 (0 open1 closed)

Related to Foreman - Bug #3541: ec2 provisioning failure in setSSHProvision (when no CA available?)ClosedIvan Necas10/29/2013Actions
Actions #1

Updated by Ohad Levy almost 11 years ago

looking at the code, the only way it would not raise that error would be if you set manage_puppetca setting to false.

a simple solution could be:


diff --git a/app/models/host/managed.rb b/app/models/host/managed.rb
index cb3d468..8950920 100644
--- a/app/models/host/managed.rb
+++ b/app/models/host/managed.rb
@@ -223,9 +223,8 @@ class Host::Managed < Host::Base
   def handle_ca
     return true if Rails.env == "test" 
     return true unless Setting[:manage_puppetca]
-    if puppetca?
-      respond_to?(:initialize_puppetca,true) && initialize_puppetca && delCertificate && setAutosign
-    end
+    return true unless puppetca?
+    respond_to?(:initialize_puppetca,true) && initialize_puppetca && delCertificate && setAutosign
   end

Actions #2

Updated by Dominic Cleal almost 11 years ago

  • Target version deleted (1.2.0)
Actions #3

Updated by Dominic Cleal almost 11 years ago

  • Target version set to 1.2.1
Actions #4

Updated by Dominic Cleal almost 11 years ago

  • Priority changed from Normal to High
Actions #5

Updated by Dominic Cleal almost 11 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal
Actions #6

Updated by Anonymous almost 11 years ago

The patch seems to help:

Started GET "/unattended/provision?token=401a421e-6c98-4af9-bf35-e8d8cb292c0c" for x.x.x.x at Mon Jul 22 17:29:44 +0200 2013
Processing by UnattendedController#provision as */*
  Parameters: {"token"=>"401a421e-6c98-4af9-bf35-e8d8cb292c0c"}
Found catest.test.xxx.de
  Rendered inline template (30.9ms)
Completed 200 OK in 73ms (Views: 31.3ms | ActiveRecord: 4.4ms)

Actions #7

Updated by Dominic Cleal almost 11 years ago

Thanks for testing!

Actions #8

Updated by Dominic Cleal almost 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions #9

Updated by Dominic Cleal over 10 years ago

  • Related to Bug #3541: ec2 provisioning failure in setSSHProvision (when no CA available?) added
Actions

Also available in: Atom PDF