Skip to content

Commit b7b6d0d

Browse files
committed
publish v0.5.28
Signed-off-by: Mayank Sachan <[email protected]>
1 parent 2cd05a2 commit b7b6d0d

File tree

4 files changed

+31
-12
lines changed

4 files changed

+31
-12
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717

1818
env:
1919
IS_LATEST_RELEASE: 'false'
20-
APP_VERSION: 0.5.27
20+
APP_VERSION: 0.5.28
2121

2222
steps:
2323
- name: Checkout Code
@@ -63,8 +63,8 @@ jobs:
6363
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.deb.tar.gz.sha256
6464
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.rpm.tar.gz
6565
/home/runner/work/ibm-object-csi-driver/ibm-object-csi-driver/cos-csi-mounter/cos-csi-mounter-${{ env.APP_VERSION }}.rpm.tar.gz.sha256
66-
tag_name: v0.5.27
67-
name: v0.5.27
66+
tag_name: v0.5.28
67+
name: v0.5.28
6868
body: Fix rclone timeout issue
6969
prerelease: ${{ env.IS_LATEST_RELEASE != 'true' }}
7070

cos-csi-mounter/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
NAME := cos-csi-mounter
2-
APP_VERSION := 0.5.27
2+
APP_VERSION := 0.5.28
33
BUILD_DIR := $(NAME)-$(APP_VERSION)
44
BIN_DIR := bin
55

cos-csi-mounter/server/rclone.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,11 @@ func (args RCloneArgs) PopulateArgsSlice(bucket, targetPath string) ([]string, e
5656
return nil, err
5757
}
5858

59+
// Delete log-file option from map
60+
if _, ok := m["log-file"]; ok {
61+
delete(m, "log-file")
62+
}
63+
5964
// Convert to key=value slice
6065
result := []string{"mount", bucket, targetPath}
6166
for k, v := range m {

pkg/mounter/utils/mounter_utils.go

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
package utils
55

66
import (
7-
"bytes"
87
"errors"
98
"fmt"
9+
"io"
1010
"os"
1111
"os/exec"
1212
"strings"
@@ -35,25 +35,39 @@ func (su *MounterOptsUtils) FuseMount(path string, comm string, args []string) e
3535
klog.Infof("FuseMount params:\n\tpath: <%s>\n\tcommand: <%s>\n\targs: <%v>", path, comm, args)
3636
cmd := command(comm, args...)
3737

38-
var outb, errb bytes.Buffer
39-
cmd.Stdout = &outb
40-
cmd.Stderr = &errb
38+
// Redirect stdout and stderr to avoid blocking pipes
39+
logFile, err := os.OpenFile("/var/log/rclone-manual.log",
40+
os.O_CREATE|os.O_RDWR|os.O_APPEND, 0644)
41+
if err != nil {
42+
return fmt.Errorf("FuseMount: failed to open log file: %v", err)
43+
}
44+
klog.Infof("FuseMount: rclone log file opened successfully for read & write. Log file: %s", "/var/log/rclone-manual.log")
45+
defer logFile.Close()
46+
47+
cmd.Stdout = logFile
48+
cmd.Stderr = logFile
4149

42-
err := cmd.Start()
50+
err = cmd.Start()
4351
if err != nil {
4452
klog.Errorf("FuseMount: command start failed: <%s>\nargs: <%v>\nerror: <%v>", comm, args, err)
4553
return fmt.Errorf("FuseMount: command start failed: <%s>\nerror: <%v>", comm, err)
4654
}
55+
klog.Infof("command 'start' succeeded for '%s' mounter", comm)
56+
4757
err = cmd.Wait()
4858
if err != nil {
4959
if mounted, err1 := isMountpoint(path); err1 == nil && mounted { // check if bucket already got mounted
5060
klog.Infof("bucket is already mounted using '%s' mounter", comm)
5161
return nil
5262
}
53-
klog.Errorf("FuseMount: command wait failed: <%s>\nargs: <%v>\nerr: <%v>\nstderr: <%s>\nstdout: <%s>", comm, args, err, errb.String(), outb.String())
54-
return fmt.Errorf("'%s' mount failed: %v (stderr: %s)", comm, err, errb.String())
63+
data, err := io.ReadAll(logFile)
64+
if err != nil {
65+
return fmt.Errorf("failed to read rclone log file content: %v", err)
66+
}
67+
klog.Errorf("FuseMount: command wait failed: <%s>\nargs: <%v>\nerr: <%v>\noutput: <%s>", comm, args, err, string(data))
68+
return fmt.Errorf("'%s' mount failed: %v (output: %s)", comm, err, string(data))
5569
}
56-
klog.Infof("mount command succeeded: mounter=%s, output=%s", comm, outb.String())
70+
klog.Infof("mount command succeeded for '%s' mounter", comm)
5771
if err := waitForMount(path, 10*time.Second); err != nil {
5872
klog.Errorf("mount succeeded but waiting for mountpoint failed: %v", err)
5973
return err

0 commit comments

Comments
 (0)