mirror of
https://github.com/weaveworks/scope.git
synced 2026-04-20 17:37:44 +00:00
plugins/traffic-contorl: fix error message in getNSID
Return error message that show what fails and why.
This commit is contained in:
@@ -200,8 +200,7 @@ func parseAttribute(statusString string, attribute string) string {
|
||||
func getNSID(nsPath string) (string, error) {
|
||||
nsID, err := os.Readlink(nsPath)
|
||||
if err != nil {
|
||||
log.Error(nsID)
|
||||
return "", fmt.Errorf("failed to execute command: tc qdisc show dev eth0: %v", err)
|
||||
return "", fmt.Errorf("failed read \"%s\": %v", nsPath, err)
|
||||
}
|
||||
return nsID[5 : len(nsID)-1], nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user