[ https://issues.apache.org/jira/browse/MESOS-6219?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yan Xu updated MESOS-6219: -------------------------- Comment: was deleted (was: One way to address this may be to have a special resource type: {code} message Value { enum Type { SCALAR = 0; RANGES = 1; SET = 2; TEXT = 3; + AUTO = 4; } {code} - We only do auto-detection for predefined resources and they are identified by names and other fields so the {{type}} is already custom defined. i.e., it doesn't make sense to have {{cpus}} with {{type=RANGES}}. When the parser sees {{type=AUTO}} for {{cpus}}, it auto-detects the value and then assigns the type. - For custom resources we don't support auto-detection anyways so {{type=AUTO}} would be invalid and the parser would bail.) > Improve auto-detection of predefined resource types. > ---------------------------------------------------- > > Key: MESOS-6219 > URL: https://issues.apache.org/jira/browse/MESOS-6219 > Project: Mesos > Issue Type: Improvement > Components: containerization > Reporter: Yan Xu > > Mesos agent currently auto-detects certain predefined resource types when > they are not specified. These include cpus, mem, (root) disk, gpus and also > MESOS-6062 is adding auto-detection for mount disks when the size is > specified as a special value "0". > Due to the limitation of the {{Resources}} abstraction the caller of > {{Resources::parse()}} can't tell if a resource is intentionally specified > with an empty value or unspecified. The current resource auto-detection in > {{Containerizer::resources()}} resorts to scanning the {{--resources}} flag > to check if a resource is specified, this is very fragile, e.g., it would > think {{gpus:0}} is specified (and not auto-detected) if there is a mount > disk with its root being {{/biggpush}}. > It would be nice if we can have the user explicitly specify the intention to > have value of a standard resource auto-detected (at least with the JSON > input). -- This message was sent by Atlassian JIRA (v6.3.4#6332)