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

Allow user to specify which broadcast IP to use for meshage #1458

Merged
merged 1 commit into from
Jan 11, 2022

Conversation

activeshadow
Copy link
Contributor

In some cases, cluster compute nodes have multiple interfaces and
networks they can communicate with each other over, and one may be
desirable over another for meshage comms. By default, minimega uses
255.255.255.255 as the broadcast address, and when multiple interfaces
are present, the one acting as the default route is the one used.

This commit adds a new command line option, -broadcast, for users to
specify which broadcast IP to use for the mesh. It defaults to
255.255.255.255, so this commit should be backwards compatible.

In some cases, cluster compute nodes have multiple interfaces and
networks they can communicate with each other over, and one may be
desirable over another for meshage comms. By default, minimega uses
`255.255.255.255` as the broadcast address, and when multiple interfaces
are present, the one acting as the default route is the one used.

This commit adds a new command line option, `-broadcast`, for users to
specify which broadcast IP to use for the mesh. It defaults to
`255.255.255.255`, so this commit should be backwards compatible.
@aherna aherna self-requested a review August 23, 2021 17:43
@aherna aherna self-assigned this Aug 23, 2021
@activeshadow
Copy link
Contributor Author

@aherna anymore thoughts on this? It doesn't break normal, default behavior (i.e., it's backwards compatible) so I'm hoping you will be amenable to merging it in.

@aherna
Copy link
Contributor

aherna commented Dec 29, 2021

@activeshadow Havent tested the with latest changes. Is this urgent or can it wait til new year?

@activeshadow
Copy link
Contributor Author

@aherna it can most definitely wait.

@activeshadow
Copy link
Contributor Author

Hi @aherna just wanted to ping you on this again.

Copy link
Contributor

@aherna aherna left a comment

Choose a reason for hiding this comment

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

LGTM

func meshageStart(host, namespace string, degree, msaTimeout uint, broadcastIP string, port int) error {
bip := net.ParseIP(broadcastIP)
if bip == nil {
return fmt.Errorf("invalid broadcast IP %s for meshage", broadcastIP)
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be more appropriate to state that the broadcastIP is an invalid IP as its invalid because it failed to parse vs its not the right IP for meshage? @activeshadow

f_base = flag.String("base", BASE_PATH, "base path for minimega data")
f_degree = flag.Uint("degree", 0, "meshage starting degree")
f_msaTimeout = flag.Uint("msa", 10, "meshage MSA timeout")
f_broadcastIP = flag.String("broadcast", "255.255.255.255", "meshage broadcast address to use")
Copy link
Contributor

Choose a reason for hiding this comment

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

Whats the use case here? A user can dial by specific IP or hostname to reach another Minimega instance and create a mesh. ie mesh dial

@activeshadow

@aherna aherna merged commit c80bd73 into sandia-minimega:master Jan 11, 2022
@activeshadow activeshadow deleted the meshage branch January 13, 2022 13:26
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.

2 participants