[one-users] OCCI Server 0.3

João Soares joaosoares at ua.pt
Fri Aug 26 02:20:01 PDT 2011


Hi again,

 

Some comments/questions:

·         Does v0.3 allows setting a specific bridge for a VNET? I have tried to set it (e.g. occi.network.bridge=br0) but it doesn’t allow (W, [2011-08-26T10:57:12.911158 #2441]  WARN -- : line 1:148 mismatched input "1occi.network.bridge" expecting set nil), it always puts by default virbr0.

·         Are VM actions such as “stop” and “start” working?

 

Thanks. Cheers,

João

 

From: users-bounces at lists.opennebula.org [mailto:users-bounces at lists.opennebula.org] On Behalf Of João Soares
Sent: quinta-feira, 25 de Agosto de 2011 12:12
To: florian.feldhaus at tu-dortmund.de
Cc: users at lists.opennebula.org
Subject: Re: [one-users] OCCI Server 0.3

 

It seems that now it is working just fine. I can GET my images and network at least. Going for further tests now J

Appreciate a lot the help Florian.

 

(Note: adding the line didn’t work out, I had to delete the template that I had)

 

Cheers,

João

 

 

From: florian.feldhaus at tu-dortmund.de [mailto:florian.feldhaus at tu-dortmund.de] 
Sent: quinta-feira, 25 de Agosto de 2011 11:29
To: joaosoares at ua.pt
Cc: users at lists.opennebula.org
Subject: Re: [one-users] OCCI Server 0.3

 

You're getting closer :-)

 

The problem seems to be, that you have templates defined in your OpenNebula, but the OCCI server seems to have a bug when creating OCCI templates from them. I couldn't test the fix right now, but you may try out the following:

edit lib/occi/backend/OpenNebulaBackend.rb

add the following line at the end of require statements (e.g. after line 30):

require 'occi/infrastructure/ResourceTemplate'

 

If it is working, then everything is fine. Otherwise you may try to delete all templates in your OpenNebula installation and see if it works then. Only do this, if it is a test installation without any important VMs or services running.

 

Regarding the error with /usr/lib/one/ruby/cloud/occi/occi-server.rb you shouldn't run bin/occi-server server anymore. That's the old occi server included in OpenNebula, but it is outdated and cannot be run alongside the OGF OCCI server. In the first versions (0.1 and 0.2) of OGF OCCI I replaced that file with a new one, but for several reasons, it is a better idea to keep the OCCI code and the OpenNebula 3.0 code separate – at least until both are released in a stable version.

 

Cheers,

Florian

 

Von: João Soares <joaosoares at ua.pt>
Datum: Thu, 25 Aug 2011 11:12:27 +0100
An: Florian Feldhaus <florian.feldhaus at tu-dortmund.de>
Cc: <users at lists.opennebula.org>
Betreff: RE: [one-users] OCCI Server 0.3

 

You are right, by changing the name it solved this problem…but I still get other problems.

Now when I start passenger it shows a list of all my Opennebula objects, i.e., VM, Storage, Image, etc… but an error appear after. Bellow I send you the final part of passenger’s output:

 

…………………………………

…………………………………

D, [2011-08-25T11:58:49.600504 #1269] DEBUG -- : Compute template pool info:

D, [2011-08-25T11:58:49.600893 #1269] DEBUG -- : ONE compute object: #<OpenNebula::Template:0xb697b484>

D, [2011-08-25T11:58:49.603581 #1269] DEBUG -- : ONE compute object: ---

VMTEMPLATE_POOL:

  VMTEMPLATE:

    PUBLIC: "0"

    NAME: template

    GID: "0"

    TEMPLATE:

      TEMPLATE_ID: "5"

      FEATURES:

        ACPI: "no"

      RANK: FREECPU

      MEMORY: "64"

      NAME: template

      DISK:

      - IMAGE_ID: "1"

      - SIZE: "128"

        TYPE: swap

      REQUIREMENTS: CPUSPEED > 190

      NIC:

      - NETWORK_ID: "6"

      - NETWORK_ID: "0"

      CPU: "0.1"

    UNAME: oneadmin

    REGTIME: "1314194116"

    UID: "0"

    ID: "5"

    GNAME: oneadmin

D, [2011-08-25T11:58:49.604068 #1269] DEBUG -- : NOVNC path: public/novnc

D, [2011-08-25T11:58:49.604161 #1269] DEBUG -- : Graphics type:

D, [2011-08-25T11:58:49.604206 #1269] DEBUG -- : VNC base port: 0

D, [2011-08-25T11:58:49.604295 #1269] DEBUG -- : VNC port:

D, [2011-08-25T11:58:49.604384 #1269] DEBUG -- : VNC host:

[ pid=1225 thr=-608321318 file=utils.rb:176 time=2011-08-25 11:58:49.605 ]: *** Exception NameError in PhusionPassenger::Rack::ApplicationSpawner (uninitialized constant OCCI::Infrastructure::ResourceTemplate) (process 1225, thread #<Thread:0xb77b81b4>):

        from ./lib/occi/backend/OpenNebulaBackend.rb:172

        from ./lib/opennebula/XMLUtils.rb:317:in `call'

        from ./lib/opennebula/XMLUtils.rb:317:in `each_element'

        from /var/lib/gems/1.8/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:239:in `each'

        from /var/lib/gems/1.8/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:238:in `upto'

        from /var/lib/gems/1.8/gems/nokogiri-1.5.0/lib/nokogiri/xml/node_set.rb:238:in `each'

        from ./lib/opennebula/XMLUtils.rb:315:in `each_element'

        from ./lib/opennebula/Pool.rb:100:in `each'

        from ./lib/occi/backend/OpenNebulaBackend.rb:169:in `compute_get_all_objects'

        from ./lib/occi/backend/OpenNebulaBackend.rb:164:in `compute_get_all_templates'

        from ./lib/occi/backend/OpenNebulaBackend.rb:57:in `initialize'

        from ./lib/occi/occi-server.rb:125:in `new'

        from ./lib/occi/occi-server.rb:125

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'

        from config.ru:4

        from /var/lib/gems/1.8/gems/rack-1.3.2/lib/rack/builder.rb:51:in `instance_eval'

        from /var/lib/gems/1.8/gems/rack-1.3.2/lib/rack/builder.rb:51:in `initialize'

        from config.ru:1:in `new'

        from config.ru:1

 

I also added the one_auth file to /ogf-occi/etc/ so that the server started…however, the error is still the same “Error executing /usr/lib/one/ruby/cloud/occi/occi-server.rb.” but what appears in the log is different:

 

cat /var/log/one/occi-server.log

 

/usr/lib/one/ruby/cloud/CloudServer.rb:113:in `initialize': getaddrinfo: Name or service not known (SocketError)

        from /usr/lib/one/ruby/cloud/CloudServer.rb:113:in `new'

        from /usr/lib/one/ruby/cloud/CloudServer.rb:113:in `is_port_open?'

        from /usr/lib/ruby/1.8/timeout.rb:62:in `timeout'

        from /usr/lib/one/ruby/cloud/CloudServer.rb:111:in `is_port_open?'

        from /usr/lib/one/ruby/cloud/occi/occi-server.rb:59

 

Cheers,

João

 

From: florian.feldhaus at tu-dortmund.de [mailto:florian.feldhaus at tu-dortmund.de] 
Sent: quinta-feira, 25 de Agosto de 2011 10:49
To: joaosoares at ua.pt
Cc: users at lists.opennebula.org
Subject: Re: [one-users] OCCI Server 0.3

 

Ah, this is a problem between ruby and some operating systems. Some OS are case sensitive for ruby requires and others aren't. Unfortunately, I seem to have packaged the v0.3 packages with an OpenNebula folder containing uppercase letters. This is probably the cause of your problem. Please rename the folder lib/OpenNebula to lib/opennebula and tell me if this solved your problem. 

 

Cheers,

Florian

 

Von: João Soares <joaosoares at ua.pt>
Datum: Thu, 25 Aug 2011 10:25:08 +0100
An: Florian Feldhaus <florian.feldhaus at tu-dortmund.de>
Cc: <users at lists.opennebula.org>
Betreff: RE: [one-users] OCCI Server 0.3

 

Hi,

 

Thanks. Indeed, starting passenger in the OGF OCCI folder solves that problem but another one comes up:

 

      You can stop Phusion Passenger Standalone by pressing Ctrl-C.

===============================================================================

D, [2011-08-25T11:19:04.125166 #31675] DEBUG -- : Configuration file contains the following parameters:

D, [2011-08-25T11:19:04.125270 #31675] DEBUG -- : {"BACKEND"=>"opennebula", "ONE_PASSWORD"=>"cc", "PORT"=>"3000", "TEMPLATE_LOCATION"=>"etc/occi_one_templates/", "ONE_XMLRPC"=>"http://localhost:2633/RPC2", "SERVER"=>"http://moon.cloud.pt/", "ONE_USER"=>"oneadmin", "LOG_LEVEL"=>"debug", "NOVNC_PATH"=>"public/novnc", "VNC_PROXY_BASE_PORT"=>"0", "ONE_IMAGE_TMP_DIR"=>"/tmp"}

D, [2011-08-25T11:19:04.125351 #31675] DEBUG -- : Mandatory parameter backend included in configuration file.

D, [2011-08-25T11:19:04.125397 #31675] DEBUG -- : Mandatory parameter server included in configuration file.

D, [2011-08-25T11:19:04.125440 #31675] DEBUG -- : Mandatory parameter port included in configuration file.

D, [2011-08-25T11:19:04.125480 #31675] DEBUG -- : All mandatory parameters are provided in config file

[ pid=31631 thr=-607706918 file=utils.rb:176 time=2011-08-25 11:19:04.133 ]: *** Exception LoadError in PhusionPassenger::Rack::ApplicationSpawner (no such file to load -- opennebula/OpenNebula) (process 31631, thread #<Thread:0xb78e41b4>):

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'

        from ./lib/occi/backend/OpenNebulaBackend.rb:24

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'

        from ./lib/occi/occi-server.rb:124

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'

        from /usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'

        from config.ru:4

        from /var/lib/gems/1.8/gems/rack-1.3.2/lib/rack/builder.rb:51:in `instance_eval'

        from /var/lib/gems/1.8/gems/rack-1.3.2/lib/rack/builder.rb:51:in `initialize'

        from config.ru:1:in `new'

        from config.ru:1

 

 

And also when starting OCCI-SERVER the same error appears:

      oneadmin at moon:~/ogf-occi$ ./bin/occi-server start

Error executing /usr/lib/one/ruby/cloud/occi/occi-server.rb.

 

Cheers,

João

 

 

 

-----Original Message-----
From: users-bounces at lists.opennebula.org [mailto:users-bounces at lists.opennebula.org] On Behalf Of florian.feldhaus at tu-dortmund.de
Sent: quarta-feira, 24 de Agosto de 2011 19:16
To: joao-m-soares at ptinovacao.pt
Cc: users at lists.opennebula.org
Subject: Re: [one-users] OCCI Server 0.3

 

Hi,

 

it looks like you successfully installed passenger. You should issue the

passenger command within the OGF OCCI folder. If you just start passenger,

it does not know, which files to serve and thus the error.

 

Please follow these steps (from the OGF OCCI Wiki):

3.) Download ogf-occi-0.3_beta2.tar.bz2 or ogf-occi-0.3_beta2.zip from

http://dev.opennebula.org/projects/ogf-occi/files

4.) Untar / unzip the file

 

5.) Change to the folder ogf-occi

6.) Change the configuration in etc/occi-server.conf

7.) Run the OCCI server with

passenger start

 

Cheers,

Florian

 

> I have been trying to install OGF OCCI v0.3, however I am also facing

>some problems.

> First the Passenger installationŠ

> 

> I did:

> -          gem install passenger

> -          ./var/lib/gems/1.8/gems/passenger-3.0.8/bin/passenger start

> o   Passenger starts but:

> =============== Phusion Passenger Standalone web server started

>===============

> PID file: /var/lib/gems/1.8/gems/passenger-3.0.8/bin/passenger.3000.pid

> Log file: /var/lib/gems/1.8/gems/passenger-3.0.8/bin/passenger.3000.log

> Environment: development

> Accessible via: http://0.0.0.0:3000/

> 

> You can stop Phusion Passenger Standalone by pressing Ctrl-C.

> 

>==========================================================================

>=====

> 2011/08/24 17:38:33 [error] 369#0: *4

>"/var/lib/gems/1.8/gems/passenger-3.0.8/bin/public/index.html" is

>                                                                    : No

>such file or directory), client: 127.0.0.1, server: _, request: "HEAD /

>HTTP/1.1", host: "0.0.0.0"

> 

> -          /var/lib/one/ogf-occi/bin/occi-server start

> o   And:

> Error executing /usr/lib/one/ruby/cloud/occi/occi-server.rb.

> 

> Any suggestion?

> 

> Cheers,

> João Soares

 

_______________________________________________

Users mailing list

Users at lists.opennebula.org

http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opennebula.org/pipermail/users-opennebula.org/attachments/20110826/317b226a/attachment-0003.htm>


More information about the Users mailing list