Skip to content
This repository has been archived by the owner on Jul 26, 2024. It is now read-only.

GS doesn't check rsync is installed on remote host #53

Closed
bertiewils opened this issue Jul 9, 2020 · 4 comments · Fixed by #55
Closed

GS doesn't check rsync is installed on remote host #53

bertiewils opened this issue Jul 9, 2020 · 4 comments · Fixed by #55
Assignees
Labels
enhancement New feature or request

Comments

@bertiewils
Copy link

Describe the Issue
Rsync is required on both the hosts in order to function.
GS only checks it is installed on the local machine.

After running through the configuration rsync is installed on the local machine if needed, but running a test 'pull' resulted in the following for me;

bert@DNS2:~/gravity-sync $ ./gravity-sync.sh pull
[ INFO ] Gravity Sync 2.0.0 Executing
[  OK  ] Evaluating Arguments: PULL Requested
[  OK  ] Importing gravity-sync.conf Settings
[ INFO ] Targeting ansible@dns1.lan
[  OK  ] Validating SSH Client on DNS2.lan (OpenSSH)
[  OK  ] Validating RSYNC Installed on DNS2.lan
[  OK  ] Validating Gravity Sync Folders on DNS2.lan
[  OK  ] Validating Pi-hole Configuration on DNS2.lan
[ INFO ] Using SSH Key-Pair Authentication
[  OK  ] Validating Connection to dns1.lan
[  OK  ] Analyzing gravity.db on dns1.lan
[  OK  ] Analyzing gravity.db on DNS2.lan
[ WARN ] Differenced gravity.db Detected
[  OK  ] Analyzing custom.list on dns1.lan
[  OK  ] Analyzing custom.list on DNS2.lan
[ WARN ] Differenced custom.list Detected
[ WARN ] Replication Required
[  OK  ] Backing Up gravity.db on DNS2.lan
[ FAIL ] Pulling gravity.db from dns1.lan

After that fail I checked the logs but nothing had been written yet;

bert@DNS2:~/gravity-sync $ ./gravity-sync.sh logs
[ INFO ] Gravity Sync 2.0.0 Executing
[  OK  ] Evaluating Arguments: LOGS Requested
[  OK  ] Importing gravity-sync.conf Settings
[ INFO ] Targeting ansible@dns1.lan
[  OK  ] Validating SSH Client on DNS2.lan (OpenSSH)
[  OK  ] Validating RSYNC Installed on DNS2.lan
[ INFO ] Tailing /home/bert/gravity-sync/gravity-sync.log
========================================================
Recent Complete SMART Executions
tail: cannot open '/home/bert/gravity-sync/gravity-sync.log' for reading: No such file or directory
Recent Complete PULL Executions
tail: cannot open '/home/bert/gravity-sync/gravity-sync.log' for reading: No such file or directory
Recent Complete PUSH Executions
tail: cannot open '/home/bert/gravity-sync/gravity-sync.log' for reading: No such file or directory
Recent Complete RESTORE Executions
tail: cannot open '/home/bert/gravity-sync/gravity-sync.log' for reading: No such file or directory
========================================================
[ INFO ] Gravity Sync LOGS Aborting (0 seconds)

Manually installing rsync on the remote host resolved this.

It would be good during the configuration checks for GS to validate rsync is installed on the remote host, and have some error logging that indicates such issues.

Cheers

@vmstan
Copy link
Owner

vmstan commented Jul 9, 2020

Interesting. I’ll work on getting the check added during configuration. Curious, what distro are you running on the primary that doesn’t include it? Dietpi?

@vmstan vmstan self-assigned this Jul 9, 2020
@vmstan vmstan added the enhancement New feature or request label Jul 9, 2020
@bertiewils
Copy link
Author

bertiewils commented Jul 9, 2020

The primary is running plain old Debian 10 as a VM.

The secondary is DietPi.

@Panja0
Copy link

Panja0 commented Jul 9, 2020

I can confirm this was the case on my setup as well.

Debian 10 VM's on VMware ESXi.

@vmstan
Copy link
Owner

vmstan commented Jul 9, 2020

CleanShot 2020-07-09 at 10 11 14@2x

This will be on 2.0.2 coming shortly.

I couldn't get it to reliably remote run the hash command that I use to locally check if rsync is installed, so I just create a dummy file on the primary Pi-hole in the home directory, and then pull it over to the secondary, and then delete both of them.

@vmstan vmstan linked a pull request Jul 9, 2020 that will close this issue
@vmstan vmstan closed this as completed Jul 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants