[one-users] A question (maybe bug) on parsing xentop outputs in var/remotes/vmm/xen/poll

Jiachen Yang farseerfc at gmail.com
Fri Apr 8 02:06:39 PDT 2011


Hello everyone using OpenNEbular:

I recently installed ONE on my xen hosts and begin to study how to use
this excellent cloud management tool.
When I configured my hosts according to the user guide, I happily
submitted my first vm to one. After prologing, I got this kind of
error message of my vm.log:

Fri Apr  8 15:36:26 2011 [VMM][I]: Command execution fail: 'if [ -x
"/var/tmp/one/vmm/xen/poll" ]; then /var/tmp/one/vmm/xen/poll one-2;
else                              exit 42; fi'
Fri Apr  8 15:36:26 2011 [VMM][I]: STDERR follows.
Fri Apr  8 15:36:26 2011 [VMM][I]: Error executing sudo /usr/sbin/xentop -bi2
Fri Apr  8 15:36:26 2011 [VMM][I]: /var/tmp/one/vmm/xen/poll:186:in
`get_vm_info': undefined method `[]' for nil:NilClass (NoMethodError)
Fri Apr  8 15:36:26 2011 [VMM][I]: from
/var/tmp/one/vmm/xen/poll:310:in `print_one_vm_info'
Fri Apr  8 15:36:26 2011 [VMM][I]: from /var/tmp/one/vmm/xen/poll:344
Fri Apr  8 15:36:26 2011 [VMM][I]: ExitCode: 1
Fri Apr  8 15:36:26 2011 [VMM][E]: Error monitoring VM, Error
executing sudo /usr/sbin/xentop -bi2

I typed the ruby code of poll in irb manually and found that
get_all_vm_info returned Nil.

When I tried to read and understand the source of poll then I met this line:

    def self.get_all_vm_info
    begin
         # ...
!       domain_lines=valid_lines[4..-1]
        # ......

I want to ask why domain_lines start from 4th line in valid_lines?
When I typed these codes into irb, valid_lines.length == 3. There were
no 3rd and 4th items in valid_lines.

I changed it to:
         domain_lines=valid_lines[1..-1]

And all seems to work perfect on my hosts.

I want to know whether this is a bug or it has its intentions to start
from the 4th line in valid_lines.


About my host configuration:
I got 2 host installed SLES 11 sp1 and Xen3.3.
I added these hosts to ONE using:
onehost linux-front im_xen vmm_xen tm_ssh

-------------------------------------------------------------------------------------------------
Jiachen Yang
School of Software Engineering
Shanghai Jiaotong University
Tel. (+86) 13774494600

farseerfc at sjtu.edu.cn
firechildren at 163.com
farseerfc at gmail.com (gtalk)
firechildren at hotmail.com (msn)



More information about the Users mailing list