[one-users] OCCI: parsing bug, unsupported character?

Marco Strutz marco.strutz at desy.de
Tue Aug 9 03:11:46 PDT 2011


Hello Daniel.

I had a software-package-update a few days before. Reproducing the same
behaviour fails - I guess testing it against the newest version from the
git repository wont help since the error/behaviour of my system changed?
Unfortunately, I don't know exactly which packages have been updated. At
least the timeout and 100%-cpu load are gone. 'occi-compute create ...'
will run the VM in the most cases, otherwise a ruby-error message will
be shown.
For the time being that's fine for me. I was able to implement a
workaround in my components for the "%"-syntax  so I can use the
occi-interface again.


thanks for your help anyway!
--Marco



On 08/08/2011 05:48 PM, Daniel Molina wrote:
> Hi Marco,
>
> I tried to reproduce the error with no luck. The VM is created without
> any problem.
>
> Would you mind to send us the content of the occi-server.log and the
> list of gems you are using?
> Also, can you check if a new VM is created in OpenNebula, even if
> there is no response?
>
> I have made some changes to the occi-server today, try using this last
> version from the git repository.
>
> Regards
>
> On 27 July 2011 17:10, Marco Strutz <marco.strutz at desy.de> wrote:
>> Hello Javier.
>>
>> occi.xml
>> *********
>>
>> <COMPUTE>
>>  <NAME>SL5.5_i368_7745cf64f0f3f8080e15d93f29efe53a</NAME>
>>  <DISK>
>>    <STORAGE href="http://localhost:4567/storage/3"/>
>>    <TARGET>hda</TARGET>
>>  </DISK>
>>  <INSTANCE_TYPE>small</INSTANCE_TYPE>
>>  <NIC>
>>    <NETWORK href="http://localhost:4567/network/0" />
>>  </NIC>
>>  <CONTEXT>
>>    <HOSTNAME>test</HOSTNAME>
>>    <TARGET>hdc</TARGET>
>>    <UUID>7745cf64f0f3f8080e15d93f29efe53a</UUID>
>>    <PACKAGE_NAME>%(PACKAGE_NAME)s</PACKAGE_NAME>
>>  </CONTEXT>
>> </COMPUTE>
>>
>>
>> As soon as I remove the "%" inside the <PACKAGE_NAME> attribute
>> 'occi-compute create occi.xml' works again.
>>
>> #after 10seconds waiting --> ctrl+c to abort
>> $ occi-compute create occi.xml
>> ^C/usr/lib/ruby/1.8/net/protocol.rb:135:in `sysread': Interrupt
>>    from /usr/lib/ruby/1.8/net/protocol.rb:135:in `rbuf_fill'
>>    from /usr/lib/ruby/1.8/timeout.rb:62:in `timeout'
>>    from /usr/lib/ruby/1.8/timeout.rb:93:in `timeout'
>>    from /usr/lib/ruby/1.8/net/protocol.rb:134:in `rbuf_fill'
>>    from /usr/lib/ruby/1.8/net/protocol.rb:116:in `readuntil'
>>    from /usr/lib/ruby/1.8/net/protocol.rb:126:in `readline'
>>    from /usr/lib/ruby/1.8/net/http.rb:2024:in `read_status_line'
>>    from /usr/lib/ruby/1.8/net/http.rb:2013:in `read_new'
>>    from /usr/lib/ruby/1.8/net/http.rb:1050:in `request'
>>    from /cloud/one/lib/ruby/cloud/occi/OCCIClient.rb:84
>>    from /cloud/one/lib/ruby/cloud/CloudClient.rb:95:in `call'
>>    from /cloud/one/lib/ruby/cloud/CloudClient.rb:95:in `http_start'
>>    from /usr/lib/ruby/1.8/net/http.rb:543:in `start'
>>    from /cloud/one/lib/ruby/cloud/CloudClient.rb:94:in `http_start'
>>    from /cloud/one/lib/ruby/cloud/occi/OCCIClient.rb:83:in `post_vms'
>>    from /cloud/one/bin/occi-compute:152
>>
>>
>>
>> $ ruby -v
>> ruby 1.8.7 (2010-01-10 patchlevel 249) [x86_64-linux]
>>
>> $ lsb_release -a
>> No LSB modules are available.
>> Distributor ID:    Ubuntu
>> Description:    Ubuntu 10.04.2 LTS
>> Release:    10.04
>> Codename:    lucid
>>
>>
>>
>> thanks
>> Marco
>>
>> On 07/27/2011 12:41 PM, Javier Fontan wrote:
>>> Can you send us an example of the occi.xml that is causing you the
>>> trouble? I don't see why that character can cause any problem but I
>>> prefer to debug this myself.
>>>
>>> Cheers
>>>
>>> On Mon, Jul 25, 2011 at 3:43 PM, Marco Strutz <marco.strutz at desy.de> wrote:
>>>> Hello developers.ti
>>>>
>>>>
>>>> I might found a bug in the occi-context section related to a proper
>>>> string parsing.
>>>> In generel, the 'occi-compute create' command outputs error-message if
>>>> unsupported characters (like '$') are detected:
>>>>  [VirtualMachineAllocate] Error trying to CREATE VM Could not parse
>>>> CONTEXT for VM.
>>>>
>>>> In my occi.xml I wanted to define a customized context-attribute
>>>> containing the char '%'. This leads 'occi-compute create' into a timeout
>>>> and a ruby process [1] gets a 100% cpu load:
>>>>  Error timeout while connected to server (execution expired).
>>>>  Server: localhost:4567
>>>>
>>>> I guess this syntax-issue is related to the use of "<% ...%>" of the
>>>> ruby-occi-template definition [2] since percent-chars are used as well.
>>>>
>>>> This leads me to the following question: What can I do to have a
>>>> '%'-char in my self-defined context-attributes. Is this even possible?
>>>> In the end I need the %-char in the context.sh-file of the booted
>>>> VirtualMachine.
>>>>
>>>>
>>>>  [1] ruby /cloud/one/lib/ruby/cloud/occi/occi-server.rb
>>>>  [2] $ONE_LOCATION/etc/occi_templates/common.erb
>>>>
>>>>
>>>>
>>>> thanks in advance
>>>> Marco
>>>> _______________________________________________
>>>> Users mailing list
>>>> Users at lists.opennebula.org
>>>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>>>
>>>
>> _______________________________________________
>> Users mailing list
>> Users at lists.opennebula.org
>> http://lists.opennebula.org/listinfo.cgi/users-opennebula.org
>>
>
>




More information about the Users mailing list