Format using nodeserver, not controller

This commit is contained in:
Cyrill Troxler 2018-07-26 20:13:40 +02:00
parent f8bd74afb9
commit 1fe218a568
2 changed files with 3 additions and 8 deletions

View file

@ -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()

View file

@ -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
}