mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
cephfs: ceph.conf is created in NodePublishVolume instead of CreateVolume
This commit is contained in:
parent
b6c3376961
commit
bf89151b87
@ -77,12 +77,6 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
|
||||
|
||||
volId := newVolumeIdentifier(volOptions, req)
|
||||
|
||||
conf := cephConfigData{Monitors: volOptions.Monitors}
|
||||
if err = conf.writeToFile(); err != nil {
|
||||
glog.Errorf("couldn't generate ceph.conf: %v", err)
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
// Create a volume in case the user didn't provide one
|
||||
|
||||
if volOptions.ProvisionVolume {
|
||||
|
@ -119,6 +119,12 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
conf := cephConfigData{Monitors: volOptions.Monitors, VolumeUuid: volUuid}
|
||||
if err = conf.writeToFile(); err != nil {
|
||||
glog.Errorf("couldn't generate ceph.conf: %v", err)
|
||||
return nil, status.Error(codes.Internal, err.Error())
|
||||
}
|
||||
|
||||
// Check if the volume is already mounted
|
||||
|
||||
isMnt, err := isMountPoint(targetPath)
|
||||
|
Loading…
Reference in New Issue
Block a user