Menu

Xen-Manager list generation

2009-01-28
2013-04-13
  • Piergiorgio Andreani

    Maybe I've discovered another interesting issue in

    /usr/lib/openqrm/web/base/plugins/xen/xen-manager.php

    On line 222 I see:

    222   // skip Name and dom0 entry
    223                                   $loop++;
    224                                   if ($loop > 2) {

    This is (teorically) to avoid dom0 entry appear in list. But that's not always true: if I'm not wrong, "xm list" returns the VMs list in alphabetical order. That means that script jumps always the first entry in alphabetical order (which is not necessarily the dom0 entry).

    In my use case a VM with name starting with C was jumped. I've solved changing 224 line like this:

    224                                   if ($loop > 1) {

    Now generated list is complete. dom0 appears too, but it doesn't matter for me. Hope it well help!

     
    • Matt

      Matt - 2009-01-29

      Hi Piergiorgio,

      oh, yes, good one. Opened a bug about it at :

      https://sourceforge.net/tracker2/?func=detail&aid=2544987&group_id=153504&atid=788031

      Many thanks for great debugging + reporting !

      have a nice day,

      Matt

       
    • Matt

      Matt - 2009-01-29

      Hi Piergiorgio, Matt again,

      just commited a fix for that. It looks like :

      .....
                      $xen_name = substr($xen_name, 0, strpos($xen_name, " "));
                      $xen_name = trim($xen_name);
                      // skip Name and dom0 entry
                      $loop++;
                      if ($loop > 1 && strcmp($xen_name, "Dom0") {
                          $active_vms[] = "$xen_name";
                          // check if on- or offline
      ......

      You can get the updated xen-manager.php from :

      http://openqrm.svn.sourceforge.net/viewvc/openqrm/trunk/src/plugins/xen/web/xen-manager.php?revision=1208&view=markup

      Would you please apply and test it ?
      Currently do not have a working xen setup available here so it would be great to hear if this fixes it. btw closed the bug. if it is not working please re-open ;)

      many thanks + have a great day,

      Matt

       
    • Piergiorgio Andreani

      Hi Matt, some troubles happened to my servers (not related with openQRM) so I temporarily cannot try this file. I'll tell you in the future.

       
      • Matt

        Matt - 2009-02-03

        Ciao Piergiorgio,

        no prob, take your time. Thanks in advance for your testing !

        greetz + best,

        Matt

         

Log in to post a comment.