Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

E2E: advertise serf on secondary IP #16507

Open
2 tasks
tgross opened this issue Mar 15, 2023 · 0 comments
Open
2 tasks

E2E: advertise serf on secondary IP #16507

tgross opened this issue Mar 15, 2023 · 0 comments

Comments

@tgross
Copy link
Member

tgross commented Mar 15, 2023

While testing #16490 and #16217 I added a secondary network to our test infrastructure, but the Nomad configuration in our nightly tests doesn't use it by default. The secondary network doesn't get configured automatically by cloud-init either, so there's a little bit of infra work to do here on the machine image.

  • Update cloud-init in our packer build to do the equivalent of the following, based on the IP addresses we :
# find the IP address, there's probably a cloud-init native way to do this
mac=$(curl -s 'http://169.254.169.254/latest/meta-data/network/interfaces/macs/' | tail -1)
curl -s "http://169.254.169.254/latest/meta-data/network/interfaces/macs/$mac/local-ipv4s"

# set that address for the 2nd device
ip link set dev ens6 up
ip addr add 172.31.x.y dev ens6
ip route add 172.31.x.0/20 via 172.31.x.y

Edit: there seems to be something flaky where sometimes the NIC will get configured but not always. Probably a race during startup and attaching the NIC. That'll be something to debug or assert here.

addresses {
  serf = "{{ GetPrivateInterfaces | include \"network\" \"172.31.x.0/20\" | limit 1 | attr \"address\" }}"
}

advertise {
  serf = "{{ GetPrivateInterfaces | include \"network\" \"172.31.x.0/20\" | limit 1 | attr \"address\" }}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant