Bug #316

Hypervisor raw data not escaped in one.vm.info

Added by Alexandre Joseph almost 2 years ago. Updated over 1 year ago.

Status:Closed Start date:08/16/2010
Priority:Normal Due date:
Assignee:Javi Fontan % Done:

0%

Category:CLI
Target version:Release 1.4.2
Resolution:wontfix Affected Version:
Story points-
Velocity based estimate-

Description

When adding raw data to the hypervisor, if the user enter an XML string which is not valid. When the `onevm show <id>` command is called with the ID of this VM, the command fail because the raw data string is not escaped and is interpreted by the command.

The `onevm show` command return something like this:

/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:92:in `parse': #<REXML::ParseException: Missing end tag for 'devices' (got "DATA") (REXML::ParseException)
Line:
Position:
Last 80 unconsumed characters:
<TYPE>xen</TYPE></RAW><VMID>1</VMID></TEMPLATE></VM>>
/usr/lib/ruby/1.8/rexml/parsers/baseparser.rb:330:in `pull'
/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:22:in `parse'
/usr/lib/ruby/1.8/rexml/document.rb:228:in `build'
/usr/lib/ruby/1.8/rexml/document.rb:43:in `initialize'
/srv/cloud/one/lib/ruby/OpenNebula/XMLUtils.rb:31:in `new'
/srv/cloud/one/lib/ruby/OpenNebula/XMLUtils.rb:31:in `initialize_xml'
/srv/cloud/one/lib/ruby/OpenNebula/Pool.rb:106:in `info'
/srv/cloud/one/lib/ruby/OpenNebula/VirtualMachine.rb:101:in `info'
/srv/cloud/one/bin/onevm:683
/srv/cloud/one/bin/onevm:678:in `each'
/srv/cloud/one/bin/onevm:678
...
Missing end tag for 'devices' (got "DATA")
Line:
Position:
Last 80 unconsumed characters:
<TYPE>xen</TYPE></RAW><VMID>1</VMID></TEMPLATE></VM>
Line:
Position:
Last 80 unconsumed characters:
<TYPE>xen</TYPE></RAW><VMID>1</VMID></TEMPLATE></VM>
from /usr/lib/ruby/1.8/rexml/document.rb:228:in `build'
from /usr/lib/ruby/1.8/rexml/document.rb:43:in `initialize'
from /srv/cloud/one/lib/ruby/OpenNebula/XMLUtils.rb:31:in `new'
from /srv/cloud/one/lib/ruby/OpenNebula/XMLUtils.rb:31:in `initialize_xml'
from /srv/cloud/one/lib/ruby/OpenNebula/Pool.rb:106:in `info'
from /srv/cloud/one/lib/ruby/OpenNebula/VirtualMachine.rb:101:in `info'
from /srv/cloud/one/bin/onevm:683
from /srv/cloud/one/bin/onevm:678:in `each'
from /srv/cloud/one/bin/onevm:678

History

Updated by Javi Fontan over 1 year ago

  • Category set to CLI
  • Assignee set to Javi Fontan

Updated by Javi Fontan over 1 year ago

Are you using one-2.0 branch? In one-2.0 and master branches we put user provided information inside <![CDATA[ values ]]>. If that is the case can you send me an example of template that breaks onevm? I am trying to reproduce the problem but CDATA escaping seems to work.

Updated by Alexandre Joseph over 1 year ago

Javi Fontan wrote:

Are you using one-2.0 branch? In one-2.0 and master branches we put user provided information inside <![CDATA[ values ]]>. If that is the case can you send me an example of template that breaks onevm? I am trying to reproduce the problem but CDATA escaping seems to work.

This error appear only with the branch 1.4. With the 2.0 branch it's ok, raw data are escaped.

Updated by Javi Fontan over 1 year ago

  • Target version set to Release 1.4.2

Updated by Javi Fontan over 1 year ago

  • Status changed from New to Closed
  • Resolution set to wontfix

This wont be changed in 1.4 as it is solved in 2.x

Also available in: Atom PDF