mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-10 00:10:20 +00:00
cephfs: add stderr to mount function errors
This commit appends stderr to error in both kernel and ceph-fuse mounter functions to better be able to debug errors. Signed-off-by: Rakshith R <rar@redhat.com>
This commit is contained in:
parent
62ae17e263
commit
fb7389f478
@ -168,7 +168,7 @@ func mountFuse(ctx context.Context, mountPoint string, cr *util.Credentials, vol
|
||||
|
||||
_, stderr, err := util.ExecCommand(ctx, "ceph-fuse", args[:]...)
|
||||
if err != nil {
|
||||
return err
|
||||
return fmt.Errorf("%w stderr: %s", err, stderr)
|
||||
}
|
||||
|
||||
// Parse the output:
|
||||
@ -227,7 +227,11 @@ func mountKernel(ctx context.Context, mountPoint string, cr *util.Credentials, v
|
||||
|
||||
args = append(args, "-o", optionsStr)
|
||||
|
||||
return execCommandErr(ctx, "mount", args[:]...)
|
||||
_, stderr, err := util.ExecCommand(ctx, "mount", args[:]...)
|
||||
if err != nil {
|
||||
return fmt.Errorf("%w stderr: %s", err, stderr)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
func (m *kernelMounter) mount(ctx context.Context, mountPoint string, cr *util.Credentials, volOptions *volumeOptions) error {
|
||||
|
Loading…
Reference in New Issue
Block a user