mirror of https://github.com/k3s-io/k3s
Improve error reporting when flex driver has failed to initialize.
parent
0cff839317
commit
ec12e6cc9d
|
@ -143,7 +143,7 @@ func (dc *DriverCall) Run() (*DriverStatus, error) {
|
|||
if isCmdNotSupportedErr(err) {
|
||||
dc.plugin.unsupported(dc.Command)
|
||||
} else {
|
||||
glog.Warningf("FlexVolume: driver call failed: executable: %s, args: %s, error: %s, output: %s", execPath, dc.args, execErr.Error(), output)
|
||||
glog.Warningf("FlexVolume: driver call failed: executable: %s, args: %s, error: %s, output: %q", execPath, dc.args, execErr.Error(), output)
|
||||
}
|
||||
return nil, err
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ func isCmdNotSupportedErr(err error) bool {
|
|||
func handleCmdResponse(cmd string, output []byte) (*DriverStatus, error) {
|
||||
var status DriverStatus
|
||||
if err := json.Unmarshal(output, &status); err != nil {
|
||||
glog.Errorf("Failed to unmarshal output for command: %s, output: %s, error: %s", cmd, string(output), err.Error())
|
||||
glog.Errorf("Failed to unmarshal output for command: %s, output: %q, error: %s", cmd, string(output), err.Error())
|
||||
return nil, err
|
||||
} else if status.Status == StatusNotSupported {
|
||||
glog.V(5).Infof("%s command is not supported by the driver", cmd)
|
||||
|
|
|
@ -362,7 +362,7 @@ func (pm *VolumePluginMgr) InitPlugins(plugins []VolumePlugin, host VolumeHost)
|
|||
}
|
||||
err := plugin.Init(host)
|
||||
if err != nil {
|
||||
glog.Errorf("Failed to load volume plugin %s, error: %s", plugin, err.Error())
|
||||
glog.Errorf("Failed to load volume plugin %s, error: %s", name, err.Error())
|
||||
allErrs = append(allErrs, err)
|
||||
continue
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue