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

feat(rwx): share manager locality #2716

Merged
merged 3 commits into from
Apr 10, 2024
Merged

Conversation

derekbit
Copy link
Member

@derekbit derekbit commented Apr 2, 2024

Which issue(s) this PR fixes:

Issue longhorn/longhorn#7872

What this PR does / why we need it:

  • Share manager pod respects the newly introduced storageClass.Parameters["shareManagerNodeSelector"]
  • Share manager pod respects the storageClass.allowedTopologies which are internally converted to the affinity of a share manager pod
  • Share manager pod respects the newly introduced storageClass.Parameters["shareManagerTolerations"]

Special notes for your reviewer:

Additional documentation or context

@derekbit derekbit changed the title feat(rwx): share manager pod respect the newly introduced storageClass.Parameters["shareManagerNodeSelector"] feat(rwx): share manager pod respects the newly introduced storageClass.Parameters["shareManagerNodeSelector"] Apr 2, 2024
@derekbit derekbit changed the title feat(rwx): share manager pod respects the newly introduced storageClass.Parameters["shareManagerNodeSelector"] feat(rwx): share manager locality Apr 2, 2024
@derekbit derekbit marked this pull request as ready for review April 2, 2024 12:42
@derekbit derekbit marked this pull request as draft April 3, 2024 05:35
@derekbit derekbit marked this pull request as ready for review April 3, 2024 05:59
controller/share_manager_controller.go Show resolved Hide resolved
controller/share_manager_controller.go Outdated Show resolved Hide resolved
controller/share_manager_controller.go Show resolved Hide resolved
Copy link
Contributor

@james-munson james-munson left a comment

Choose a reason for hiding this comment

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

No other questions than Shuo's.
Well, maybe one. Does any of these settings merit a global Settings value?

shuo-wu
shuo-wu previously approved these changes Apr 8, 2024
Copy link
Contributor

@shuo-wu shuo-wu left a comment

Choose a reason for hiding this comment

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

LGTM

controller/share_manager_controller.go Outdated Show resolved Hide resolved
…ss.Parameters["shareManagerNodeSelector"]

The commit introduces an enhancement for specifying the locality of a Read-Write-Many (RWX)
volume and its associated Share Manager Pod within the Longhorn storage system. Previously,
an RWX volume and its Share Manager Pod were created randomly on any node within the Longhorn
cluster, without the ability for users to specify a preferred locality.

Longhorn 7872

Signed-off-by: Derek Su <derek.su@suse.com>
In the Longhorn storage system, a share manager pod of a rwx volume is created on a random node.
The purpose of this update is to enhance the locality of an RWX volume and its share manager pod.
It accomplishes this by converting the storageClass.allowedTopologies setting into an affinity
configuration for the share manager pod. As a result, both the pod and the RWX volume respect
this affinity, ensuring their allocation to an optimal node.

Longhorn 7872

Signed-off-by: Derek Su <derek.su@suse.com>
…ss.Parameters["shareManagerTolerations"]

Share manager pod respects the newly introduced storageClass.Parameters["shareManagerTolerations"].
The tolerations are merged with the global setting taint-toleration and are applied to share manager pod.

Longhron 7872

Signed-off-by: Derek Su <derek.su@suse.com>
@derekbit
Copy link
Member Author

cc @shuo-wu @PhanLe1010 @james-munson @innobead for review and approval. Thank you.

Copy link
Contributor

@james-munson james-munson left a comment

Choose a reason for hiding this comment

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

Looks good. There will need to be documentation for how to use it effectively.

@derekbit derekbit merged commit e36aaf6 into longhorn:master Apr 10, 2024
5 checks passed
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.

3 participants