1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-02-21 13:57:56 +03:00

feature-307: scp is the default probe sync method

This commit is contained in:
Jaime Melis 2010-08-30 18:14:07 +02:00
parent b953ffea36
commit bb3785d4e0
2 changed files with 6 additions and 3 deletions

View File

@ -47,7 +47,7 @@ export_rc_vars $DRIVERRC
# Go to var directory ONE_LOCATION/var or /var/lib/one
cd $VAR_LOCATION
LOG_FILE=$DRIVER_NAME
LOG_FILE=one_im_ssh_$DRIVER_NAME
# Execute the actual MAD
execute_mad $*

View File

@ -58,7 +58,11 @@ class InformationManager < OpenNebulaDriver
#---------------------------------------------------------------------------
def action_monitor(number, host, do_update)
if do_update == "1"
sync_cmd = "rsync -Laz #{REMOTES_LOCATION} #{host}:#{@remote_dir}"
# Use SCP to sync:
sync_cmd = "scp -r #{REMOTES_LOCATION}/. #{host}:#{@remote_dir}"
# Use rsync to sync:
# sync_cmd = "rsync -Laz #{REMOTES_LOCATION} #{host}:#{@remote_dir}"
LocalCommand.run(sync_cmd)
else
end
@ -86,6 +90,5 @@ remote_dir = ENV["IM_REMOTE_DIR"]
remote_dir = "/tmp/one" if !remote_dir
hypervisor = ARGV[0]||''
im = InformationManager.new(remote_dir, hypervisor, 15)
im.start_driver