add logging
This commit is contained in:
parent
bb16388537
commit
9155a07345
@ -25,11 +25,11 @@ func newMounter(bucketName string, filer string) (Mounter, error) {
|
|||||||
|
|
||||||
func fuseMount(path string, command string, args []string) error {
|
func fuseMount(path string, command string, args []string) error {
|
||||||
cmd := exec.Command(command, args...)
|
cmd := exec.Command(command, args...)
|
||||||
glog.V(3).Infof("Mounting fuse with command: %s and args: %s", command, args)
|
glog.V(0).Infof("Mounting fuse with command: %s and args: %s", command, args)
|
||||||
|
|
||||||
out, err := cmd.CombinedOutput()
|
out, err := cmd.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("Error fuseMount command: %s\nargs: %s\noutput: %s", command, args, out)
|
return fmt.Errorf("Error fuseMount command: %s\nargs: %s\noutput: %s\nerror: %v", command, args, out, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
return waitForMount(path, 10*time.Second)
|
return waitForMount(path, 10*time.Second)
|
||||||
|
|||||||
@ -24,7 +24,7 @@ func newSeaweedFsMounter(bucketName string, filer string) (Mounter, error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (seaweedFs *seaweedFsMounter) Mount(target string) error {
|
func (seaweedFs *seaweedFsMounter) Mount(target string) error {
|
||||||
glog.V(4).Infof("mounting %s%s to %s", seaweedFs.filerUrl, seaweedFs.bucketName, target)
|
glog.V(0).Infof("mounting %s%s to %s", seaweedFs.filerUrl, seaweedFs.bucketName, target)
|
||||||
|
|
||||||
args := []string{
|
args := []string{
|
||||||
"mount",
|
"mount",
|
||||||
|
|||||||
@ -25,7 +25,7 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
|||||||
// mount the fs here
|
// mount the fs here
|
||||||
targetPath := req.GetTargetPath()
|
targetPath := req.GetTargetPath()
|
||||||
|
|
||||||
glog.V(4).Infof("NodePublishVolume volume %s to %s", volumeID, targetPath)
|
glog.V(0).Infof("NodePublishVolume volume %s to %s", volumeID, targetPath)
|
||||||
|
|
||||||
// Check arguments
|
// Check arguments
|
||||||
if req.GetVolumeCapability() == nil {
|
if req.GetVolumeCapability() == nil {
|
||||||
@ -69,7 +69,7 @@ func (ns *NodeServer) NodePublishVolume(ctx context.Context, req *csi.NodePublis
|
|||||||
return nil, status.Error(codes.Internal, err.Error())
|
return nil, status.Error(codes.Internal, err.Error())
|
||||||
}
|
}
|
||||||
|
|
||||||
glog.V(4).Infof("volume %s successfully mounted to %s", volumeID, targetPath)
|
glog.V(0).Infof("volume %s successfully mounted to %s", volumeID, targetPath)
|
||||||
|
|
||||||
return &csi.NodePublishVolumeResponse{}, nil
|
return &csi.NodePublishVolumeResponse{}, nil
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user