Unable to add classless-static-route in extra_dhcp_opt extension
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
python-neutronclient |
Fix Released
|
Medium
|
Shih-Hao Li |
Bug Description
When adding classless-
complains syntax error. For example,
$ neutron port-update --extra-dhcp-opt opt_name=
usage: neutron port-update [-h] [--request-format {json}] [--name NAME]
neutron port-update: error: argument --extra-dhcp-opt: invalid key-value '20.20.20.1', expected format: key=value
Try 'neutron help port-update' for more information.
The reason is neutron client interprets the "," inside the opt_value as
a delimiter of key-value pairs for --extra-dhcp-opt.
The comma in the opt_value for classless-
the format of DHCP options in the opts file for dnsmasq is like:
tag:<tag_
description: | updated |
affects: | openstack-manuals → neutron |
affects: | neutron → python-neutronclient |
Changed in python-neutronclient: | |
status: | New → Confirmed |
assignee: | nobody → Shih-Hao Li (shihli) |
Changed in python-neutronclient: | |
importance: | Undecided → Medium |
Changed in python-neutronclient: | |
status: | Confirmed → In Progress |
Here are two possible solutions.
(1) Allow users to use spaces in the opt_value, such as value=" 169.254. 169.254/ 32 20.20.20.1"
opt_
Then edit _generate_ opts_per_ port() in dhcp.py to convert
spaces to commas when writing them to opts file.
(2) Modify neutron client to allow commas inside opt_value.