Make IsValidLabelValue return error strings

This commit is contained in:
Tim Hockin
2015-12-15 22:27:13 -08:00
parent a0cc59f28a
commit 66d0d87829
11 changed files with 47 additions and 40 deletions

View File

@@ -181,12 +181,12 @@ func SlaveAttributesToLabels(attrs []*mesos.Attribute) map[string]string {
}
if errs := validation.IsQualifiedName(k); len(errs) != 0 {
log.V(3).Infof("ignoring invalid node label name %q", k, errs)
log.V(3).Infof("ignoring invalid node label %q: %v", k, errs)
continue
}
if !validation.IsValidLabelValue(v) {
log.V(3).Infof("ignoring invalid node label %s value: %q", k, v)
if errs := validation.IsValidLabelValue(v); len(errs) != 0 {
log.V(3).Infof("ignoring invalid node %s=%q: %v", k, v, errs)
continue
}