Bug #2693
closed
unattended installation without Puppet CA is failing
Added by Anonymous over 11 years ago.
Updated over 11 years ago.
Category:
Unattended installations
|
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"
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
- Target version deleted (
1.2.0)
- Target version set to 1.2.1
- Priority changed from Normal to High
- Status changed from New to Ready For Testing
- Assignee set to Dominic Cleal
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)
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
- Related to Bug #3541: ec2 provisioning failure in setSSHProvision (when no CA available?) added
Also available in: Atom
PDF