Hello,
I have created a Cloudstack compute resource and I am having some issues
with creating images. Specifically, I have created a class Cloudstack which
is a subclass of ComputeResource. I have successfully created a Cloudstack
compute resource in Foreman through the GUI. For this class the def
capabilities returns a value of ":image". Through Foreman when I click the
"New Image" link I get the following error:
Excon::Errors::SocketError in Images#new
Showing /usr/share/foreman/app/views/images/_form.html.erb where line #8raised:
getaddrinfo: Name or service not known (SocketError)
Extracted source (around line #8):
5: <%= select_f f, :operatingsystem_id, Operatingsystem.all, :id, :to_label %>
6: <%= select_f f, :architecture_id, Architecture.all, :id, :to_label %>
7: <%= text_f f, :username, :value => @image.username || "root", :help_inline => _("The user that is used to ssh into the instance, normally cloud-user, ec2-user, ubuntu, root etc") %>
8: <% image_field(f) %>
9: <%= checkbox_f f, :user_data, :help_inline => _("Does this image support user data input (e.g. via cloud-init)?") %>
10: <% if @compute_resource.provider == 'EC2' %>
11: <%# TODO - Get IAM roles from AWS and display in select drop %>
Trace of template inclusion: app/views/images/new.html.erb
Rails.root: /usr/share/foreman
Application Trace<http://foremanstage1.ops.expertcity.com/compute_resources/16/images/new#>| Framework
Trace<http://foremanstage1.ops.expertcity.com/compute_resources/16/images/new#>| Full
Trace<http://foremanstage1.ops.expertcity.com/compute_resources/16/images/new#>
app/helpers/images_helper.rb:6:in any?' app/helpers/images_helper.rb:6:in
image_field'
app/views/images/_form.html.erb:8:in block in _app_views_images__form_html_erb__2777779080878012596_47635220' app/helpers/layout_helper.rb:218:in
form_for'
app/views/images/_form.html.erb:1:in _app_views_images__form_html_erb__2777779080878012596_47635220' app/views/images/new.html.erb:3:in
_app_views_images_new_html_erb__4269853836933691796_47616260'
app/models/concerns/foreman/thread_session.rb:33:in clear_thread' lib/middleware/catch_json_parse_errors.rb:9:in
call'
When I comment out the line #8 I can successfully render the page so it
leaves me to believe there is an issue with the call to "image_field(f)".
At this point I am confused as to what is going on and why calling that
method would cause a SocketError. Any help would be appreciated!
TIA
Amir