Openebula 4.12 + (addon-sheepdog)

Hi)))
Installing Opennebula frontend ( Centos 7), Opennebula Node ( Centos 7), Sheepdog Node (storage) (Centos 7)
I am reading Instruction:
this is debian

oneadmin have to be able to execute “dog” as root without password
cat >/etc/sudoers.d/opennebula-sheepdog <<EOF
Cmnd_Alias ONE_SHEEPDOG = /usr/sbin/dog
oneadmin ALL=(ALL) NOPASSWD: ONE_SHEEPDOG
EOF

If Centos (RPM) Cmnd_Alias ONE_SHEEPDOG = /usr/bin/dog

after Added storage Opennebula Frontend
name: BRIDGE_LIST
name: SHEEPDOG_HOST
( ok !!))) Works Datastores shows Opennebula Frontend

But when i am created Virtual Machine ( mistake)

Log:
Thu Apr 21 21:40:35 2016 : Error executing image transfer script: Error cloning one-3 to one-3-12-1 in oneb.node1
(oned.log) Log:
Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG I 12 Command execution fail: /var/lib/one/remotes/tm/sheepdog/clone opennebula:one-3 oneb.node1:/var/lib/one//datastores/0/12/disk.1 12 100

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG E 12 clone: Command "set -e

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG I 12

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG I 12 sudo dog vdi snapshot -a 127.0.0.1 -s clone_12-1 one-3

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG I 12 sudo dog vdi clone -a 127.0.0.1 -s clone_12-1 one-3 one-3-12-1

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG I 12 sudo dog vdi delete -a 127.0.0.1 -s clone_12-1 one-3" failed: sudo: no tty present and no askpass program specified

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG E 12 Error cloning one-3 to one-3-12-1 in oneb.node1

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: LOG I 12 ExitCode: 1

Thu Apr 21 21:40:35 2016 [Z0][TM][D]: Message received: TRANSFER FAILURE 12 Error cloning one-3 to one-3-12-1 in oneb.node1

What happens??
What wrong ???
((((

I would be grateful for the help )))

Hi Tesla,

This is the error hint:

In the sudoers file you have /usr/sbin/dog. Try adding /sbin/dog too and try again. On CentOS7 /sbin is symlink to /usr/sbin/ and i bet that for some reason the third command is trying to use /sbin/dog which has no sudo rights.

Another solution is to replace in scripts_common.sh the variable DOG=dog to DOG=/usr/sbin/dog. This way you will be sure that you are calling the sudo-enabled path to the binary.

Kind Regards,
Anton Todorov

Hmm I am doing this, but it still does not work
But when Opennebula frontend – (create template only CD (without HDD), and create virtual machine, interesting log:

Fri Apr 22 17:17:40 2016 [Z0][ReM][D]: Req:1984 UID:2 VirtualMachinePoolInfo invoked , -2, 0, -2000, -1
Fri Apr 22 17:17:40 2016 [Z0][ReM][D]: Req:1984 UID:2 VirtualMachinePoolInfo result SUCCESS, “<VM_POOL>18<…”
Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: LOG I 18 Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/18/deployment.0’ ‘oneb.node1’ 18 oneb.node1

Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: LOG I 18 error: Failed to create domain from /var/lib/one//datastores/0/18/deployment.0

Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: LOG I 18 error: internal error: process exited while connecting to monitor: 2016-04-22T13:17:40.285277Z qemu-kvm: -drive file=sheepdog:one-6,if=none,id=drive-ide0-0-0,readonly=on,format=raw,cache=none: could not open disk image sheepdog:one-6: Driver ‘sheepdog’ is not whitelisted

Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: LOG I 18

Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: LOG E 18 Could not create domain from /var/lib/one//datastores/0/18/deployment.0

Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: LOG I 18 ExitCode: 255

Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: LOG I 18 Failed to execute virtualization driver operation: deploy.

Fri Apr 22 17:17:40 2016 [Z0][VMM][D]: Message received: DEPLOY FAILURE 18 Could not create domain from /var/lib/one//datastores/0/18/deployment.0

Maybe this problem ??
Maybe recreate RPM package qemu-kvm ???
with options:
configure.
–block-drv-rw-whitelist=qcow2,raw,file,host_device,nbd,iscsi,gluster,rbd,sheepdog

http://lists.wpkg.org/pipermail/sheepdog-users/2015-January/014919.html

?

Definitely, then probably you should patch the sheepdog addon scripts with the unlock solution from same thread…

I am recreate RPM package Qemu-KVM ( with white list
–block-drv-rw-whitelist=qcow2,raw,file,host_device,nbd,iscsi,gluster,rbd,sheepdog
Installing? and after that I have new errors (((
Tue Apr 26 20:10:17 2016 [Z0][ReM][D]: Req:6080 UID:0 VirtualMachineDeploy result SUCCESS, 25
Tue Apr 26 20:10:18 2016 [Z0][TM][D]: Message received: TRANSFER SUCCESS 25 -

Tue Apr 26 20:10:18 2016 [Z0][VMM][D]: Message received: LOG I 25 ExitCode: 0

Tue Apr 26 20:10:18 2016 [Z0][VMM][D]: Message received: LOG I 25 Successfully execute network driver operation: pre.

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/25/deployment.0’ ‘oneb.node1’ 25 oneb.node1

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 error: Failed to create domain from /var/lib/one//datastores/0/25/deployment.0

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 error: internal error: process exited while connecting to monitor: 2016-04-26T16:10:17.963033Z qemu-kvm: -drive file=sheepdog:one-8,if=none,id=drive-ide0-0-0,readonly=on,format=raw,cache=none: Failed to connect to socket: Connection refused

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 2016-04-26T16:10:17.963302Z qemu-kvm: -drive file=sheepdog:one-8,if=none,id=drive-ide0-0-0,readonly=on,format=raw,cache=none: could not open disk image sheepdog:one-8: Could not open ‘sheepdog:one-8’: Operation not permitted

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG E 25 Could not create domain from /var/lib/one//datastores/0/25/deployment.0

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 ExitCode: 255

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 Failed to execute virtualization driver operation: deploy.

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: DEPLOY FAILURE 25 Could not create domain from /var/lib/one//datastores/0/25/deployment.0
(((
Hmm…

When if ( I am Installing template only (CDROM ) this error
Tue Apr 26 20:10:18 2016 [Z0][TM][D]: Message received: TRANSFER SUCCESS 25 -

Tue Apr 26 20:10:18 2016 [Z0][VMM][D]: Message received: LOG I 25 ExitCode: 0

Tue Apr 26 20:10:18 2016 [Z0][VMM][D]: Message received: LOG I 25 Successfully execute network driver operation: pre.

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 Command execution fail: cat << EOT | /var/tmp/one/vmm/kvm/deploy ‘/var/lib/one//datastores/0/25/deployment.0’ ‘oneb.node1’ 25 oneb.node1

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 error: Failed to create domain from /var/lib/one//datastores/0/25/deployment.0

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 error: internal error: process exited while connecting to monitor: 2016-04-26T16:10:17.963033Z qemu-kvm: -drive file=sheepdog:one-8,if=none,id=drive-ide0-0-0,readonly=on,format=raw,cache=none: Failed to connect to socket: Connection refused

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 2016-04-26T16:10:17.963302Z qemu-kvm: -drive file=sheepdog:one-8,if=none,id=drive-ide0-0-0,readonly=on,format=raw,cache=none: could not open disk image sheepdog:one-8: Could not open ‘sheepdog:one-8’: Operation not permitted

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG E 25 Could not create domain from /var/lib/one//datastores/0/25/deployment.0

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 ExitCode: 255

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: LOG I 25 Failed to execute virtualization driver operation: deploy.

Tue Apr 26 20:10:19 2016 [Z0][VMM][D]: Message received: DEPLOY FAILURE 25 Could not create domain from /var/lib/one//datastores/0/25/deployment.0
When I am add template CD+ HDD ( another error )
Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG I 26 Command execution fail: /var/lib/one/remotes/tm/sheepdog/clone opennebula:one-9 oneb.node1:/var/lib/one//datastores/0/26/disk.1 26 104

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG E 26 clone: Command "set -e

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG I 26

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG I 26 sudo dog vdi snapshot -a 127.0.0.1 -s clone_26-1 one-9

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG I 26 sudo dog vdi clone -a 127.0.0.1 -s clone_26-1 one-9 one-9-26-1

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG I 26 sudo dog vdi delete -a 127.0.0.1 -s clone_26-1 one-9" failed: sudo: no tty present and no askpass program specified

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG E 26 Error cloning one-9 to one-9-26-1 in oneb.node1

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: LOG I 26 ExitCode: 1

Tue Apr 26 20:26:48 2016 [Z0][TM][D]: Message received: TRANSFER FAILURE 26 Error cloning one-9 to one-9-26-1 in oneb.node1

Ok)) this its great work !!)))

  1. — onebstore —
    installing zookeeper-native
    wget -O /etc/yum.repos.d/cloudera-cdh5.repo https://archive.cloudera.com/cdh5/redhat/7/x86_64/cdh/cloudera-cdh5.repo
    yum install zookeeper-native
    yum localinstall zookee*
    yum localinstall sheep*
    I am create RPM packagezookeeper-3.4.8-1.x86_64.rpm (2.7 MB)sheepdog-1.0_rc0-1.el7.centos.x86_64.rpm (307.1 KB)
    /etc/sudoers.d/opennebula-sheepdog

Defaults:oneadmin !requiretty
Defaults:oneadmin visiblepw
oneadmin ALL=(ALL:ALL) ALL
oneadmin ALL=(ALL) NOPASSWD: ALL

Cmnd_Alias ONE_SHEEPDOG = /usr/sbin/dog, /sbin/dog, /usr/bin/dog, /bin/dog
oneadmin ALL=(ALL) NOPASSWD: ONE_SHEEPDOG

  1. ----node----
    I am recreate RPM — because mistake — White list sheepdog
    libcacard-1.5.3-105.el7.centos.3.x86_64.rpm (226.9 KB)libcacard-devel-1.5.3-105.el7.centos.3.x86_64.rpm (192.6 KB)libcacard-tools-1.5.3-105.el7.centos.3.x86_64.rpm (192.1 KB)qemu-img-1.5.3-105.el7.centos.3.x86_64.rpm (655.9 KB)qemu-kvm-1.5.3-105.el7.centos.3.x86_64.rpm (1.8 MB)qemu-kvm-common-1.5.3-105.el7.centos.3.x86_64.rpm (389.4 KB)

qemu-kvm-tools-1.5.3-105.el7.centos.3.x86_64.rpm (187.7 KB)
and ----

Defaults:oneadmin !requiretty
Defaults:oneadmin visiblepw

oneadmin ALL=(ALL:ALL) ALL
oneadmin ALL=(ALL) NOPASSWD: ALL

Cmnd_Alias ONE_SHEEPDOG = /usr/sbin/dog, /sbin/dog, /usr/bin/dog, /bin/dog
oneadmin ALL=(ALL) NOPASSWD: ONE_SHEEPDOG

create sheepdog — getaway
https://bugs.launchpad.net/sheepdog-project/+bug/1337848