← Back to team overview

yahoo-eng-team team mailing list archive

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

 

You have been subscribed to a public bug:

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

** Affects: nova
     Importance: Undecided
     Assignee: Surojit Pathak (suro-patz)
         Status: New

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


References