Skip to content

fix: respect pre-set BASE_NODE_P2P_ADVERTISE_IP in consensus-entrypoint#1150

Open
haileymarshall wants to merge 1 commit into
base:mainfrom
haileymarshall:fix/respect-preset-p2p-advertise-ip
Open

fix: respect pre-set BASE_NODE_P2P_ADVERTISE_IP in consensus-entrypoint#1150
haileymarshall wants to merge 1 commit into
base:mainfrom
haileymarshall:fix/respect-preset-p2p-advertise-ip

Conversation

@haileymarshall

Copy link
Copy Markdown

Fixes #1107

What changed?

consensus-entrypoint now only runs public IP discovery when BASE_NODE_P2P_ADVERTISE_IP is not already set. If the operator provided a value, the script logs it and uses it as-is. Behavior when the variable is unset is unchanged: discovery runs against the same four providers and a total failure still exits with code 8.

Why?

As reported in #1107, the script unconditionally called get_public_ip and then export BASE_NODE_P2P_ADVERTISE_IP=$PUBLIC_IP, which

  1. silently overwrote any advertise IP the operator configured (NAT/proxy setups where the routable IP differs from the egress IP), and
  2. made startup hard-fail with exit 8 on hosts with restricted egress to the four IP-echo services, even when the operator had already supplied the value discovery was meant to provide.

How has it been tested?

  • bash -n syntax check.
  • Exercised the guard with a stubbed curl in all three scenarios:
    • variable pre-set + discovery unreachable → keeps the operator value and continues (previously exit 8),
    • variable unset + discovery reachable → fetches and exports the discovered IP as before,
    • variable unset + discovery unreachable → still exits 8, unchanged.

@cb-heimdall

Copy link
Copy Markdown
Collaborator

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

consensus-entrypoint always overrides BASE_NODE_P2P_ADVERTISE_IP and exits if public IP discovery fails

2 participants