Repository navigation
fix: healthcheck reads the same config file and addresses as start.sh - #143
Conversation
Signed-off-by: Oleksandr Piskun <oleksandr2088@icloud.com>
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
3c0c8e92-f520-4a11-a3ff-359f1b1465af
📒 Files selected for processing: 1
healthcheck.sh
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.
healthcheck.shdoes not read the configuration the waystart.shdoes, so a working HaRP can stay unhealthy:/run/harp/haproxy.cfgwhenever that file exists, whilestart.shruns HAProxy with/haproxy.cfgwhenever that one exists. With/run/harpkept in a volume, a config generated on an earlier start is checked instead of/haproxy.cfg.start.shstrips surrounding quotes fromHP_FRP_ADDRESS,HP_EXAPPS_ADDRESSandHP_EXAPPS_HTTPS_ADDRESS(for example- HP_EXAPPS_ADDRESS="0.0.0.0:8780"in a compose file), but the healthcheck probes the quoted value, which never succeeds.Changes
healthcheck.shuses/haproxy.cfgwhen it exists and/run/harp/haproxy.cfgotherwise.healthcheck.shstrips surrounding quotes from the addresses before probing them, asstart.shdoes.