You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@yunikorn.apache.org by GitBox <gi...@apache.org> on 2021/08/19 05:34:04 UTC

[GitHub] [incubator-yunikorn-core] HuangTing-Yao commented on a change in pull request #285: [YUNIKORN-758] Ignore unschedulable nodes for asks with certain tags

HuangTing-Yao commented on a change in pull request #285:
URL: https://github.com/apache/incubator-yunikorn-core/pull/285#discussion_r691797140



##########
File path: pkg/common/utils.go
##########
@@ -113,3 +114,19 @@ func ConvertSITimeout(millis int64) time.Duration {
 	}
 	return time.Duration(result)
 }
+
+func GetIgnoreUnschedulable(tag map[string]string) bool {
+	var ignore bool
+	var err error
+	if ignoreUnschedulable, ok := tag[interfaceCommon.DomainYuniKorn+interfaceCommon.KeyIgnoreUnschedulable]; !ok {
+		// if there isn't ignoreUnschedulable tag, set it to false
+		ignore = false
+	} else {
+		ignore, err = strconv.ParseBool(ignoreUnschedulable)
+		if err != nil {
+			log.Logger().Warn("Failed to convert allocationTag ignoreUnschedulable from string to bool")
+			ignore = false
+		}
+	}
+	return ignore
+}

Review comment:
       Sure, done.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@yunikorn.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org