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

[sled-agent] avoid using hardcoded port number to reach MGS #6430

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

iximeow
Copy link
Member

@iximeow iximeow commented Aug 24, 2024

this is one (and the easiest) of three cases i noted in #6363 where we find a service by looking up a SRV record, ignoring the port in that record, keeping IPs from that SRV lookup, and then finally pairing those addresses with a service's hardcoded port.

in this case, we were looking up the SRV record for Dendrite, then using the MGS port instead. this this technically works, because the two will be running together, but we can just get the right port from the get-go by looking for MGS's SRV record instead. so, do that.

this file also mentions MGS_PORT in init_switch_config, at which point it's more necessary: in that case, we're configuring our switch zone. so we know the address we want to reach - it's our own sled - and we just need to add the port of the service we want.

this is one (and the easiest) of three cases i noted in #6363 where we
find a service by looking up a SRV record, ignoring the port in that
record, keeping IPs from that SRV lookup, and then finally pairing those
addresses with a service's hardcoded port.

in this case, we were looking up the SRV record for Dendrite, then using
the MGS port instead. this this technically works, because the two
*will* be running together, but we can just get the right port from the
get-go by looking for MGS's SRV record instead. so, do that.

this file also mentions MGS_PORT in `init_switch_config`, at which point
it's more necessary: in that case, we're configuring *our* switch zone.
so we *know* the address we want to reach - it's our own sled - and we
just need to add the port of the service we want.
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like the right thing to me!

@davepacheco
Copy link
Collaborator

We should make sure that these DNS records exist on all the usual production and pre-production systems (dogfood, rack3, customer systems). I might be confusing the MGS case with the MGD case but at least in the MGD case there was a long period where only new systems had the DNS records. There's some more detail in #6077 and some issues linked to that one. I think by now we've successfully executed a blueprint on all of these systems and so there should be consistent DNS records everywhere but may be worth double checking?

@iximeow
Copy link
Member Author

iximeow commented Aug 24, 2024

yes, definitely worth double-checking. iiuc at this point there's no reason this should be in R10, so i think we can be even more confident this won't have an issue when it goes out. but i also hadn't realized that the fact these records exist early enough would be relatively recent, so i'd like to understand better before merging.

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.

3 participants