Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-8148

Enforce text attribute value specification for zone and region values

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Accepted
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      Mesos has a specification for characters allowed by attribute values:

      http://mesos.apache.org/documentation/latest/attributes-resources/

      The specification is as follows:

      scalar : floatValue
      
      floatValue : ( intValue ( "." intValue )? ) | ...
      
      intValue : [0-9]+
      
      range : "[" rangeValue ( "," rangeValue )* "]"
      
      rangeValue : scalar "-" scalar
      
      set : "{" text ( "," text )* "}"
      
      text : [a-zA-Z0-9_/.-]
      

      Marathon is implementing IN and IS constraints, and includes plans to support further attribute types as it makes sense to do so (IE {a,b} IS {b,a}, 5 IN [0-10]). In order to do this, Marathon has adopted the Mesos attribute value specification and will enforce it in the validation layer. As an example, it will be possible to write things like:

      "constraints": [
        ["attribute", "IN", "{value-a,value-b,value-c}"]
      ]
      

      Additionally, Marathon allows one to specify constraints on non-attribute properties, such as region, hostname, or zone. If somebody specified a zone value with a comma, then the user would not be able to use the Mesos set value type specification to describe a set of zones in which an app should be deployed, and, as a consequence, would result in additional complexity (IE: Marathon would need to implement an escaping mechanism for this case).

      Ideally, the character space is confined to begin with. It the text type specification is sufficient, then, it seems simpler to re-use it rather than create another one.

      Attachments

        Activity

          People

            Unassigned Unassigned
            timcharper Tim Harper
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: