Bug #316

Hypervisor raw data not escaped in one.vm.info

Added by Alexandre Joseph almost 11 years ago. Updated over 10 years ago.

Status:ClosedStart date:08/16/2010
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:CLI
Target version:Release 1.4.2
Resolution:wontfix Pull request:
Affected Versions:

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

Associated revisions

Revision cfc84db3
Added by Javi Fontan about 4 years ago

Merge pull request #316 from vholer/bug-5145

B #5145: Drop domain snapshots before live-migrate

History

#1 Updated by Javi Fontan almost 11 years ago

  • Category set to CLI
  • Assignee set to Javi Fontan

#2 Updated by Javi Fontan almost 11 years 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.

#3 Updated by Alexandre Joseph almost 11 years 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.

#4 Updated by Javi Fontan almost 11 years ago

  • Target version set to Release 1.4.2

#5 Updated by Javi Fontan over 10 years 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