[one-users] Occi Problem

Bruno Parreira bsendas at gmail.com
Mon Feb 27 06:15:52 PST 2012


yes, I added this lines to the common.erb:

<% if @vm_info.has_elements?('GRAPHICS') %>
        GRAPHICS = [
        <% first = true %>
        <% @vm_info.each('GRAPHICS/*') do |cont| %>
                <% if cont.text %>
                <% if first %>
                        <%= cont.name %> = "<%= cont.text %>"
                        <% first = false %>
                    <% else %>
                        ,<%= cont.name %> = "<%= cont.text %>"
                    <% end %>
                    <% end %>
        <% end %>
        ]
<% end %>
<% if @vnet_info['INFRASTRUCTURE_ID'] !=nil %>
INFRASTRUCTURE_ID = "<%= @vnet_info['INFRASTRUCTURE_ID'] %>"
<% end %>

and I modified the small.erb :

#
#  Virtual Machine Template generated for small instance types. Adjust this
#  by setting the desired capacity (CPU,MEMORY) or adding specific
#  attributes for your cloud (e.g. OS).
#

CPU    = 0.1
MEMORY = 64


A 2012/02/27, às 14:08, Daniel Molina escreveu:

> I cannot reproduce this error. Did you modify the
> occi_templates/common.erb or occi_templates/small.erb files?
> 
> On 27 February 2012 14:21, Bruno Parreira <bsendas at gmail.com> wrote:
>> Hi,
>> 
>> I think it's not showing anything in the oned.log:
>> 
>> oned.log:
>> 
>> Mon Feb 27 15:20:54 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:20:55 2012 [ReM][D]: AclInfo method invoked
>> Mon Feb 27 15:21:24 2012 [ReM][D]: HostPoolInfo method invoked
>> Mon Feb 27 15:21:24 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:21:25 2012 [ReM][D]: AclInfo method invoked
>> Mon Feb 27 15:21:54 2012 [ReM][D]: HostPoolInfo method invoked
>> Mon Feb 27 15:21:54 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:21:54 2012 [ReM][D]: AclInfo method invoked
>> Mon Feb 27 15:22:24 2012 [ReM][D]: HostPoolInfo method invoked
>> Mon Feb 27 15:22:24 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:22:25 2012 [ReM][D]: AclInfo method invoked
>> 
>> and after I sent the command:
>> 
>> Mon Feb 27 15:21:54 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:21:54 2012 [ReM][D]: AclInfo method invoked
>> Mon Feb 27 15:22:24 2012 [ReM][D]: HostPoolInfo method invoked
>> Mon Feb 27 15:22:24 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:22:25 2012 [ReM][D]: AclInfo method invoked
>> Mon Feb 27 15:22:54 2012 [ReM][D]: HostPoolInfo method invoked
>> Mon Feb 27 15:22:54 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:22:55 2012 [ReM][D]: AclInfo method invoked
>> Mon Feb 27 15:23:24 2012 [ReM][D]: HostPoolInfo method invoked
>> Mon Feb 27 15:23:24 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:23:25 2012 [ReM][D]: AclInfo method invoked
>> Mon Feb 27 15:23:47 2012 [InM][I]: Monitoring host leo.cloud.pt (2)
>> Mon Feb 27 15:23:51 2012 [InM][I]: ExitCode: 0
>> Mon Feb 27 15:23:51 2012 [InM][D]: Host 2 successfully monitored.
>> Mon Feb 27 15:23:54 2012 [ReM][D]: HostPoolInfo method invoked
>> Mon Feb 27 15:23:54 2012 [ReM][D]: VirtualMachinePoolInfo method invoked
>> Mon Feb 27 15:23:55 2012 [ReM][D]: AclInfo method invoked
>> 
>> the occi-server.log:
>> 
>> oneadmin at Leo:~$ cat /home/oneadmin/opennebula3/var/occi-server.log
>> --------------------------------------
>>         Server configuration
>> --------------------------------------
>> {:instance_types=>
>>  {:medium=>{:memory=>4096, :cpu=>4, :template=>"medium.erb"},
>>   :large=>{:memory=>8192, :cpu=>8, :template=>"large.erb"},
>>   :small=>{:memory=>1024, :cpu=>1, :template=>"small.erb"}},
>>  :lang=>"en_US",
>>  :server=>"10.0.2.2",
>>  :port=>3000,
>>  :template_location=>"/home/oneadmin/opennebula3//etc/occi_templates",
>>  :token_expiration_delta=>1800,
>>  :auth=>"occi",
>>  :one_xmlrpc=>"http://localhost:2633/RPC2",
>>  :core_auth=>"cipher"}
>> :public is no longer used to avoid overloading Module#public, use :public_folder instead
>>        from /home/oneadmin/opennebula3//lib/ruby/cloud/occi/occi-server.rb:79
>> == Sinatra/1.3.1 has taken the stage on 3000 for development with backup from Thin
>> 10.0.2.2 - - [25/Feb/2012 14:56:08] "POST /compute HTTP/1.1" 500 38 0.0745
>> 10.0.2.2 - - [25/Feb/2012 14:57:10] "POST /network HTTP/1.1" 500 107 0.0675
>> 10.0.2.2 - - [25/Feb/2012 14:58:33] "POST /network HTTP/1.1" 201 189 0.1912
>> 10.0.2.2 - - [25/Feb/2012 14:58:43] "POST /compute HTTP/1.1" 500 38 0.0051
>> 10.0.2.2 - - [25/Feb/2012 15:00:10] "POST /compute HTTP/1.1" 500 38 0.0051
>> 10.0.2.2 - - [25/Feb/2012 15:01:24] "POST /compute HTTP/1.1" 500 38 0.0052
>> 10.0.2.2 - - [25/Feb/2012 15:01:50] "POST /compute HTTP/1.1" 500 38 0.0052
>> 10.0.2.2 - - [25/Feb/2012 15:02:13] "POST /compute HTTP/1.1" 500 38 0.0052
>> 10.0.2.2 - - [25/Feb/2012 15:08:48] "POST /compute HTTP/1.1" 500 38 0.0052
>> 10.0.2.2 - - [25/Feb/2012 15:10:09] "POST /compute HTTP/1.1" 500 38 0.0052
>> 10.0.2.2 - - [27/Feb/2012 15:20:27] "POST /compute HTTP/1.1" 500 38 0.0051
>> 10.0.2.2 - - [27/Feb/2012 15:23:15] "POST /compute HTTP/1.1" 500 38 0.0052
>> 
>> best regards,
>> 
>> 
>> A 2012/02/27, às 12:13, Daniel Molina escreveu:
>> 
>>> Hi Bruno,
>>> 
>>> On 25 February 2012 14:06, Bruno Parreira <bsendas at gmail.com> wrote:
>>>> Hello,
>>>> 
>>>> I've done a fresh install of the open nebula 3.2.1, and it seems to be working just fine since I'm able to create a virtual machine using onevm command.
>>>> 
>>>> The problem is with the occi-server, I can create a vnet with no problems at all using the templates in the opennebula.org but when I try to create compute I get the an error:
>>>> 
>>>> oneadmin at Leo:~$ onevnet list
>>>>  ID USER     GROUP    NAME              TYPE BRIDGE  LEASES
>>>>   0 oneadmin oneadmin vnet                 R      br1          0
>>>>   1 oneadmin oneadmin MyServiceNetwor      R    br1       0
>>>> 
>>>> oneadmin at Leo:~$ oneimage list
>>>>  ID USER     GROUP    NAME            SIZE TYPE          REGTIME PER STAT  RVMS
>>>>   0 oneadmin oneadmin ttylinux         40M   OS   02/25 14:54:10  No  rdy     0
>>>> 
>>>> oneadmin at Leo:~$ cat vm2.xml
>>>> <COMPUTE>
>>>>        <NAME>MyCompute</NAME>
>>>>        <INSTANCE_TYPE>small</INSTANCE_TYPE>
>>>>        <DISK>
>>>>            <STORAGE href="http://www.opennebula.org/storage/0"/>
>>>>        </DISK>
>>>>        <NIC>
>>>>            <NETWORK href="http://www.opennebula.org/network/0"/>
>>>>            <IP>192.168.0.12</IP>
>>>>        </NIC>
>>>>        <CONTEXT>
>>>>            <HOSTNAME>MAINHOST</HOSTNAME>
>>>>            <DATA>DATA1</DATA>
>>>>        </CONTEXT>
>>>>  </COMPUTE>
>>>> 
>>>> oneadmin at Leo:~$ occi-compute --url http://10.0.2.2:3000 --username oneadmin --password oneadmin --debug  create vm2.xml
>>>> /usr/lib/ruby/gems/1.8/gems/curb-0.7.16/lib/curb_core.so: warning: already initialized constant CURL_SSLVERSION_DEFAULT
>>>> undefined method `[]' for nil:NilClass
>>>> 
>>>> any idea on what is wrong?
>>> 
>>> Can you please check if there is any relevant information in the
>>> oned.log and occi-server.log files after sending this request and if
>>> so attach them
>>> 
>>> Cheers
>>> 
>>>> 
>>>> best regards,
>>>> Bruno
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opennebula.org
>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>> 
>>> 
>>> 
>>> --
>>> Daniel Molina
>>> Project Engineer
>>> OpenNebula - The Open Source Solution for Data Center Virtualization
>>> www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula
>> 
> 
> 
> 
> -- 
> Daniel Molina
> Project Engineer
> OpenNebula - The Open Source Solution for Data Center Virtualization
> www.OpenNebula.org | dmolina at opennebula.org | @OpenNebula




More information about the Users mailing list