Many changes:
- Improved script structure by separating configuration, helper functions, main function and application entry point.
Many changes:
carp-ovh logs were written both to /var/log/messages and /var/log/carp.log.
This change redirects them only to /var/log/carp.log by excluding them from /var/log/messages.
Apr 1 14:03:22 router-002 kernel: carp: 2@vmx1: MASTER -> BACKUP (more frequent advertisement received) Apr 1 14:03:22 router-002 kernel: in_scrubprefix: err=65, prefix delete failed Apr 1 14:03:22 router-002 carp-ovh[98074]: Not MASTER -> exit
In D4035#63113, @dereckson wrote:OK with pillarize too?
OK with pillarize too?
Minor changes to the script names in init.sls
If we're going to flood /var/log/messages with carp debug information, perhaps should we create a separate log topic, but that can be another change. I've created T2292.
Fix the path of the script : /usr/local/scripts/carp/carp-ovh.py
Fix the path of the parameter action : /usr/local/scripts/carp/carp-ovh-switch.sh
removed white lline
Apr 1 14:01:39 router-002 kernel: carp: 2@vmx1: BACKUP -> MASTER (master timed out) Apr 1 14:01:39 router-002 carp-ovh[98049]: Detected MAC on vmx1: 00:50:56:09:3c:f2 Apr 1 14:01:39 router-002 carp-ovh[98053]: Checking current state... Apr 1 14:01:39 router-002 carp-ovh[98057]: Checking IPs for MAC 00:50:56:09:3c:f2 Apr 1 14:01:39 router-002 carp-ovh[98061]: OVH returned: ['178.32.70.110', '51.68.252.230'] Apr 1 14:01:39 router-002 carp-ovh[98065]: VIP is already on correct MAC -> nothing to do
When router-003 (The MASTER) become unavailable :
repair branch
Enable rotation of Vault AppRole credentials on CARP routers
Configuration deployed and running on router-002/router-003 and WindRiver
Tested locally with ripgrep. Configuration files like .arcconfig are now correctly included in search results !
I tested the Docker image locally and the image builds, the container starts correctly, and the test suite runs inside it.