Bug #2829
error using datastores images and system with different paths
Status: | Closed | Start date: | 04/07/2014 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | - | |||
Target version: | - | |||
Resolution: | worksforme | Pull request: | ||
Affected Versions: | OpenNebula 4.4 |
Description
Hi,
I was using opennebula 4.4, my enviroment had two datastores which had different paths (/datastores/images/4 for images and /var/lib/one/datastore/6 fos system).
When I created a new virtual server I got these error logs.
Sun Apr 6 22:40:06 2014 [DiM][I]: New VM state is ACTIVE.
Sun Apr 6 22:40:07 2014 [LCM][I]: New VM state is PROLOG.
Sun Apr 6 22:40:08 2014 [TM][I]: Command execution fail: /var/lib/one/remotes/tm/shared/clone opennebula1:/datastores/images1/4/eb44cde835f77ce977ed6ea2ffc274b0 opennebula4:/var/lib/one//datastores/6/2/disk.0 2 4
Sun Apr 6 22:40:08 2014 [TM][I]: clone: Cloning /var/lib/one/datastores/4/eb44cde835f77ce977ed6ea2ffc274b0 in opennebula4:/var/lib/one//datastores/6/2/disk.0
Sun Apr 6 22:40:08 2014 [TM][E]: clone: Command "cd /var/lib/one/datastores/6/2; cp /var/lib/one/datastores/4/eb44cde835f77ce977ed6ea2ffc274b0 /var/lib/one/datastores/6/2/disk.0" failed: Warning: Permanently added 'opennebula4,10.0.0.14' (RSA) to the list of known hosts.
Sun Apr 6 22:40:08 2014 [TM][I]: cp: cannot stat `/var/lib/one/datastores/4/eb44cde835f77ce977ed6ea2ffc274b0': No such file or directory
Sun Apr 6 22:40:08 2014 [TM][E]: Error copying opennebula1:/datastores/images1/4/eb44cde835f77ce977ed6ea2ffc274b0 to opennebula4:/var/lib/one//datastores/6/2/disk.0
Sun Apr 6 22:40:08 2014 [TM][I]: ExitCode: 1
Sun Apr 6 22:40:08 2014 [TM][E]: Error executing image transfer script: Error copying opennebula1:/datastores/images1/4/eb44cde835f77ce977ed6ea2ffc274b0 to opennebula4:/var/lib/one//datastores/6/2/disk.0
Sun Apr 6 22:40:10 2014 [DiM][I]: New VM state is FAILED
I think the script /var/lib/one/remotes/tm/shared/clone could be wrong, in this script the line:
SRC_PATH="${DST_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}"
It should be:
SRC_PATH="${SRC_DS_PATH}${SRC_ARG_PATH##$SRC_DS_PATH}"
I probed it and it worked.
Thanks.
History
#1 Updated by Ruben S. Montero over 7 years ago
- Status changed from Pending to Closed
- Resolution set to worksforme
Hi
source and destination of datastore locations can be controlled in the next release by two configuration variables:
DATASTORE_LOCATION the path in the hosts where the system datastore can be accessed (can be defined cluster-wise and host-wise)
DATASTORE_BASE_PATH the base path for the SOURCE path of the image (can be defined datastore-wise)
Note that DATASTORE_LOCATION is the path where OpenNebula expects the DS to be accessible in the remote host, i.e. OpenNebula expects /datastores/images/4 to be mounted as /var/lib/one/datastore/4 in host opennebula4. It seems that is not your case. This configuration is assumed by the other TM scripts so probably is better just to do a mount -o bind between the two paths or just a synlink.