yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #42972
[Bug 1523723] [NEW] nova scheduler utils parse_option needs more sanity check
Public bug reported:
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
** Changed in: lma-toolchain
Assignee: (unassigned) => Surojit Pathak (suro-patz)
** Project changed: lma-toolchain => nova
--
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):
New
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
Follow ups