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

Min Pinners #17

Merged
merged 7 commits into from
May 17, 2022
Merged

Min Pinners #17

merged 7 commits into from
May 17, 2022

Conversation

ro-tex
Copy link
Collaborator

@ro-tex ro-tex commented May 11, 2022

PULL REQUEST

Overview

Add a cluster-wide configuration field defining the minimum number of pinners we want.
In the process of doing that, this PR also defines a DB collection for cluster-wide configuration values and a generic way for getting those.

Example for Visual Changes

Checklist

Review and complete the checklist to ensure that the PR is complete before assigned to an approver.

  • All new methods or updated methods have clear docstrings
  • Testing added or updated for new methods
  • Verify if any changes impact the WebPortal Health Checks
  • Approriate documentation updated
  • Changelog file created

Issues Closed

Closes #8
Closes SKY-279

@ro-tex ro-tex self-assigned this May 11, 2022
@ro-tex ro-tex marked this pull request as ready for review May 11, 2022 09:41
@linear
Copy link

linear bot commented May 11, 2022

SKY-279 Cluster-wide setting for underpinned threshold

we should make the underpinned value an environment variable so that we can increase/decrease the redundancy easily.

Originally posted by @MSevey in https://github.com/SkynetLabs/pinner/pull/2#discussion_r856472538

Proposal

As we want this to be a cluster-wide setting, we cannot use an environment variable for it because each server will have its own value and they will need to do a complicated negotiation in order to decide on a common, cluster-wide number.

That's why we should add a configuration or settings collection in Mongo and use that to store all cluster-wide settings, similar to what we do in accounts when we need to disable registrations on a given cluster.

GitHub: #8

@ro-tex ro-tex enabled auto-merge May 11, 2022 09:48
MSevey
MSevey previously approved these changes May 11, 2022
ChrisSchinnerl
ChrisSchinnerl previously approved these changes May 12, 2022
conf/configuration.go Outdated Show resolved Hide resolved
workers/scanner.go Show resolved Hide resolved
@ro-tex ro-tex requested a review from MSevey May 12, 2022 09:53
# Conflicts:
#	workers/scanner.go
MSevey
MSevey previously approved these changes May 13, 2022
# Conflicts:
#	workers/scanner.go
@ro-tex ro-tex requested a review from MSevey May 16, 2022 07:44
@ro-tex ro-tex merged commit 0714c2a into main May 17, 2022
@ro-tex ro-tex deleted the ivo/min_pinners branch May 17, 2022 07:09
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.

SKY-279 Cluster-wide setting for underpinned threshold
3 participants