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

IP float via APIs instead of ARP? #97

Open
gregfr opened this issue Aug 24, 2020 · 7 comments
Open

IP float via APIs instead of ARP? #97

gregfr opened this issue Aug 24, 2020 · 7 comments

Comments

@gregfr
Copy link

gregfr commented Aug 24, 2020

Greetings
Could this project allow to move a floating fail over IP with an IP call instead of a local ARP burst?
Thanks in advance
Regards

@johnsudaar
Copy link

Just to be sure i understand your request correctly what you'd want is to:

  • Disable gratuitous ARP requests
  • Let LinK notify another sofware component (via webhook or something else) when an IP should be routed on a new host ?

@EtienneM
Copy link
Member

@gregfr can you confirm or clarify your issue? So that we can investigate how and if we want to achieve this

@gregfr
Copy link
Author

gregfr commented Aug 25, 2021

Sorry I totally forgot about that, but my need is still there.

That's exactly how you said: calling the datacenter API to have them correctly route the IP.

Regards

johnsudaar pushed a commit that referenced this issue Aug 28, 2021
…the NIC

* Add NoNetwork option that prevent any Gratuitous ARP burst and the addition/removal of the IP on the NIC
* Add the update command on the link client that let's user customize VIP options

This is a first step toward #97 a next step would be to implements hooks on the FAILING, STANDBY and ACTIVATED state
@johnsudaar
Copy link

johnsudaar commented Aug 30, 2021

I guess that's something that we could do pretty easily. I think that we could do that in a 2 step plan:

  1. Add an option to disable any operation on the NIC (gARP and IP assignation)
  2. Add Hooks on the STANDBY, MASTER and FAILING state of a VIP

For step 2. even if we technically should integrate some major providers APIs to make ENI switch host it sounds like an integration hell, every provider has its own quirks and every user might want to use that API differently.
I think that we should instead provide a simpler API on LinK and let the API calls implementation to the user. So hooks would just call an arbitrary binary on the filesystem (path provided by the user).

The call would then pass 3 args:

  • The ID of the VIP (vip-aaaa-bbbbb-cccc-dddd)
  • The IP adresse concerned (with mask) (10.0.0.1/32)
  • The current state of the IP (STANDBY, MASTER, FAILING)
  • The previous state of the IP (STANDBY, MASTER, FAILING)

Both the stdin and stderr of the script should be redirected to LinK logs and the script should have an execution timeout (configurable via the environment).

What do you think @EtienneM @gregfr ?

Edit: Add the previous state of the IP after @EtienneM suggestion.

@EtienneM
Copy link
Member

Thanks @johnsudaar for the explanation of how we could handle it. The plan looks good to me but I would wait for @gregfr inputs before proceeding with it. Just to make sure it fits his needs.

Just a question about the arguments provided to the hook script. Don't we want to also provide the previous state? There may be some cases someone wants to know this information

@johnsudaar
Copy link

I agree. We could add it as 4th argument.

@gregfr
Copy link
Author

gregfr commented Sep 22, 2021

@johnsudaar thanks a lot for the followup :D
That would be great to have that hook system 👍
On the top of my head, it would be nice to allow a custom parameter (like some ID of the IPFO in the hosting scheme) to allow a more generic hook to be written (especially if some hooks are provided by the Project, there should be provider-specific parameters).

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

No branches or pull requests

3 participants