[
https://issues.apache.org/jira/browse/YUNIKORN-1832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Yongjun Zhang updated YUNIKORN-1832:
------------------------------------
Description:
when user doesn't config instance type node label, the following code would
get an empty value,
{code:java}
parser.stringVar(&conf.InstanceTypeNodeLabelKey,
CMSvcNodeInstanceTypeNodeLabelKey){code}
which is called by
{code:java}
// parse values from configmaps
newConf, cmErrors := parseConfig(config, prev) {code}
and it will overwrite the default value DefaultNodeInstanceTypeNodeLabelKey set
in default config.
See:
{code:java}
2023-06-23T03:37:42.182Z INFO conf/schedulerconf.go:465
scheduler configuration, pretty print {"configs": "{\n \"schedulerName\":
\"yunikorn\",\n \"clusterId\": \"dev-cluster\",\n \"clusterVersion\":
\"1.3.0\",\n \"policyGroup\": \"queues\",\n \"schedulingIntervalSecond\":
1000000000,\n \"absoluteKubeConfigFilePath\": \"//.kube/config\",\n
\"loggingLevel\": 0,\n \"volumeBindTimeout\": 10000000000,\n \"testMode\":
false,\n \"eventChannelCapacity\": 1048576,\n \"dispatchTimeout\":
300000000000,\n \"kubeQPS\": 1000,\n \"kubeBurst\": 1000,\n
\"operatorPlugins\": \"general\",\n \"enableConfigHotRefresh\": true,\n
\"disableGangScheduling\": false,\n \"userLabelKey\":
\"yunikorn.apache.org/username\",\n \"placeHolderImage\":
\"registry.k8s.io/pause:3.7\",\n \"instanceTypeNodeLabelKey\": \"\",\n
\"namespace\": \"yunikorn\"\n}"}{code}
See \"instanceTypeNodeLabelKey\": \"\"
The problem is that
{code:java}
func parseConfig(config map[string]string, prev *SchedulerConf)
(*SchedulerConf, []error) {
conf := prev.Clone() {code}
where the Clone method forgot to handle InstanceTypeNodeLabelKey field.
was:
when user doesn't config instance type node label, the following code would
get an empty value,
{code:java}
parser.stringVar(&conf.InstanceTypeNodeLabelKey,
CMSvcNodeInstanceTypeNodeLabelKey){code}
which is called by
{code:java}
// parse values from configmaps
newConf, cmErrors := parseConfig(config, prev) {code}
and it will overwrite the default value DefaultNodeInstanceTypeNodeLabelKey set
in default config.
Before deciding to overwrite default config value, we should check if the
config is set or not, and if it's set to a valid value if it's set.
{code:java}
2023-06-23T03:37:42.182Z INFO conf/schedulerconf.go:465
scheduler configuration, pretty print {"configs": "{\n \"schedulerName\":
\"yunikorn\",\n \"clusterId\": \"dev-cluster\",\n \"clusterVersion\":
\"1.3.0\",\n \"policyGroup\": \"queues\",\n \"schedulingIntervalSecond\":
1000000000,\n \"absoluteKubeConfigFilePath\": \"//.kube/config\",\n
\"loggingLevel\": 0,\n \"volumeBindTimeout\": 10000000000,\n \"testMode\":
false,\n \"eventChannelCapacity\": 1048576,\n \"dispatchTimeout\":
300000000000,\n \"kubeQPS\": 1000,\n \"kubeBurst\": 1000,\n
\"operatorPlugins\": \"general\",\n \"enableConfigHotRefresh\": true,\n
\"disableGangScheduling\": false,\n \"userLabelKey\":
\"yunikorn.apache.org/username\",\n \"placeHolderImage\":
\"registry.k8s.io/pause:3.7\",\n \"instanceTypeNodeLabelKey\": \"\",\n
\"namespace\": \"yunikorn\"\n}"}{code}
See \"instanceTypeNodeLabelKey\": \"\"
> Default conf value DefaultNodeInstanceTypeNodeLabelKey is not honored
> ----------------------------------------------------------------------
>
> Key: YUNIKORN-1832
> URL: https://issues.apache.org/jira/browse/YUNIKORN-1832
> Project: Apache YuniKorn
> Issue Type: Improvement
> Components: shim - kubernetes
> Reporter: Yongjun Zhang
> Assignee: Yongjun Zhang
> Priority: Major
>
> when user doesn't config instance type node label, the following code would
> get an empty value,
> {code:java}
> parser.stringVar(&conf.InstanceTypeNodeLabelKey,
> CMSvcNodeInstanceTypeNodeLabelKey){code}
> which is called by
> {code:java}
> // parse values from configmaps
> newConf, cmErrors := parseConfig(config, prev) {code}
> and it will overwrite the default value DefaultNodeInstanceTypeNodeLabelKey
> set in default config.
> See:
> {code:java}
> 2023-06-23T03:37:42.182Z INFO conf/schedulerconf.go:465
> scheduler configuration, pretty print {"configs": "{\n \"schedulerName\":
> \"yunikorn\",\n \"clusterId\": \"dev-cluster\",\n \"clusterVersion\":
> \"1.3.0\",\n \"policyGroup\": \"queues\",\n \"schedulingIntervalSecond\":
> 1000000000,\n \"absoluteKubeConfigFilePath\": \"//.kube/config\",\n
> \"loggingLevel\": 0,\n \"volumeBindTimeout\": 10000000000,\n \"testMode\":
> false,\n \"eventChannelCapacity\": 1048576,\n \"dispatchTimeout\":
> 300000000000,\n \"kubeQPS\": 1000,\n \"kubeBurst\": 1000,\n
> \"operatorPlugins\": \"general\",\n \"enableConfigHotRefresh\": true,\n
> \"disableGangScheduling\": false,\n \"userLabelKey\":
> \"yunikorn.apache.org/username\",\n \"placeHolderImage\":
> \"registry.k8s.io/pause:3.7\",\n \"instanceTypeNodeLabelKey\": \"\",\n
> \"namespace\": \"yunikorn\"\n}"}{code}
> See \"instanceTypeNodeLabelKey\": \"\"
> The problem is that
> {code:java}
> func parseConfig(config map[string]string, prev *SchedulerConf)
> (*SchedulerConf, []error) {
> conf := prev.Clone() {code}
> where the Clone method forgot to handle InstanceTypeNodeLabelKey field.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]