[one-users] Command execution fail: 'if [ -x "<some command on remote node>" ]; then <some command on remote node> Creating; else exit 42; fi'

knawnd at gmail.com knawnd at gmail.com
Thu May 5 08:55:58 PDT 2011


Dear OpenNebula experts,

I am still working on implementing OpenVZ support in OpenNebula 
(unfortunately the progress is pretty slow since I am busy with many 
other things).
There are the error messages in $ONE_LOCATION/var/<VM_ID>/vm.log and 
oned.log similar to the following pattern:
Command execution fail: 'if [ -x "<some command on remote node>" ]; then 
<some command on remote node> Creating; else exit 42; fi'

In particular
vm.log:
[...]
Thu May  5 18:16:45 2011 [VMM][I]: Command execution fail: 'if [ -x 
"/tmp/one//vmm/ovz/poll" ]; then /tmp/one//vmm/ovz/poll Creating; else 
                             exit 42; fi'
Thu May  5 18:16:45 2011 [VMM][I]: STDERR follows.
Thu May  5 18:16:45 2011 [VMM][I]: ExitCode: 42
Thu May  5 18:16:45 2011 [VMM][E]: Error monitoring VM, Warning: 
Permanently added '<cluster node IP address>' (RSA) to the list of known 
hosts.
Thu May  5 18:22:45 2011 [DiM][I]: New VM state is DONE
Thu May  5 18:22:45 2011 [VMM][W]: Ignored: LOG - 26 Driver command for 
26 cancelled
Thu May  5 18:22:45 2011 [VMM][W]: Ignored: LOG - 26 Command execution 
fail: 'if [ -x "/tmp/one//vmm/ovz/cancel" ]; then 
/tmp/one//vmm/ovz/cancel Creating; else 
exit 42; fi'
Thu May  5 18:22:45 2011 [VMM][W]: Ignored: LOG - 26 STDERR follows.
Thu May  5 18:22:45 2011 [VMM][W]: Ignored: LOG - 26 Argument "Creating" 
isn't numeric in addition (+) at /tmp/one//vmm/ovz/cancel line 28.
Thu May  5 18:22:45 2011 [VMM][W]: Ignored: LOG - 26 Container config 
file does not exist
Thu May  5 18:22:45 2011 [VMM][W]: Ignored: LOG - 26 Failed to execute 
sudo /usr/sbin/vzctl stop 100 (3584):  at /tmp/one//vmm/ovz/cancel line 44.
Thu May  5 18:22:45 2011 [VMM][W]: Ignored: LOG - 26 ExitCode: 14
Thu May  5 18:22:45 2011 [HKM][I]: Hook image successfully executed.
[...]

$ONE_LOCATION/var/remotes/vmm/ovz/poll is not yet implemented (at the 
moment it is copied from $ONE_LOCATION/var/remotes/vmm/xen/poll) but 
$ONE_LOCATION/var/remotes/vmm/ovz/cancel is what already implemented for 
OpenVZ and what I am trying to test.

As far as I understand from OpenNebula development docs 
$ONE_LOCATION/var/remotes/vmm/xen/poll has to be invoked on remote host 
with argument VMID i.e.
'$SOME_PATH_TO_REMOTE_SCRIPTS/vmm/ovz/cancel <VMID>' but as one can see 
from vm.log these command is '/tmp/one//vmm/ovz/cancel Creating' 
(Creating instead of VMID).
If /tmp/one//vmm/ovz/cancel is invoked on remote machine manually with 
VMID as argument i.e.:
$ /tmp/one//vmm/ovz/cancel 26
that script works as expected (stops and deletes VM).

What can be a reason for error messages in vm.log mentioned above? Any 
hint how to debug further?

I am using OpenNebula 2.2.0 and my oned.conf is below:
$ grep -v ^# one-2.2.0/etc/oned.conf |uniq

HOST_MONITORING_INTERVAL = 600

VM_POLLING_INTERVAL      = 600

VM_DIR=/vz/one/vm

SCRIPTS_REMOTE_DIR=/tmp/one/

PORT=2633

DB = [ backend = "sqlite" ]

VNC_BASE_PORT = 5900

DEBUG_LEVEL=3

NETWORK_SIZE = 254

MAC_PREFIX   = "02:00"

DEFAULT_IMAGE_TYPE    = "OS"
DEFAULT_DEVICE_PREFIX = "sd"

IM_MAD = [
     name       = "im_xen",
     executable = "one_im_ssh",
     arguments  = "xen" ]

IM_MAD = [
       name       = "im_ovz",
       executable = "one_im_ssh",
       arguments  = "ovz" ]

VM_MAD = [
     name       = "vmm_xen",
     executable = "one_vmm_ssh",
     arguments  = "xen",
     default    = "vmm_ssh/vmm_ssh_xen.conf",
     type       = "xen" ]

VM_MAD = [
     name       = "vmm_ovz",
     executable = "one_vmm_ssh",
     arguments  = "ovz",
     type       = "xml" ]

TM_MAD = [
     name       = "tm_ssh",
     executable = "one_tm",
     arguments  = "tm_ssh/tm_ssh.conf" ]

HM_MAD = [
     executable = "one_hm" ]

VM_HOOK = [
     name      = "image",
     on        = "DONE",
     command   = "image.rb",
     arguments = "$VMID" ]

Thanks in advance,
Nikolay.



More information about the Users mailing list