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

Leader election using locks #649

Merged
merged 23 commits into from
Sep 15, 2023
Merged

Leader election using locks #649

merged 23 commits into from
Sep 15, 2023

Conversation

Juanadelacuesta
Copy link
Member

@Juanadelacuesta Juanadelacuesta commented Jun 28, 2023

Add mechanism to run on high availability by using a lock to maintain the synchrony among instances. Currently is a free standing package that depends on the future implementation of the lock CLI on nomad.

It is still pending on exposing some metrics and error handling

For more information, refer to the RFC: [NMD-179] Leader election using locking mechanism for the Autoscaler

@Juanadelacuesta Juanadelacuesta changed the title F gh 17449 Leader election using locks Jul 3, 2023
@Juanadelacuesta Juanadelacuesta marked this pull request as ready for review July 3, 2023 11:42
ha/lock.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
Copy link
Contributor

@lgfa29 lgfa29 left a comment

Choose a reason for hiding this comment

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

Looking great! Excited to see where this is going 😄

I think the tests not running in CI is the biggest blocker, most of the comments are me trying to understand stuff 😬

ha/lock.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock_test.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock_test.go Outdated Show resolved Hide resolved
ha/lock.go Outdated Show resolved Hide resolved
ha/lock_test.go Outdated Show resolved Hide resolved
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

Looking good and most of my comments are around UX and style, so we can catch in Slack if that's easier than GitHub :D

It would also be nice to add some tests to cover the new config parsing addition.

agent/agent.go Outdated Show resolved Hide resolved
agent/config/config.go Outdated Show resolved Hide resolved
agent/config/config.go Outdated Show resolved Hide resolved
command/agent.go Outdated Show resolved Hide resolved
command/agent.go Outdated Show resolved Hide resolved
command/agent.go Outdated Show resolved Hide resolved
command/agent.go Outdated Show resolved Hide resolved
agent/config/config.go Outdated Show resolved Hide resolved
Copy link
Member

@jrasell jrasell left a comment

Choose a reason for hiding this comment

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

Approving, with a final few questions.

@Juanadelacuesta Juanadelacuesta merged commit edb3175 into main Sep 15, 2023
23 checks passed
@Juanadelacuesta Juanadelacuesta deleted the f-gh-17449 branch September 15, 2023 17:14
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.

None yet

4 participants