I have recently modified Foreman to create a new compute resource for
Cloudstack. I have created a class Cloudstack which is a subclass of
ComputeResource. I have added this class to Foreman, made the
configurations and U/I changes and can now add this compute resource to
Foreman. The problem I run into is when I am trying to create a new image
for this compute resource. The class Cloudstack has a method "def
capabilities" which returns an array with "[:image]" as the value. When I
click on the "new image" link for this compute resource I get a SocketError
as stated below. When I comment out the "image_field(f)" code on line 8 I
am able to successfully render the page. This leads me to believe there is
something funny going on with the call to render images. I'm stuck as to
why this could cause a problem. I've configured the Cloudstack class to
return a correctly configured "Fog" object for the method "def client" so I
know my configuration is correct.
Can you provide a full stack trace? I saw the one you posted on
foreman-users, but it's incomplete. If you drop to debug mode then it
should give you a stack trace including the inner methods:
···
On 01/04/14 00:21, Brian Galura wrote:
> Hello,
>
> I have recently modified Foreman to create a new compute resource for
> Cloudstack. I have created a class Cloudstack which is a subclass of
> ComputeResource. I have added this class to Foreman, made the
> configurations and U/I changes and can now add this compute resource to
> Foreman. The problem I run into is when I am trying to create a new
> image for this compute resource. The class Cloudstack has a method "def
> capabilities" which returns an array with "[:image]" as the value. When
> I click on the "new image" link for this compute resource I get a
> SocketError as stated below. When I comment out the "image_field(f)"
> code on line 8 I am able to successfully render the page. This leads me
> to believe there is something funny going on with the call to render
> images. I'm stuck as to why this could cause a problem. I've configured
> the Cloudstack class to return a correctly configured "Fog" object for
> the method "def client" so I know my configuration is correct.
>
> Any help is appreciated!
Let me know what other code would be helpful to look at.
Thx
Amir
···
On Monday, March 31, 2014 4:21:45 PM UTC-7, Brian Galura wrote:
>
> Hello,
>
> I have recently modified Foreman to create a new compute resource for
> Cloudstack. I have created a class Cloudstack which is a subclass of
> ComputeResource. I have added this class to Foreman, made the
> configurations and U/I changes and can now add this compute resource to
> Foreman. The problem I run into is when I am trying to create a new image
> for this compute resource. The class Cloudstack has a method "def
> capabilities" which returns an array with "[:image]" as the value. When I
> click on the "new image" link for this compute resource I get a SocketError
> as stated below. When I comment out the "image_field(f)" code on line 8 I
> am able to successfully render the page. This leads me to believe there is
> something funny going on with the call to render images. I'm stuck as to
> why this could cause a problem. I've configured the Cloudstack class to
> return a correctly configured "Fog" object for the method "def client" so I
> know my configuration is correct.
>
> Any help is appreciated!
>
>
···
On Tuesday, April 1, 2014 12:40:29 AM UTC-7, Dominic Cleal wrote:
>
> On 01/04/14 00:21, Brian Galura wrote:
> > Hello,
> >
> > I have recently modified Foreman to create a new compute resource for
> > Cloudstack. I have created a class Cloudstack which is a subclass of
> > ComputeResource. I have added this class to Foreman, made the
> > configurations and U/I changes and can now add this compute resource to
> > Foreman. The problem I run into is when I am trying to create a new
> > image for this compute resource. The class Cloudstack has a method "def
> > capabilities" which returns an array with "[:image]" as the value. When
> > I click on the "new image" link for this compute resource I get a
> > SocketError as stated below. When I comment out the "image_field(f)"
> > code on line 8 I am able to successfully render the page. This leads me
> > to believe there is something funny going on with the call to render
> > images. I'm stuck as to why this could cause a problem. I've configured
> > the Cloudstack class to return a correctly configured "Fog" object for
> > the method "def client" so I know my configuration is correct.
> >
> > Any help is appreciated!
>
> Can you provide a full stack trace? I saw the one you posted on
> foreman-users, but it's incomplete. If you drop to debug mode then it
> should give you a stack trace including the inner methods:
>
>
> http://projects.theforeman.org/projects/foreman/wiki/Troubleshooting#How-do-I-enable-debugging
>
> Are you also able to point to your code?
>
> Cheers,
>
> --
> Dominic Cleal
> Red Hat Engineering
>
Thanks for the pastebins. From some testing and reading fog code, the
only thing I can see is that your :cloudstack_host might not be right.
I don't see any issues with the .images call itself.
Note that the :cloudstack_host isn't actually a URL, which was my
concern reading the pastebin (you say <host url>). It's only a
hostname, otherwise it tries to resolve a hostname called
"http://example.com" which will fail.
Note that the URL path should probably be /client/api according to the
Fog source.
Regards,
···
--
Dominic Cleal
Red Hat Engineering
On 01/04/14 22:36, amirinator1 wrote:
> Dominic,
>
> I am working with Brian on this. Here is the code for the Cloudstack class.
>
>
> http://pastie.org/8986991
>
>
> Let me know what other code would be helpful to look at.
>
> Thx
>
> Amir
>
>
>
> On Monday, March 31, 2014 4:21:45 PM UTC-7, Brian Galura wrote:
>
> Hello,
>
> I have recently modified Foreman to create a new compute resource
> for Cloudstack. I have created a class Cloudstack which is a
> subclass of ComputeResource. I have added this class to Foreman,
> made the configurations and U/I changes and can now add this compute
> resource to Foreman. The problem I run into is when I am trying to
> create a new image for this compute resource. The class Cloudstack
> has a method "def capabilities" which returns an array with
> "[:image]" as the value. When I click on the "new image" link for
> this compute resource I get a SocketError as stated below. When I
> comment out the "image_field(f)" code on line 8 I am able to
> successfully render the page. This leads me to believe there is
> something funny going on with the call to render images. I'm stuck
> as to why this could cause a problem. I've configured the Cloudstack
> class to return a correctly configured "Fog" object for the method
> "def client" so I know my configuration is correct.
>
> Any help is appreciated!
>
> --
> You received this message because you are subscribed to the Google
> Groups "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to foreman-dev+unsubscribe@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
Thanks, seems I should have thought of that. We will be working more on it
this week.
···
On Wednesday, April 2, 2014 1:09:35 AM UTC-7, Dominic Cleal wrote:
>
> Thanks for the pastebins. From some testing and reading fog code, the
> only thing I can see is that your :cloudstack_host might not be right.
> I don't see any issues with the .images call itself.
>
> Note that the :cloudstack_host isn't actually a URL, which was my
> concern reading the pastebin (you say ). It's only a
> hostname, otherwise it tries to resolve a hostname called
> "http://example.com" which will fail.
>
> http://pastie.org/8986991#12-44,100
>
> If you're using the URL from the compute resource form, then you'll need
> to parse it and supply the components to Fog, e.g.
>
> def client
> parsed = URI.parse(url)
> @client = Fog::Compute.new(
> :provider => 'cloudstack',
> :cloudstack_api_key => '',
> :cloudstack_secret_access_key => ''
> :cloudstack_host => parsed.host,
> :cloudstack_scheme => parsed.scheme,
> :cloudstack_port => parsed.port,
> :cloudstack_path => parsed.path,
> )
> end
>
> Note that the URL path should probably be /client/api according to the
> Fog source.
>
> Regards,
>
> --
> Dominic Cleal
> Red Hat Engineering
> On 01/04/14 22:36, amirinator1 wrote:
> > Dominic,
> >
> > I am working with Brian on this. Here is the code for the Cloudstack
> class.
> >
> >
> > http://pastie.org/8986991
> >
> >
> > Let me know what other code would be helpful to look at.
> >
> > Thx
> >
> > Amir
> >
> >
> >
> > On Monday, March 31, 2014 4:21:45 PM UTC-7, Brian Galura wrote:
> >
> > Hello,
> >
> > I have recently modified Foreman to create a new compute resource
> > for Cloudstack. I have created a class Cloudstack which is a
> > subclass of ComputeResource. I have added this class to Foreman,
> > made the configurations and U/I changes and can now add this compute
> > resource to Foreman. The problem I run into is when I am trying to
> > create a new image for this compute resource. The class Cloudstack
> > has a method "def capabilities" which returns an array with
> > "[:image]" as the value. When I click on the "new image" link for
> > this compute resource I get a SocketError as stated below. When I
> > comment out the "image_field(f)" code on line 8 I am able to
> > successfully render the page. This leads me to believe there is
> > something funny going on with the call to render images. I'm stuck
> > as to why this could cause a problem. I've configured the Cloudstack
> > class to return a correctly configured "Fog" object for the method
> > "def client" so I know my configuration is correct.
> >
> > Any help is appreciated!
> >
>
>
>
did you guys get any further with the Cloudstack Integration in Foreman ?
We would be very much interested in checking the code, is it on github
somewhere ?
did you guys get any further with the Cloudstack Integration in Foreman ?
We would be very much interested in checking the code, is it on github
somewhere ?
···
Am Mittwoch, 1. Oktober 2014 16:03:06 UTC+2 schrieb Brian Galura:
>
> $ cat /etc/foreman/settings.yaml|grep cloudstack
>
> :cloudstack: true
>
>
> I have no idea why this is needed. PRs are welcome.
>
> On Wed, Oct 1, 2014 at 4:01 PM, Rene Camu <camu...@gmail.com > > wrote:
>
>> Hi Brian,
>>
>> we are having the following problems after installing the
>> foreman_cloudstack
>>
>> uninitialized constant ForemanCloudstack::Cloudstack (NameError)
>> /usr/share/foreman/vendor/ruby/1.9.1/bundler/gems/foreman-cloudstack-b7ea4b17797e/lib/foreman_cloudstack/engine.rb:21:in `block (2 levels) in '
>> /usr/share/foreman/app/services/foreman/plugin.rb:61:in `instance_eval'
>> /usr/share/foreman/app/services/foreman/plugin.rb:61:in `register'
>> /usr/share/foreman/vendor/ruby/1.9.1/bundler/gems/foreman-cloudstack-b7ea4b17797e/lib/foreman_cloudstack/engine.rb:18:in `block in '
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `instance_exec'
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/initializable.rb:30:in `run'
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/initializable.rb:55:in `block in run_initializers'
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `each'
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/initializable.rb:54:in `run_initializers'
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/application.rb:136:in `initialize!'
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/railties-3.2.18/lib/rails/railtie/configurable.rb:30:in `method_missing'
>> /usr/share/foreman/config/environment.rb:5:in `'
>> config.ru:3:in `require'
>> config.ru:3:in `block in '
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `instance_eval'
>> /usr/share/foreman/vendor/ruby/1.9.1/gems/rack-1.4.5/lib/rack/builder.rb:51:in `initialize'
>> config.ru:1:in `new'
>> config.ru:1:in `'
>> /usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `eval'
>> /usr/share/passenger/helper-scripts/rack-preloader.rb:112:in `preload_app'
>> /usr/share/passenger/helper-scripts/rack-preloader.rb:158:in `'
>> /usr/share/passenger/helper-scripts/rack-preloader.rb:29:in `'
>> /usr/share/passenger/helper-scripts/rack-preloader.rb:28:in `'
>>
>>
>> The following packages are installed:
>> foreman
>> foreman-compute
>> foreman-fog
>> foreman-libvirt
>> foreman-mysql
>> foreman-mysql2
>> foreman-proxy
>> foreman-vmware
>> ruby-foreman-api
>> ruby-foreman-column-view
>> ruby-foreman-deface
>> ruby-foreman-discovery
>> ruby-foreman-setup
>> ruby-foreman-templates
>> ruby-foreman-xen
>>
>>
>> Any ideas?
>>
>> Cheers René
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "foreman-dev" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/foreman-dev/gEsHUByYYok/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to
>> foreman-dev...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
The following packages are installed:
foreman
foreman-compute
foreman-fog
foreman-libvirt
foreman-mysql
foreman-mysql2
foreman-proxy
foreman-vmware
ruby-foreman-api
ruby-foreman-column-view
ruby-foreman-deface
ruby-foreman-discovery
ruby-foreman-setup
ruby-foreman-templates
ruby-foreman-xen
Any ideas?
Cheers René
–
You received this message because you are subscribed to a topic in the
Google Groups “foreman-dev” group.
To unsubscribe from this topic, visit https://groups.google.com/d/
topic/foreman-dev/gEsHUByYYok/unsubscribe.
To unsubscribe from this group and all its topics, send an email to foreman-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
The value of vagrant is that its reproducible. I have tested foreman 1.5.2
using RHEL6 and it was installed from rpms. I dont know the nuances of
various versions and OSes.
The stack trace you pasted looks familiar but it also seems you installed
as a gem? I know that wont work for a variety of reasons. Ill update the
readme to remove that instruction. Its more of a goal that it would work
that way eventually than the reality today.
···
On Wed, Oct 1, 2014 at 4:17 PM, Rene Camu wrote:
No, this is a normal setup. No virtualbox and Vagrantfile
I did an update of the bundle and gem directly from the installed
foreman-cloudstack directory. Also cleaned up the gem. The stack trace
problem is solved now.
Now a new issue. Within the menu "new compute service" there is no
provider for cloudstack. Do you have an idea?
For me that was fixed with the change to settings.yml in my previous
message.
···
On Monday, October 6, 2014, Rene Camu wrote:
Hi,
I did an update of the bundle and gem directly from the installed
foreman-cloudstack directory. Also cleaned up the gem. The stack trace
problem is solved now.
Now a new issue. Within the menu “new compute service” there is no
provider for cloudstack. Do you have an idea?