Make IsQualifiedName return error strings

This commit is contained in:
Tim Hockin
2015-12-15 21:28:42 -08:00
parent f6eefd4762
commit 72955770f3
11 changed files with 102 additions and 72 deletions

View File

@@ -180,8 +180,8 @@ func SlaveAttributesToLabels(attrs []*mesos.Attribute) map[string]string {
v = strconv.FormatFloat(a.GetScalar().GetValue(), 'G', -1, 64)
}
if !validation.IsQualifiedName(k) {
log.V(3).Infof("ignoring invalid node label name %q", k)
if errs := validation.IsQualifiedName(k); len(errs) != 0 {
log.V(3).Infof("ignoring invalid node label name %q", k, errs)
continue
}