mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Include mount command in Kubelet mounter output
This commit is contained in:
parent
f819cada9c
commit
dba917c5b7
@ -101,15 +101,15 @@ func isBind(options []string) (bool, []string) {
|
|||||||
|
|
||||||
// doMount runs the mount command.
|
// doMount runs the mount command.
|
||||||
func doMount(mountCmd string, source string, target string, fstype string, options []string) error {
|
func doMount(mountCmd string, source string, target string, fstype string, options []string) error {
|
||||||
glog.V(5).Infof("Mounting %s %s %s %v", source, target, fstype, options)
|
glog.V(5).Infof("Mounting %s %s %s %v with command: %q", source, target, fstype, options, mountCmd)
|
||||||
mountArgs := makeMountArgs(source, target, fstype, options)
|
mountArgs := makeMountArgs(source, target, fstype, options)
|
||||||
|
|
||||||
command := exec.Command(mountCmd, mountArgs...)
|
command := exec.Command(mountCmd, mountArgs...)
|
||||||
output, err := command.CombinedOutput()
|
output, err := command.CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
glog.Errorf("Mount failed: %v\nMounting arguments: %s %s %s %v\nOutput: %s\n", err, source, target, fstype, options, string(output))
|
glog.Errorf("Mount failed: %v\nMounting command: %s\nMounting arguments: %s %s %s %v\nOutput: %s\n", err, mountCmd, source, target, fstype, options, string(output))
|
||||||
return fmt.Errorf("mount failed: %v\nMounting arguments: %s %s %s %v\nOutput: %s\n",
|
return fmt.Errorf("mount failed: %v\nMounting command: %s\nMounting arguments: %s %s %s %v\nOutput: %s\n",
|
||||||
err, source, target, fstype, options, string(output))
|
err, mountCmd, source, target, fstype, options, string(output))
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user