Regex parsing in get_vif_port_by_id is tedious and error prone
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Salvatore Orlando |
Bug Description
ovs-vsctl has a switch for returning json output, which is arguably better for machine processing, and therefore more suitable for neutron's OVS agent.
Indeed get_vif_port_set in neutron/
However, get_vif_port_by_id performs match on the text output from ovs_vsctl.
While it is true that regular expressions are extremely powerful, apparently trivial errors in the regular expression itself can lead to errors like [1].
In [1] the evaluation of a regular expression is failing because the name of a VIF was not wrapped in double quotes.
Even if the could be worth looking into ovs-vsctl output to understand in which cases VIF names are wrapped in quotes and in which not, it is probably better to just switch to JSON output as parsing JSON is easier and therefore less likely to cause errors.
It is also worth noting that the error in regex parsing [1] causes the VIF to not be wired triggering the same failure as bug 1253896.
summary: |
- Regex parsing in get_vif_port_by_id is tedious and error-prone + Regex parsing in get_vif_port_by_id is tedious and error prone |
tags: |
added: ovs removed: ops |
Changed in neutron: | |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | icehouse-3 → 2014.1 |
Fix proposed to branch: master /review. openstack. org/73889
Review: https:/