Bug #1046
OpenNebulaNetwork.rb - detection of hypervisor fails for XEN
Status: | Closed | Start date: | 12/30/2011 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | Jaime Melis | % Done: | 0% | |
Category: | Core & System | Estimated time: | 0.00 hour | |
Target version: | Release 3.2 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 3.2 |
Description
I've stumbled upon a problem where OpenNebulaNetwork.rb fails to determine the kind of hypervisor. I got the following (related) info in the log:
Fri Dec 30 14:05:17 2011 [VMM][I]: Command execution fail: /var/tmp/one/vnm/ovswitch/post base64-data-I-cut-away one-40 Fri Dec 30 14:05:17 2011 [VMM][I]: /var/tmp/one/vnm/ovswitch/../OpenNebulaNic.rb:29:in `new_nic': undefined method `new' for nil:NilClass (NoMethodError) Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/../OpenNebulaNetwork.rb:60:in `initialize' Fri Dec 30 14:05:17 2011 [VMM][I]: from /usr/lib/ruby/1.8/rexml/element.rb:892:in `each' Fri Dec 30 14:05:17 2011 [VMM][I]: from /usr/lib/ruby/1.8/rexml/xpath.rb:53:in `each' Fri Dec 30 14:05:17 2011 [VMM][I]: from /usr/lib/ruby/1.8/rexml/element.rb:892:in `each' Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/../OpenNebulaNetwork.rb:59:in `initialize' Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/../OpenNebulaNetwork.rb:110:in `new' Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/../OpenNebulaNetwork.rb:110:in `initialize' Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/OpenvSwitch.rb:23:in `initialize' Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/../OpenNebulaNetwork.rb:100:in `new' Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/../OpenNebulaNetwork.rb:100:in `from_base64' Fri Dec 30 14:05:17 2011 [VMM][I]: from /var/tmp/one/vnm/ovswitch/post:28 Fri Dec 30 14:05:17 2011 [VMM][I]: ExitCode: 1 Fri Dec 30 14:05:17 2011 [VMM][I]: Failed to execute network driver operation: post. Fri Dec 30 14:05:17 2011 [VMM][E]: Error deploying virtual machine
I found a solution. I edited the detect_hypervisor function to look like this:
def detect_hypervisor uname_a = `uname -a` grepxen = `cat /proc/xen/capabilities | grep -c control_d` lsmod = `#{COMMANDS[:lsmod]}` if uname_a.match(/xen/i) "xen" elsif grepxen.match(/1/i) "xen" elsif lsmod.match(/kvm/) "kvm" end end
It's the "grepxen"-lines that are new. I think they should be injected into the tree.
I don't know what version I should select, I used 3.1.90
Associated revisions
Bug #1046: detection of hypervisor fails for XEN
Bug #1046: Fix detection of hypervisor. A regular user can't read /proc/xen/capabilities
History
#1 Updated by Ruben S. Montero over 9 years ago
- Assignee set to Jaime Melis
- Target version set to Release 3.2
#2 Updated by Ruben S. Montero over 9 years ago
- Status changed from New to Closed
- Resolution set to fixed