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

bond1 #57

Merged
merged 5 commits into from
Aug 8, 2022
Merged

bond1 #57

merged 5 commits into from
Aug 8, 2022

Conversation

nuclearbob
Copy link
Contributor

Set correct bond in interface files.

@nuclearbob nuclearbob marked this pull request as ready for review July 12, 2022 19:47
if self.ipv4pub:
# Only needed when a public ip is used, otherwise private ip is
# already set and no special routes are needed.
for bond in self.network.bonds.keys():
Copy link
Contributor

Choose a reason for hiding this comment

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

by default python loops through the keys. so you shouldn't need to use .keys()

)

if self.ipv4pub:
Copy link
Contributor

Choose a reason for hiding this comment

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

this should only be defined on the bond0 interface. otherwise it would define the public ip for both bond0 and bond1 which wouldn't work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Should I un-template these files and set them back to just bond0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess the better question, will they ever need to be a different bond in the future, or is it okay to just leave them at bond0?

Copy link
Contributor

Choose a reason for hiding this comment

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

i like that it supports multiple, i think just changing it to if bond == 'bond0' and self.ipv4pub and that should be good enough for now, maybe in the future we'll support more than just that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay, can do!

@nuclearbob
Copy link
Contributor Author

Thanks for the feedback! I'll work on fixes for both of those.

Copy link
Contributor

@mikemrm mikemrm left a comment

Choose a reason for hiding this comment

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

Think this looks good, Can you also test this on an existing plan with 2+ bonds?

I can see some future possible issues if we get rid of the if self.ipv4pub and bond == "bond0": where self.ipv4pub always points to the same ip. But that's not an issue in the current state and can be handled if that is ever changed.

@nuclearbob
Copy link
Contributor Author

Testing n2.xl here:
https://buildkite.com/equinix/smot/builds/443

@nuclearbob
Copy link
Contributor Author

Everything looks good except package manager on centos_8, but that breaks on a normal install too. Gonna land it!

@nuclearbob
Copy link
Contributor Author

Everything looks good except package manager on centos_8, but that's also broken on a normal install, I think some of the repos aren't up any more. Gonna merge.

@nuclearbob nuclearbob merged commit a6443a6 into master Aug 8, 2022
@nuclearbob nuclearbob deleted the bond1 branch August 8, 2022 15: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