← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1523723] Re: nova scheduler utils parse_option needs more sanity check

 

Not a bug, as `parse_options` takes an optional `sep` argument. If you
wish to use '>=', pass that in as the `sep` named parameter.

** Changed in: nova
       Status: Confirmed => Invalid

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1523723

Title:
  nova scheduler utils parse_option needs more sanity check

Status in OpenStack Compute (nova):
  Invalid

Bug description:
  nova/scheduler/utils - parse_options() needs to do more sanity
  check.[1]

  >>> from nova.scheduler import utils
  >>> utils.parse_options(['a>=5', 'b>3'])
  [('a>', '5')]
  >>> 

  The default separator is '='. So '>' gets filtered out but '>=' gets
  allowed. This is even worse as it pollutes the key for the config opt.

  One possible solution is to apply a grammar compatibility, what can be
  an accepted opt-name, like variable name in a language. for the
  LeftHandSide of the opt expression, the way it applies 'converter' to
  the RightHandSide.

  reported version of nova
  [suro@oxy-dev nova (master)]$ git log -1
  commit 78db34c0b59cc04883e1ffa215313092c15ce7c8

  
  [1] - https://github.com/openstack/nova/blob/stable/liberty/nova/scheduler/utils.py#L222

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1523723/+subscriptions


References