mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-19 03:12:55 +09:00
feature #1437: Remove tmp dirs in vmfs datastore
This commit is contained in:
1 parent
e3cbe7c8c3
commit
4b05524487
3 files changed
+19
-14
No files matched your search
+2
-3
@@ -418,7 +418,6 @@ INSTALL_FILES=(
|
||||
TM_QCOW2_FILES:$VAR_LOCATION/remotes/tm/qcow2
|
||||
TM_SSH_FILES:$VAR_LOCATION/remotes/tm/ssh
|
||||
TM_VMFS_FILES:$VAR_LOCATION/remotes/tm/vmfs
|
||||
TM_VMWARE_FILES:$VAR_LOCATION/remotes/tm/vmware
|
||||
TM_ISCSI_FILES:$VAR_LOCATION/remotes/tm/iscsi
|
||||
TM_LVM_FILES:$VAR_LOCATION/remotes/tm/lvm
|
||||
TM_DUMMY_FILES:$VAR_LOCATION/remotes/tm/dummy
|
||||
@@ -426,7 +425,7 @@ INSTALL_FILES=(
|
||||
DATASTORE_DRIVER_DUMMY_SCRIPTS:$VAR_LOCATION/remotes/datastore/dummy
|
||||
DATASTORE_DRIVER_FS_SCRIPTS:$VAR_LOCATION/remotes/datastore/fs
|
||||
DATASTORE_DRIVER_VMWARE_SCRIPTS:$VAR_LOCATION/remotes/datastore/vmware
|
||||
DATASTORE_DRIVER_VMFS_SCRIPTS:$VAR_LOCATION/remotes/datastore/vmfs
|
||||
DATASTORE_DRIVER_VMFS_SCRIPTS:$VAR_LOCATION/remotes/datastore/vmfs
|
||||
DATASTORE_DRIVER_ISCSI_SCRIPTS:$VAR_LOCATION/remotes/datastore/iscsi
|
||||
DATASTORE_DRIVER_LVM_SCRIPTS:$VAR_LOCATION/remotes/datastore/lvm
|
||||
NETWORK_FILES:$VAR_LOCATION/remotes/vnm
|
||||
@@ -890,7 +889,7 @@ TM_VMFS_FILES="src/tm_mad/vmfs/clone \
|
||||
src/tm_mad/vmfs/mvds \
|
||||
src/tm_mad/vmfs/tm_vmfs.conf \
|
||||
src/tm_mad/vmfs/postmigrate \
|
||||
src/tm_mad/vmfs/premigrate"
|
||||
src/tm_mad/vmfs/premigrate"
|
||||
|
||||
TM_ISCSI_FILES="src/tm_mad/iscsi/clone \
|
||||
src/tm_mad/iscsi/ln \
|
||||
|
||||
@@ -82,15 +82,15 @@ set_up_datastore "$BASE_PATH" "$RESTRICTED_DIRS" "$SAFE_DIRS" "$UMASK"
|
||||
FE_DST=`generate_image_path`
|
||||
DST_FOLDER=`basename $FE_DST`
|
||||
DST="/vmfs/volumes/$DS_ID/$DST_FOLDER"
|
||||
DST_HOST=`get_destination_host $IMAGE_ID`
|
||||
DST_HOST=`get_destination_host $IMAGE_ID`
|
||||
|
||||
if [ "$USE_SSH" != "yes" ]; then
|
||||
USERNAME=`echo $(cat $VMWARERC |grep ":username:"|cut -d":" -f 3|tr -d '"')`
|
||||
PASSWORD=`echo $(cat $VMWARERC |grep ":password:"|cut -d":" -f 3|tr -d '"')`
|
||||
if [ -z $PASSWORD ]; then
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password \"\""
|
||||
else
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password $PASSWORD"
|
||||
if [ -z $PASSWORD ]; then
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password \"\""
|
||||
else
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password $PASSWORD"
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -103,7 +103,7 @@ else
|
||||
fi
|
||||
|
||||
# Prepare for a possible download in the front-end
|
||||
if [ ! -d $TMP_DIR ]; then
|
||||
if [ ! -d $TMP_DIR ]; then
|
||||
mkdir -p $TMP_DIR
|
||||
fi
|
||||
|
||||
@@ -126,6 +126,8 @@ http://*|https://* )
|
||||
log "Downloading $SRC to the image repository"
|
||||
|
||||
exec_and_log "$COPY_COMMAND" "Error downloading $SRC"
|
||||
|
||||
SRC="$TMP_DIR/$IMAGE_HASH"
|
||||
;;
|
||||
|
||||
*)
|
||||
@@ -164,4 +166,8 @@ else
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -d "$TMP_DIR/$IMAGE_HASH" -a -n "$IMAGE_HASH" ]; then
|
||||
rm -rf "$TMP_DIR/$IMAGE_HASH" > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
echo "$DST"
|
||||
@@ -59,11 +59,11 @@ USE_SSH=$(get_tm_use_ssh $IMAGE_DS_NAME)
|
||||
if [ "$USE_SSH" != "yes" ]; then
|
||||
USERNAME=`echo $(cat $VMWARERC |grep ":username:"|cut -d":" -f 3|tr -d '"')`
|
||||
PASSWORD=`echo $(cat $VMWARERC |grep ":password:"|cut -d":" -f 3|tr -d '"')`
|
||||
DST_DIR_WITHOUT_DS_PATH="[$SYSTEM_DS_NAME]${DST_PATH##"$DS_DIR/$SYSTEM_DS_NAME/"}"
|
||||
if [ -z $PASSWORD ]; then
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password \"\""
|
||||
else
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password $PASSWORD"
|
||||
|
||||
if [ -z $PASSWORD ]; then
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password \"\""
|
||||
else
|
||||
VI_PARAMS="--server $DST_HOST --username $USERNAME --password $PASSWORD"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in new issue
Block a user