CSI: Snapshot volume create should use vol.Secrets (#10840)

Signed-off-by: Grant Griffiths <ggriffiths@purestorage.com>
This commit is contained in:
Grant Griffiths 2021-07-02 05:28:22 -07:00 committed by GitHub
parent db96e40f3a
commit 7f8e285559
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

3
.changelog/10840.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
csi: Fixed a bug where volume secrets were not used for creating snapshots.
```

View File

@ -1124,7 +1124,7 @@ func (v *CSIVolume) CreateSnapshot(args *structs.CSISnapshotCreateRequest, reply
cReq := &cstructs.ClientCSIControllerCreateSnapshotRequest{ cReq := &cstructs.ClientCSIControllerCreateSnapshotRequest{
ExternalSourceVolumeID: vol.ExternalID, ExternalSourceVolumeID: vol.ExternalID,
Name: snap.Name, Name: snap.Name,
Secrets: snap.Secrets, Secrets: vol.Secrets,
Parameters: snap.Parameters, Parameters: snap.Parameters,
} }
cReq.PluginID = plugin.ID cReq.PluginID = plugin.ID