[DHCP] new line symbol in opt_name of extra_dhcp_opt causes dnsmasq to fail
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
High
|
Slawek Kaplonski |
Bug Description
Bug originally reported by Alex Katz in Bugzilla: https:/
Description of problem:
The new line symbol (`\n`) can be passed into the opt_name of extra-dhcp-opt with the direct API call. It will cause the dnsmasq process to be in a restart loop.
There is the following stack trace appear in the dhcp-agent.log
[-] Unable to enable dhcp for ee4beb3e-
Traceback (most recent call last):
File "/usr/lib/
getattr(
File "/usr/lib/
common_
File "/usr/lib/
while not predicate():
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
options += self._generate_
File "/usr/lib/
opt.opt_name, opt.opt_value))
File "/usr/lib/
extra_tag = matches.groups()[0]
AttributeError: 'NoneType' object has no attribute 'groups'
Example of the API request:
TOK=`openstack token issue -f value -c id`
curl -v -s -X PUT \
-H "X-Auth-Token: $TOK" \
-H "Content-Type: application/json" \
-d '{ "port": { "extra_dhcp_opts": [{ "opt_name": "yyy:test\
"http://
Changed in neutron: | |
milestone: | none → xena-rc2 |
tags: | added: neutron-proactive-backport-potential |
tags: | removed: neutron-proactive-backport-potential |
Fix proposed to branch: master /review. opendev. org/c/openstack /neutron/ +/809580
Review: https:/