Bug #3850

Wrong Xen toolstack selection for Xen4.4 in VNM command.rb

Added by Hector Sanjuan about 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:06/25/2015
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:Drivers - Network
Target version:Release 4.14
Resolution:duplicate Pull request:
Affected Versions:OpenNebula 4.12

Description

I am using Debian 8 with Xen4.4.

The command.rb file has:

        def self.get_xen_command
            if system("ps axuww | grep -v grep | grep '\\bxen\\b'")
                "sudo xm" 
            else
                "sudo xl" 
            end
        end

If we run this "grep" command in a Xen4.4 box, with XL as toolstack we get:

irb(main):001:0> system("ps axuww | grep -v grep | grep '\\bxen\\b'")
root      1040  0.0  0.0  10876  2172 ?        SL   Jun19   0:28 /usr/lib/xen-4.4/bin/xenstored --pid-file=/var/run/xenstore.pid
root      1062  0.0  0.0  90868  2008 ?        SLl  Jun19   0:00 /usr/lib/xen-4.4/bin/xenconsoled --pid-file=/var/run/xenconsoled.pid
oneadmin  4815  1.5  0.0  36948  9232 ?        Sl   14:51   0:00 ruby ./xen.rb xen4-probes /opt/datastores 4124 20 11 sersic-dom0.um.nugg.ad
root      4818  0.0  0.0  19392  1944 ?        SL   14:51   0:00 /usr/lib/xen-4.4/bin/xentop -bi2
=> true


So it is wrongly selecting XM as toolstack instead of XL. I assume it is trying to figure out if there is a xen daemon, but that is also a wrong way yo go since you can use "xm" in Xen4 too.

In my box, there is a /usr/sbin/xen command that automatically selects the right toolstack (using /usr/lib/xen-common/bin/xen-toolstack), but I am not sure if this can be relied upon cross-distribution and cross-version. This xen-toolstack script looks in /etc/default/xen for the configured toolstack or fails back to defaults (xm in preference to xl if both are found). OpenNebula should implement a similar approach or rely in the xen-provided tooling if available.


Related issues

Duplicates Bug #3764: xen toolstack incorrect detection in var/remotes/vnm/comm... Closed 04/20/2015

History

#1 Updated by Ruben S. Montero about 6 years ago

  • Target version set to Release 4.14

#2 Updated by Hector Sanjuan about 6 years ago

A patch for this has been added to my existing pull request: https://github.com/OpenNebula/one/pull/60

#3 Updated by Hector Sanjuan about 6 years ago

Related to #3841

#4 Updated by Ruben S. Montero almost 6 years ago

  • Assignee set to Javi Fontan

#5 Updated by Javi Fontan almost 6 years ago

Indeed there was an error checking for xen toolstack. There is a fix in master for that problem:

http://dev.opennebula.org/issues/3764

It should be searching for xend, not xen. With xend daemon only xm toolstack can be used. Without it xl is used.

#6 Updated by Javi Fontan almost 6 years ago

  • Status changed from Pending to Closed
  • Resolution set to duplicate

We'll reopen the case if this doesn't fix the problem.

#7 Updated by Javi Fontan almost 6 years ago

  • Duplicates Bug #3764: xen toolstack incorrect detection in var/remotes/vnm/command.rb added

Also available in: Atom PDF