Format using nodeserver, not controller
This commit is contained in:
parent
f8bd74afb9
commit
1fe218a568
2 changed files with 3 additions and 8 deletions
|
@ -61,14 +61,6 @@ func (cs *controllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol
|
|||
}
|
||||
}
|
||||
|
||||
mounter, err := newMounter(volumeID, cs.s3.cfg)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := mounter.Format(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
glog.V(4).Infof("create volume %s", volumeID)
|
||||
s3Vol := s3Volume{}
|
||||
s3Vol.VolName = req.GetName()
|
||||
|
|
|
@ -82,6 +82,9 @@ func (ns *nodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := mounter.Format(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if err := mounter.Mount(targetPath); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue