[one-users] Only one REQUIREMENTS statement used?

Shi Jin jinzishuai at gmail.com
Thu Nov 12 12:10:54 PST 2009


I have another question:
This And condition seems to work:
REQUIREMENTS="LVM=NO & HOSTNAME=node1"
It gives me the VM where I want it to be.
However, I have a problem using "onevm show" to display its
properties. The error I get is
onevm show 30
/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:92:in `parse':
#<RuntimeError: Illegal character '&' in raw string "LVM=NO &
HOSTNAME=node1"> (REXML::ParseException)
/usr/lib/ruby/1.8/rexml/text.rb:91:in `initialize'
/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:43:in `new'
/usr/lib/ruby/1.8/rexml/parsers/treeparser.rb:43: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:684
/srv/cloud/one/bin/onevm:679:in `each'
/srv/cloud/one/bin/onevm:679
...
Illegal character '&' in raw string "LVM=NO & HOSTNAME=node1"
Line:
Position:
Last 80 unconsumed characters:
</REQUIREMENTS><VCPU>1</VCPU><VMID>30</VMID></TEMPLATE><HISTORY><SEQ>0</SEQ><HOST
	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:684
	from /srv/cloud/one/bin/onevm:679:in `each'
	from /srv/cloud/one/bin/onevm:679

Is there a fix to this?
Thanks.

Shi
On Thu, Nov 12, 2009 at 12:38 PM, Shi Jin <jinzishuai at gmail.com> wrote:
> Hi there,
>
> If I have multiple REQUIREMENTS statements in the template file, will
> they all be used or only the first one?
> My test showed that only the first one is effective.
> So in this case, I have to use the & operator?
> Please clarify. Thanks.
>
> --
> Shi Jin, Ph.D.
>



-- 
Shi Jin, Ph.D.



More information about the Users mailing list