Bug #3653

Wrong SRC_PATH definition in clone and ln-scripts

Added by Christian Wehrlin over 6 years ago.

Status:PendingStart date:03/05/2015
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Core & System
Target version:-
Resolution: Pull request:
Affected Versions:OpenNebula 4.10

Description

To be able to use the ssh-deployment-method and thus local disks on the nodes, we set the $DATASTORE_LOCATION on the nodes to a different directory, so the images of running VM's are outside the NFS-Share.

While trying to deploy a new VM, it thus used the "clone"-script, which copies over the required images on the target-node from the NFS-Share to the destination-directory. This fails, due to the SRC_PATH being defined wrong in those scripts. Instead of

SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 

it should instead read

SRC_PATH="${SRC_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 

Upon that modification, the deployment went straight through and all was fine. Upon checking further, this error is also in the following scripts:

remotes/tm/fs_lvm/clone:SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 
remotes/tm/fs_lvm/ln:SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 
remotes/tm/qcow2/clone:SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 
remotes/tm/qcow2/ln:SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 
remotes/tm/shared/ln:SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 
remotes/tm/shared/clone:SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}" 

This probably has been overseen, due to the fact that in many implementations the paths are actually identical.

Also available in: Atom PDF