Replies: 3 comments 8 replies
-
@lovelaze should I have opened an issue instead? |
Beta Was this translation helpful? Give feedback.
-
Hi @tessus, I think this is a good place to discuss this.
Correct, you can call it a unidirectional "sync"/"push" from primary to replica(s)
Yes and no. You only need one instance of nebula sync, but it does not necessarily need to be installed on a Pi-hole host since it uses the API to communicate. It can be deployed separately.
I don't personally run keepalived for Pi-hole, but it sounds like you are over complicating it a bit. I would set it up similar to this:
This will make your DNS HA in the case of a Pi-hole failure with the caveat that you will need to only make configuration changes to the master Pi-hole host that nebula-sync uses to sync to the replicas. |
Beta Was this translation helpful? Give feedback.
-
Are you having failover that often? I have Keepalived configured as well but I have my primary PiHole configured in Nebula rather than the virtual IP and would check which PiHole I am making changes to but it pretty much only fails over when I am doing updates on the primary. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have 2 piholes in a keepalived cluster. Thus the primary might switch, but it seems that nebula-sync requires a fixed primary. I could use the virtual IP, but then I would have to use both nodes in the replicas config, which would mean that it syncs with itself. Thus this idea is out.
Having used gravity-sync before, nebula-sync's architecture is not yet clear to me. It seems to me that nebula-sync does not perform a sync, but rather a push to all replicas. Is this correct?
Do I install and run it only on the primary?
In a 2 way setup, this does not really matter that much, since a failover happens when the FTL process is dead, thus syncing (or pushing) won't work. Although it will be a problem, when the original primary comes back online.
But I was thinking of adding a 3rd one to the mix, in which case it starts to make more sense. However, if it is push-only architecture, I will run into issues (no matter how many nodes).
Scenario: primary goes offline, one of the 2 other members takes the primary role. First problem: the new primary does not know that it is the primary. I could script something and start nebula-sync on the new primary.
After a few days the original primary comes online. Second problem: nebula-sync is still running on one of the replicas. Third problem: nebula-sync is started on the original primary and pushes a days-old config to the replicas and wipes out all changes made during the time the original primary was offline.
As you can see, I am unsure how to run nebula-sync in a keepalived cluster.
My current setup syncs between the 2 nodes, no matter who the primary is. The latest changes are always applied to the other node.
I really would like to use nebula-sync in my 2 node setup, since gravity-sync throws a few errors now and then with pihole 6.
Any pointers, ideas, dark magic?
Beta Was this translation helpful? Give feedback.
All reactions