mirror of
https://github.com/oracle/zfssa-csi-driver.git
synced 2025-06-28 06:26:55 +00:00
Add missing parameters to CreateFilesystem req so that the created FS can be mounted later
This commit is contained in:
parent
817778f1c6
commit
b7e0b32f24
@ -6,10 +6,10 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"github.com/oracle/zfssa-csi-driver/pkg/utils"
|
||||
"github.com/oracle/zfssa-csi-driver/pkg/zfssarest"
|
||||
"context"
|
||||
"github.com/container-storage-interface/spec/lib/go/csi"
|
||||
"github.com/oracle/zfssa-csi-driver/pkg/utils"
|
||||
"github.com/oracle/zfssa-csi-driver/pkg/zfssarest"
|
||||
context2 "golang.org/x/net/context"
|
||||
"google.golang.org/grpc/codes"
|
||||
"google.golang.org/grpc/status"
|
||||
@ -58,6 +58,16 @@ func (fs *zFilesystem) create(ctx context.Context, token *zfssarest.Token,
|
||||
capacityRange := req.GetCapacityRange()
|
||||
capabilities := req.GetVolumeCapabilities()
|
||||
|
||||
if _, ok := req.Parameters["restrictChown"]; !ok {
|
||||
utils.GetLogCTRL(ctx, 5).Println("Adding restrictChown to CreateFilesystem req parameters")
|
||||
req.Parameters["restrictChown"] = "false"
|
||||
}
|
||||
|
||||
if _, ok := req.Parameters["shareNFS"]; !ok {
|
||||
utils.GetLogCTRL(ctx, 5).Println("Adding shareNFS to CreateFilesystem req parameters")
|
||||
req.Parameters["shareNFS"] = "on"
|
||||
}
|
||||
|
||||
fsinfo, httpStatus, err := zfssarest.CreateFilesystem(ctx, token,
|
||||
req.GetName(), getVolumeSize(capacityRange), &req.Parameters)
|
||||
if err != nil {
|
||||
@ -168,7 +178,6 @@ func (lun *zFilesystem) clone(ctx context.Context, token *zfssarest.Token,
|
||||
}
|
||||
|
||||
// Publishes a file system. In this case there's nothing to do.
|
||||
//
|
||||
func (fs *zFilesystem) controllerPublishVolume(ctx context.Context, token *zfssarest.Token,
|
||||
req *csi.ControllerPublishVolumeRequest, nodeName string) (*csi.ControllerPublishVolumeResponse, error) {
|
||||
|
||||
@ -178,9 +187,7 @@ func (fs *zFilesystem) controllerPublishVolume(ctx context.Context, token *zfssa
|
||||
return &csi.ControllerPublishVolumeResponse{}, nil
|
||||
}
|
||||
|
||||
|
||||
// Unpublishes a file system. In this case there's nothing to do.
|
||||
//
|
||||
func (fs *zFilesystem) controllerUnpublishVolume(ctx context.Context, token *zfssarest.Token,
|
||||
req *csi.ControllerUnpublishVolumeRequest) (*csi.ControllerUnpublishVolumeResponse, error) {
|
||||
utils.GetLogCTRL(ctx, 5).Println("fs.controllerUnpublishVolume")
|
||||
|
Loading…
Reference in New Issue
Block a user