FOG plugin needs some work


(Florian Heigl) #1

I just noticed that the OpenNebula plugin for the fog library (Ruby Cloud abstraction layer) is apparently so undermaintained that it’s not yet been part of a plugin rebuild they’re doing. (all existing cloud connectors become standalone plugins, and need to run on ruby2+.

The OpenNebula plugin seems to not have seen help here, it refers to outdated versions of OpenNebula and Ruby. When I set it up in 2016 (Link List for Lab-ONE (Vagrant)) , it worked just fine (https://www.youtube.com/watch?v=8Pfdgh8vb9w) , and now when I re-checked it has all gone stale and I’m not able to make it work.

IMO it’s a big problem: This is one of the few things that support OpenNebula, and also used in at least some parts Vagrant and Foreman - basically this means OpenNebula lost one of the main interfaces.

Sadly, there is too a lot of ruby stuff involved, and I can’t do anything to fix it.
Maybe someone else can. Can anyone contact the fog people and work with them to get our plugin fully integrated instead of being a stale thing that is at risk of being “forgotten”.

$ vagrant plugin list
opennebula-provider (1.1.2)
$ vagrant up
/Users/floh/.vagrant.d/gems/2.4.3/gems/fog-core-1.45.0/lib/fog/core/services_mixin.rb:18:in rescue in new': opennebula has no compute service (Fog::Service::NotFound) from /Users/floh/.vagrant.d/gems/2.4.3/gems/fog-core-1.45.0/lib/fog/core/services_mixin.rb:7:innew’
from /Users/floh/.vagrant.d/gems/2.4.3/gems/fog-core-1.45.0/lib/fog/compute.rb:54:in new' from /Users/floh/.vagrant.d/gems/2.4.3/gems/opennebula-provider-1.1.2/lib/opennebula-provider/helpers/fog.rb:26:inconnect’
from /Users/floh/.vagrant.d/gems/2.4.3/gems/opennebula-provider-1.1.2/lib/opennebula-provider/driver.rb:21:in `connect’

Here’s the list of providers:

$ fog 2>&1 | grep -i opennebula
$

(The code is still there:


but the plugin isn’t even being loaded… it would be good if someone does whatever is needed to make it look like this:

$ fog 2>&1 | grep -i openstack
:openstack_api_key:
:openstack_username:
:openstack_auth_url:
:openstack_tenant:
:openstack_region:

Basically, this needs some love before the ecosys rots away.
Would be cool if anyone can help.


(Daniel Clavijo Coca) #2

Hello, could you tell me what OpenNebula version you were running? I’m going to do some work on the fog plugin.


(Daniel Clavijo Coca) #3

You might want to give a try to this https://github.com/b0e/fog-one. This is the plugin rework initial work you said was needed

(all existing cloud connectors become standalone plugins, and need to run on ruby2+.

It says runs in OpenNebula 4.12.x and should work on greater versions, and needs ruby 2.


(Florian Heigl) #4

Hey,

I think my last test was on 5.4, it worked well in 4.x/5.x but that is logical since the changes that broke it were in FOG upstream (and vagrant).
I won’t have time to test anything at the moment.

I think even if the forked rework is working we are not “safe” until it is fully upstreamed and visible LIKE ALL OTHER MAJOR fog plugins.


(Daniel Clavijo Coca) #5

I’ll try my best effort in there to rework the plugin and push into upstream. Though I still need some ruby practice.


(Daniel Clavijo Coca) #6

Hey check this OpenNebula officially supports fog ruby gem


(Stas Fomin) #7

Hello, can anyone easy fix https://github.com/eucher/opennebula-provider for supporting ONE5.5?


(Daniel Clavijo Coca) #8

You can try to modify https://github.com/eucher/opennebula-provider/blob/master/opennebula-provider.gemspec

This is the file that requires the needed gems. These two lines point to an old OpenNebula gem version and an old fog version. You can try to modify this with the latest OpenNebula, fog-core and fog-opennebula gems.

spec.add_runtime_dependency     'opennebula', '~> 4.14'
spec.add_runtime_dependency     'fog', '~> 1.38', '>= 1.38.0'

(Florian Heigl) #9

thanks for your work getting closer of reviving this. unable to tell if it’s possible to use again with the opennebula-provider or not.

I tried testing, but it seems the only viable approach is to put my laptop on fire and buy a new one so i’ll not have multiple sets of ruby gems and fog components installed.


(Daniel Clavijo Coca) #10

I haven’t tried vagrant, just fog. I also had a lot of pain regarding gems and fog separate providers requiring different versions of fog-core. You can always spawn a clean VM or container and try it there.