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

Handle ip changes #1446

Merged
merged 12 commits into from
Feb 3, 2024
Merged

Conversation

ivan-kripakov-m10
Copy link
Contributor

Pull request is associated with issue #1442

I made several things here:

  1. add server_lookup and pass it to raft transport layer to provide possibility for ip changing in cluster (id -> ip mapping is updated on serf events)
  2. add serf member update handling
  3. resolve todo Query each of the servers and make sure they report no Raft peers. (I'm not sure if it is correct approach)
  4. Avoid self removing from raft cluster in leader loop because it leads to raft shutdown (on both add [don't remove if server id matches, just update configuration] and remove peer [skip if server id matches with current])

I built image and tested it in k8s using this helm - distribworks/dkron-helm#7
Seems like everything works fine now

@vcastellm
Copy link
Member

vcastellm commented Jan 3, 2024

Thanks your this contribution, really appreciated, can you add a simple test file to cover server_lookup?

Also, can you switch base branch to https://github.com/distribworks/dkron/tree/4.x branch instead? we'll focus on that at this point.

@ivan-kripakov-m10
Copy link
Contributor Author

yes, sure
done

@fieldju-harness
Copy link

@vcastellm how is this PR looking?

I'm trying to get a sense of when this might get merged and also a rough idea of when 4.x is coming.

@vcastellm
Copy link
Member

I'm trying to get a sense of when this might get merged and also a rough idea of when 4.x is coming.

First v4 beta in the following hours

Copy link
Member

@vcastellm vcastellm left a comment

Choose a reason for hiding this comment

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

LGTM great job!

@vcastellm vcastellm merged commit 1c45fdf into distribworks:4.x Feb 3, 2024
1 check failed
vcastellm added a commit that referenced this pull request Oct 6, 2024
* Convert shell plugin to internal plugin (#975)

The purpose of this PR is to embed the shell plugin in the main dkron binary, that will facilitate creating a single binary with the most important executor, for easy deployment using a single binary.

* Remove old UI (#984)
* Release a light image tag (#988)

Omit all plugins except the shell plugin that will be included in the main binary.

* Upgrade react admin to v4 (#1436)

* Use exponential backoff for retries (#1433)

* Handle ip changes (#1446)
* consul like approach: add server_lookup to make dkron independent from server node IP on raft layer
* handle memberupdate event
* query other servers before start & add test
* don't remove itself if node is a raft leader
* don't remove dkron server node if id matches

* Move config init to agent command (#1465)

Config init was being done on the root level command but only the agent command was using config values.

Now config init is done as pre-run of agent command only, getting rid of extra messages in other commands when the config was missing.

* Fix disabled (#1467)
* Embed http plugin (#1471)

http plugin is one of the most used plugins together with the shell plugin, embedding it in the main binary allow for more lean deployment.

* Show all Job fields
* Refactor buttons for admin v4

* Docs v4 (#1473)

* Reuse http clients with the same configuration (#1474)
* Update OpenAPI spec to v3.1.0 and add ACLs spec
* Refactor location of types as they not only belong to plugins, but used in general. (#1485)

Also add Pro protobuf and gen code as this should be public.

* Generate client
* Extend protobuf defs for ACLs
* Token fields
* Minor improvement in RabbitMQ executor (#1500)
* nice and forkable goreleaser (#1584)
* add support for hash scheduling (#1260)
* feat: Login form and admin update (#1589)

Upgrade react-admin to v5
Implements a login form to use in Pro version

---------

Co-authored-by: Victor Castell <victor@victorcastell.com>
Co-authored-by: Ivan Kripakov <108407979+ivan-kripakov-m10@users.noreply.github.com>
Co-authored-by: Filipe Pina <636320+fopina@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants