Actions
Bug #2693
closed![Author: Anonymous](/images/anonymous.png?1697023634)
unattended installation without Puppet CA is failing
Status:
Closed
Priority:
High
Assignee:
Category:
Unattended installations
Target version:
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"
Updated by Ohad Levy about 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
Updated by Dominic Cleal about 11 years ago
- Priority changed from Normal to High
Updated by Dominic Cleal about 11 years ago
- Status changed from New to Ready For Testing
- Assignee set to Dominic Cleal
Updated by Anonymous about 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)
Updated by Dominic Cleal about 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset f09d61de451450a566c7ee16bdf35281e98708c4.
Updated by Dominic Cleal almost 11 years ago
- Related to Bug #3541: ec2 provisioning failure in setSSHProvision (when no CA available?) added
Actions