Comment 2 for bug 1531426

Revision history for this message
Anand Shanmugam (anand1712) wrote :

Hi Jens,

I tried creating a port in master and was able to see that the dhcp_agent is getting the dns_assignment correctly and it is also adding the entries in the dnsmasq file properly. I set the dns_domain config option in neutron.conf to "mylocal" to try to reproduce this issue.

curl -g -i -X POST http://13.0.1.4:9696/v2.0/ports.json -H "User-Agent: python-neutronclient" -H "Content-Type: application/json" -H "Accept: application/json" -H "X-Auth-Token: b357946e24d84fa18697df70cff1924b" -d '{"port": {"network_id": "46822df1-7b31-47bf-9331-bebf83b5d890", "admin_state_up": true, "dns_name":"test1-vm2"}}

{"port": {"status": "DOWN", "binding:host_id": "", "allowed_address_pairs": [], "dns_assignment": [{"hostname": "test1-vm2", "ip_address": "10.0.0.18", "fqdn": "test1-vm2.mylocal."}, {"hostname": "test1-vm2", "ip_address": "fde5:ba01:556e:0:f816:3eff:feae:1b8c", "fqdn": "test1-vm2.mylocal."}], "device_owner": "", "binding:profile": {}, "port_security_enabled": true, "fixed_ips": [{"subnet_id": "ef731cd4-9eaf-45ce-b9dc-b622e8ec5521", "ip_address": "10.0.0.18"}, {"subnet_id": "32215369-3c1f-4366-99a1-50923f946373", "ip_address": "fde5:ba01:556e:0:f816:3eff:feae:1b8c"}], "id": "ee63422f-7341-4b45-a383-5200f7aca108", "security_groups": ["e9144244-deae-4a49-ad5f-e03c2fb1dad5"], "device_id": "", "name": "", "admin_state_up": false, "network_id": "46822df1-7b31-47bf-9331-bebf83b5d890", "dns_name": "test1-vm2", "binding:vif_details": {}, "binding:vnic_type": "normal", "binding:vif_type": "unbound", "tenant_id": "6614b7a7a0194be5be558b6e25fe52e6", "mac_address": "fa:16:3e:ae:1b:8c"}}

neutron port-show "ee63422f-7341-4b45-a383-5200f7aca108"
+-----------------------+---------------------------------------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+---------------------------------------------------------------------------------------------------------------+
| admin_state_up | False |
| allowed_address_pairs | |
| binding:host_id | |
| binding:profile | {} |
| binding:vif_details | {} |
| binding:vif_type | unbound |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| dns_assignment | {"hostname": "test1-vm2", "ip_address": "10.0.0.18", "fqdn": "test1-vm2.mylocal."} |
| | {"hostname": "test1-vm2", "ip_address": "fde5:ba01:556e:0:f816:3eff:feae:1b8c", "fqdn": "test1-vm2.mylocal."} |
| dns_name | test1-vm2 |
| extra_dhcp_opts | |
| fixed_ips | {"subnet_id": "ef731cd4-9eaf-45ce-b9dc-b622e8ec5521", "ip_address": "10.0.0.18"} |
| | {"subnet_id": "32215369-3c1f-4366-99a1-50923f946373", "ip_address": "fde5:ba01:556e:0:f816:3eff:feae:1b8c"} |
| id | ee63422f-7341-4b45-a383-5200f7aca108 |
| mac_address | fa:16:3e:ae:1b:8c |
| name | |
| network_id | 46822df1-7b31-47bf-9331-bebf83b5d890 |
| port_security_enabled | True |
| security_groups | e9144244-deae-4a49-ad5f-e03c2fb1dad5 |
| status | DOWN |
| tenant_id | 6614b7a7a0194be5be558b6e25fe52e6 |
+-----------------------+---------------------------------------------------------------------------------------------------------------+

ubuntu@devstack: more /opt/stack/data/neutron/dhcp/46822df1-7b31-47bf-9331-bebf83b5d890/host
fa:16:3e:ae:1b:8c,test1-vm2.mylocal.,10.0.0.18

I tested this in master. Is there any special configurations that has to be made to reproduce this issue.Also if possible can you paste what are the arguments that you are sending when creating the port?