gravity-sync icon indicating copy to clipboard operation
gravity-sync copied to clipboard

CNAME syncing not pushing properly, pull works

Open blysik opened this issue 2 years ago โ€ข 5 comments
trafficstars

version 4.0.4, everything running properly, but DNS CNAMEs don't push:

โˆž Initializing Gravity Sync (4.0.4)
โœ“ Loading gravity-sync.conf
โœ“ Detecting local Pi-hole installation
โœ“ Detecting remote Pi-hole installation
โœ“ Gravity Sync remote peer is configured
โœ“ Evaluating arguments: PUSH
ยป Remote target user@ip
โœ“ Validating pathways to Pi-hole
โœ“ Validating pathways to DNSMASQ
โœ“ Hashing the remote Gravity Database
โœ“ Comparing to the local Gravity Database
โœ“ Hashing the remote DNS Records
โœ“ Comparing to the local DNS Records
! DNS CNAMEs not detected on the remote Pi-hole
! Static DHCP Addresses not detected on the local Pi-hole
! No replication is required at this time
โˆž Gravity Sync PUSH exited after 2 seconds

I manually added INCLUDE_CNAME to the conf:

# grep CNAME /etc/gravity-sync/gravity-sync.conf
INCLUDE_CNAME='1'

Everything else seems to sync fine. Ideas? Thanks.

blysik avatar Mar 15 '23 00:03 blysik

On a whim, I tried a pull from the other host, and that actually worked:

# gravity-sync pull
โˆž Initializing Gravity Sync (4.0.4)
โœ“ Loading gravity-sync.conf
โœ“ Detecting local Pi-hole installation
โœ“ Detecting remote Pi-hole installation
โœ“ Gravity Sync remote peer is configured
โœ“ Evaluating arguments: PULL
ยป Remote target user@ip
โœ“ Validating pathways to Pi-hole
โœ“ Validating pathways to DNSMASQ
โœ“ Hashing the remote Gravity Database
โœ“ Comparing to the local Gravity Database
โœ“ Hashing the remote DNS Records
โœ“ Comparing to the local DNS Records
! DNS CNAMEs has been detected on the remote Pi-hole
! DNS CNAMEs not detected on the local Pi-hole
! Static DHCP Addresses not detected on the local Pi-hole
! Replication of Pi-hole settings is required
โœ“ Performing backup of local Gravity Database
โœ“ Performing backup of remote Gravity Database
โœ“ Checking Gravity Database copy integrity
โœ“ Pulling the remote Gravity Database
โœ“ Replacing the local Gravity Database
โœ“ Setting file ownership on Gravity Database
โœ“ Setting file permissions on Gravity Database
โœ“ Performing backup of local DNS Records
โœ“ Performing backup of remote DNS Records
โœ“ Pulling the remote DNS Records
โœ“ Replacing the local DNS Records
โœ“ Setting file ownership on DNS Records
โœ“ Setting file permissions on DNS Records
! No local 05-pihole-custom-cname.conf detected
โœ“ Performing backup of remote DNS CNAMEs
โœ“ Pulling the remote DNS CNAMEs
โœ“ Replacing the local DNS CNAMEs
โœ“ Setting file ownership on DNS CNAMEs
โœ“ Setting file permissions on DNS CNAMEs
โœ“ Updating local FTLDNS configuration
โœ“ Reloading local FTLDNS services
โ€บ Performing replicator diagnostics
โœ“ Rehashing the remote Gravity Database
โœ“ Recomparing to local Gravity Database
โœ“ Rehashing the remote DNS Records
โœ“ Recomparing to local DNS Records
โœ“ Rehashing the remote DNS CNAMEs
โœ“ Recomparing to local DNS CNAMEs
! Static DHCP Addresses not detected on the local Pi-hole
โœ“ Saving updated data hashes
โœ“ Sending hashes to Gravity Sync peer
โœ“ Setting permissions on remote hashing files
โœ“ Logging successful PULL
โˆž Gravity Sync PULL completed after 22 seconds

blysik avatar Mar 15 '23 01:03 blysik

I observed the same behavior with static DHCP addresses: sync didn't work, but pull did. (I too am running version 4.0.4.)

brianroberg avatar Apr 11 '23 01:04 brianroberg

Can confirm on 4.0.4. Push host sees that CNAME is not in sync, but ignores it. Pull works fine. Quite a few possibilities, will take a stab a bit later - could be rsync, permissions, backup file etc.

zAAmpie avatar May 11 '23 20:05 zAAmpie

This PR might contain a fix for this issue. https://github.com/vmstan/gravity-sync/pull/384

I haven't checked any further than reading its description.

wblew avatar May 12 '23 01:05 wblew

Ah, you're right. Missed it because the PR has multiple independent changes. That said, if it only happens on initial push, it should work eventually using smart sync.

zAAmpie avatar May 13 '23 14:05 zAAmpie

Effective July 26, 2024, this project has been retired. Thank you for your use and enthusiasm for a project that began as a few lines of bash in a Slack channel and envolved into something far more complex, and used by many thousands of Pi-hole enthusiasts over the last four years.

vmstan avatar Jul 26 '24 18:07 vmstan