Page MenuHomeDevCentral

Add debug scripts for Vault, OVH, and VIP assignment
Needs ReviewPublic

Authored by yousra on Tue, Mar 31, 21:25.

Details

Summary

Add some useful debug scripts for Vault access, OVH connectivity, and VIP assignment checks

  • debug_test_vault.py
  • debug_test_ovh.py
  • debug_check_vip_ovh.py
Test Plan

On /usr/local/scripts/carp :

  • sudo python3 debug_test_vault.py to verify Vault authentication
  • sudo python3 debug_test_ovh.py to verify OVH API connectivity
  • sudo python3 debug_check_vip_ovh.py to check which router MAC currently holds the VIP on OVH

Diff Detail

Repository
rOPS Nasqueron Operations
Lint
Lint Skipped
Unit
No Test Coverage
Branch
debug-carp
Build Status
Buildable 6552
Build 6836: arc lint + arc unit

Event Timeline

yousra requested review of this revision.Tue, Mar 31, 21:25
yousra created this revision.
roles/router/carp/files/debug_check_vip_ovh.py
23

Should be provisioned by Salt.

We've two strategies for that.

(1) older strategy was to templatize Python scripts, ie treat this as Jinja templates

(2) newer strategy is usually to provision a YAML template with Salt, and keep this as a pure Python script reading that YAML

I've checked, PyYAML is installed on router role, so second strategy works:

dereckson in 🌐 router-002 in ~ 
❯ python3
Python 3.11.14 (main, Feb  7 2026, 01:06:44) [Clang 19.1.7 (https://github.com/llvm/llvm-project.git llvmorg-19.1.7-0-gcd7080 on freebsd15
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>>
roles/router/carp/init.sls
44

Don't put .py prefix

Put everything in {{ dirs.bin }}/ directly. That's the convention on UNIX machines.

Minor changes to the script names in init.sls