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

enable static pv to create in dynamic way #1288

Merged
merged 41 commits into from
Mar 28, 2025

Conversation

badri-pathak
Copy link
Member

@badri-pathak badri-pathak commented Feb 12, 2025

Pull request checklist

  • This feature enables static provisioning within a dynamic provisioning framework, enhancing existing static provisioning capabilities to support additional CSI features such as expansion, snapshots, cloning, and restore for IBM Storage Scale.

This PR is related to the feature discussion at the issue https://github.ibm.com/IBMSpectrumScale/scale-core/issues/8017

Design Doc: Feature to provision a static pv in a dynamic way

Pull request type

Please check the type of change your PR introduces:

  • Bugfix
  • Feature Enhancement
  • Test Automation
  • Code Refactoring (no functional changes, no api changes)
  • Build related changes
  • Community Operator listing
  • Other (please describe):

What is the current behavior?

  • In the current behavior, With static provisioning, the cluster administrator has to manually provision the storage and create the persistent volume (PV) object followed by persistent volume claim (PVC) for thier application workload.

What is the new behavior?

  • Administrators use static provisioning in a dynamic volume provisioning to provides and shares access to preexisting data in IBM Storage Scale. With static provisioning in a dynamic provisioning, a cluster administrator only needs to create a storage class (or multiple storage classes) for a pre-exist data to get automatically mapped with new provisioned volume PV and created on-demand for each user's PVC request.

How risky is this change?

  • Small, isolated change
  • Medium, requires regression testing
  • Large, requires functional and regression testing

@badri-pathak
Copy link
Member Author

badri-pathak commented Feb 12, 2025

Image: quay.io/badri_pathak/ibm-spectrum-scale-csi-driver:staticpv_22

@badri-pathak badri-pathak added this to the v2.14.0 milestone Feb 12, 2025
@badri-pathak
Copy link
Member Author

badri-pathak commented Feb 14, 2025

image: quay.io/badri_pathak/ibm-spectrum-scale-csi-driver:staticpv_24

Signed-off-by: badri-pathak <[email protected]>
Signed-off-by: badri-pathak <[email protected]>
@badri-pathak
Copy link
Member Author

badri-pathak commented Feb 22, 2025

image: quay.io/badri_pathak/ibm-spectrum-scale-csi-driver:staticpv_25

Copy link
Member

@saurabhwani5 saurabhwani5 left a comment

Choose a reason for hiding this comment

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

Hi @badri-pathak , please have a look on issue 8396 in scale core

@badri-pathak
Copy link
Member Author

badri-pathak commented Mar 19, 2025

with volume attribute class support
driver image: quay.io/badri_pathak/ibm-spectrum-scale-csi-driver:staticpv_34

@badri-pathak
Copy link
Member Author

badri-pathak commented Mar 20, 2025

Image: quay.io/badri_pathak/ibm-spectrum-scale-csi-driver:staticpv_41

@badri-pathak
Copy link
Member Author

badri-pathak commented Mar 25, 2025

Image: quay.io/badri_pathak/ibm-spectrum-scale-csi-driver:staticpv_42

saurabhwani5
saurabhwani5 previously approved these changes Mar 27, 2025
Jainbrt
Jainbrt previously approved these changes Mar 27, 2025
@@ -413,7 +440,13 @@ func getScaleVolumeOptions(ctx context.Context, volOptions map[string]string) (*
scaleVol.NodeClass = nodeClass
}

if isCGSpecified {
if scaleVol.IsStaticPVBased {
Copy link
Member

Choose a reason for hiding this comment

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

if condition for static pv and else condition has the same code. can we combine it together

Copy link
Member Author

Choose a reason for hiding this comment

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

addressed the comment

@@ -2066,6 +2226,87 @@ func (cs *ScaleControllerServer) validateCloneRequest(ctx context.Context, scale
}
}

/* if sourcevolume.StorageClassType == STORAGECLASS_CLASSIC {
Copy link
Member

Choose a reason for hiding this comment

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

Is this commented code required?

Copy link
Member Author

Choose a reason for hiding this comment

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

removed the comments.

@badri-pathak badri-pathak dismissed stale reviews from Jainbrt and saurabhwani5 via 957f593 March 28, 2025 13:01
@badri-pathak
Copy link
Member Author

Image: quay.io/badri_pathak/ibm-spectrum-scale-csi-driver:staticpv_44

klog.Infof("[%s] ControllerModifyVolume: Modify filesetName:[ %s ] using VolumeAttributeClass is not allowed, so returning success \n", loggerId, filesetName)
return &csi.ControllerModifyVolumeResponse{}, nil
}
} else if volumeIDMembers.StorageClassType != STORAGECLASS_CACHE {
Copy link
Member

Choose a reason for hiding this comment

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

Need to correct the error msg as volume attribute class is supported for cache volumes

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@saurabhwani5 saurabhwani5 merged commit 09db274 into IBM:dev Mar 28, 2025
2 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.

4 participants