Bug #2546

Wrong rsync URL for onehost sync --rsync

Added by Daniel Dehennin over 6 years ago. Updated about 6 years ago.

Status:ClosedStart date:12/08/2013
Priority:NormalDue date:
Assignee:Javi Fontan% Done:

0%

Category:CLI
Target version:Release 4.6
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.4

Description

Hello,

I just tried the onehost sync --rsync as described in the documentation but the path seems to be wrong.

On a single node nebula:

# Clean everything
oneadmin@nebula:~$ rm -rf /var/tmp/one
oneadmin@nebula:~$ onehost sync --rsync
oneadmin@nebula:~$ ls -l /var/tmp/one/
total 0
drwxr-xr-x 1 oneadmin oneadmin 152 Dec.   5 20:08 remotes
oneadmin@nebula:~$ onehost sync --force
oneadmin@nebula:~$ ls -l /var/tmp/one/
total 24
-rw-r--r-- 1 oneadmin oneadmin     5 Nov 27 19:39 VERSION
drwxr-xr-x 1 oneadmin oneadmin    90 Sep  8 12:11 auth
drwxr-xr-x 1 oneadmin oneadmin    94 Dec  5 20:00 datastore
drwxr-xr-x 1 oneadmin oneadmin     4 Sep  8 12:11 hooks
drwxr-xr-x 1 oneadmin oneadmin   178 Dec  5 20:00 im
drwxr-xr-x 1 oneadmin oneadmin   152 Dec  5 20:08 remotes
-rw-r--r-- 1 oneadmin oneadmin  2827 Nov 27 19:39 scripts_common.rb
-rw-r--r-- 1 oneadmin oneadmin 12566 Nov 27 19:39 scripts_common.sh
drwxr-xr-x 1 oneadmin oneadmin    96 Dec  5 20:00 tm
drwxr-xr-x 1 oneadmin oneadmin    40 Dec  5 20:00 vmm
drwxr-xr-x 1 oneadmin oneadmin   198 Dec  5 20:00 vnm

The URL used for --rsync should take care to not recreate the remotes/ under /var/tmp.

Regards.

Associated revisions

Revision 7f409c7b
Added by Javi Fontan about 6 years ago

bug #2546: fix bug with remotes rsync copy

Revision eb0c71b8
Added by Javi Fontan about 6 years ago

bug #2546: fix bug with remotes rsync copy

(cherry picked from commit 7f409c7b7c14e2ded91a6ea040c940861cc3773e)

History

#1 Updated by Ruben S. Montero over 6 years ago

  • Category set to CLI
  • Status changed from Pending to New
  • Target version set to Release 4.6

#2 Updated by Javi Fontan about 6 years ago

I'm trying to reproduce it but works correctly here. Tried in both MacOS X and CentOS 6.5. What is your distribution and rsync version?

Here I have:

rsync version 3.0.6 protocol version 30

#3 Updated by Javi Fontan about 6 years ago

  • Assignee set to Javi Fontan

#4 Updated by Daniel Dehennin about 6 years ago

I have:

oneadmin@nebula:~$ rsync --version
rsync  version 3.1.0  protocol version 31

My ONE installation is on a Debian Jessie.

The directory /var/tmp/one/remotes is created when running the onehost sync --rsync.

oneadmin@nebula:~$ echo '# Test rsync option' >> /var/lib/one/remotes/vmm/kvm/kvmrc
oneadmin@nebula:~$ onehost sync --rsync --force
* Adding nebula to upgrade
[========================================] 1/1 nebula                  
All hosts updated successfully.
oneadmin@nebula:~$ rgrep '^# Test rsync option' /var/tmp/one/
/var/tmp/one/remotes/vmm/kvm/kvmrc:# Test rsync option

So making some changes in /var/lib/one/remotes/ never get used when using the --rsync option since the file is copied under /var/tmp/one/remotes/ instead of /var/tmp/one/.

Regards.

#5 Updated by Javi Fontan about 6 years ago

There is a bug in onehost command. Change /usr/bin/onehost line 23 from:

    REMOTES_LOCATION="/var/lib/one/remotes" 

to
    REMOTES_LOCATION="/var/lib/one/remotes/" 

#6 Updated by Javi Fontan about 6 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF