← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1531426] [NEW] 'dns_assignment' is not transmitted to neutron-dhcp-agent when new port is created with 'dns_name' set

 

Public bug reported:

When a port is created, a notify message gets sent to the neutron-dhcp-
agent. It contains the 'dns_name' but misses 'dns_assignment' causing
that internal DNS added in Liberty is not working as expected. Only a
restart of the neutron-dhcp-agent helps when the ports are directly read
from the database. I spent a lot of time in debugging, but was not able
to locate the specific section where the notify message gets created.

I have enabled tracing in RabbitMQ and this is the problematic message.
The port information is extracted by  the neutron-dhcp-agent and checked
against the existence of 'dns_assignment'. Because the field is missing,
a standard DNS entry in the form of 'host-xxx-xxx-xxx-xxx.%{domain_id}'
is created and added to the Dnsmasq resolution file.

Node:         rabbit@os-controller02
Connection:   10.152.132.202:47136 -> 10.152.132.202:5672
Virtual host: openstack
User:         neutron
Channel:      1
Exchange:     neutron
Routing keys: [<<"dhcp_agent.os-network02">>]
Queue:        dhcp_agent.os-network02
Properties:   [{<<"priority">>,signedint,0},
               {<<"delivery_mode">>,signedint,2},
               {<<"headers">>,table,[]},
               {<<"content_encoding">>,longstr,<<"utf-8">>},
               {<<"content_type">>,longstr,<<"application/json">>}]
Payload: 
{"oslo.message": "{\"_context_domain\": null, \"_context_request_id\": \"req-1d44fd59-e38a-4d44-b195-58bdcfa94045\", \"_context_auth_token\": \"e511c54d625a4d4ca480cea94c173123\", \"_context_resource_uuid\": null, \"_context_tenant_name\": \"service\", \"_context_user\": \"36c4334c1d01456ebab7041c669d40a3\", \"_context_user_id\": \"36c4334c1d01456ebab7041c669d40a3\", \"_context_show_deleted\": false, \"_context_is_admin\": true, \"version\": \"1.0\", \"_context_project_domain\": null, \"_context_timestamp\": \"2016-01-06 07:49:49.293954\", \"method\": \"port_create_end\", \"_context_roles\": [\"admin\"], \"args\": {\"payload\": {\"port\": {\"status\": \"DOWN\", \"binding:host_id\": \"os-compute01\", \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"compute:nova\", \"port_security_enabled\": true, \"binding:profile\": {}, \"qos_policy_id\": null, \"fixed_ips\": [{\"subnet_id\": \"f07588e4-ffb2-4199-b679-03fd4e814ddb\", \"ip_address\": \"192.168.1.66\"}], \"id\": \"0a651aa4-b83f-463b-b9f2-35751e9268a2\", \"security_groups\": [\"0ac4af90-4efb-4819-a522-b3cc53b37f92\"], \"device_id\": \"776a524b-bdd6-468d-9845-099df156ca56\", \"name\": \"\", \"admin_state_up\": true, \"network_id\": \"38ef3fd3-d80f-4eb0-9bbb-2e995b711e07\", \"dns_name\": \"test-vm2\", \"binding:vif_details\": {\"port_filter\": true, \"ovs_hybrid_plug\": true}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\", \"tenant_id\": \"7fdd23889b214e66b94f498c9529fbd6\", \"mac_address\": \"fa:16:3e:d7:07:7a\"}}}, \"_unique_id\": \"71a75d632a004e11a2029e8bb44c8220\", \"_context_tenant_id\": \"9ed3902618c54b84a0e23dc1eb827dec\", \"_context_project_name\": \"service\", \"_context_user_identity\": \"36c4334c1d01456ebab7041c669d40a3 9ed3902618c54b84a0e23dc1eb827dec - - -\", \"_context_tenant\": \"9ed3902618c54b84a0e23dc1eb827dec\", \"_context_project_id\": \"9ed3902618c54b84a0e23dc1eb827dec\", \"_context_read_only\": false, \"_context_user_domain\": null, \"_context_user_name\": \"neutron\"}", "oslo.version": "2.0"}

** Affects: neutron
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1531426

Title:
  'dns_assignment' is not transmitted to neutron-dhcp-agent when new
  port is created with 'dns_name' set

Status in neutron:
  New

Bug description:
  When a port is created, a notify message gets sent to the neutron-
  dhcp-agent. It contains the 'dns_name' but misses 'dns_assignment'
  causing that internal DNS added in Liberty is not working as expected.
  Only a restart of the neutron-dhcp-agent helps when the ports are
  directly read from the database. I spent a lot of time in debugging,
  but was not able to locate the specific section where the notify
  message gets created.

  I have enabled tracing in RabbitMQ and this is the problematic
  message. The port information is extracted by  the neutron-dhcp-agent
  and checked against the existence of 'dns_assignment'. Because the
  field is missing, a standard DNS entry in the form of 'host-xxx-xxx-
  xxx-xxx.%{domain_id}' is created and added to the Dnsmasq resolution
  file.

  Node:         rabbit@os-controller02
  Connection:   10.152.132.202:47136 -> 10.152.132.202:5672
  Virtual host: openstack
  User:         neutron
  Channel:      1
  Exchange:     neutron
  Routing keys: [<<"dhcp_agent.os-network02">>]
  Queue:        dhcp_agent.os-network02
  Properties:   [{<<"priority">>,signedint,0},
                 {<<"delivery_mode">>,signedint,2},
                 {<<"headers">>,table,[]},
                 {<<"content_encoding">>,longstr,<<"utf-8">>},
                 {<<"content_type">>,longstr,<<"application/json">>}]
  Payload: 
  {"oslo.message": "{\"_context_domain\": null, \"_context_request_id\": \"req-1d44fd59-e38a-4d44-b195-58bdcfa94045\", \"_context_auth_token\": \"e511c54d625a4d4ca480cea94c173123\", \"_context_resource_uuid\": null, \"_context_tenant_name\": \"service\", \"_context_user\": \"36c4334c1d01456ebab7041c669d40a3\", \"_context_user_id\": \"36c4334c1d01456ebab7041c669d40a3\", \"_context_show_deleted\": false, \"_context_is_admin\": true, \"version\": \"1.0\", \"_context_project_domain\": null, \"_context_timestamp\": \"2016-01-06 07:49:49.293954\", \"method\": \"port_create_end\", \"_context_roles\": [\"admin\"], \"args\": {\"payload\": {\"port\": {\"status\": \"DOWN\", \"binding:host_id\": \"os-compute01\", \"allowed_address_pairs\": [], \"extra_dhcp_opts\": [], \"device_owner\": \"compute:nova\", \"port_security_enabled\": true, \"binding:profile\": {}, \"qos_policy_id\": null, \"fixed_ips\": [{\"subnet_id\": \"f07588e4-ffb2-4199-b679-03fd4e814ddb\", \"ip_address\": \"192.168.1.66\"}], \"id\": \"0a651aa4-b83f-463b-b9f2-35751e9268a2\", \"security_groups\": [\"0ac4af90-4efb-4819-a522-b3cc53b37f92\"], \"device_id\": \"776a524b-bdd6-468d-9845-099df156ca56\", \"name\": \"\", \"admin_state_up\": true, \"network_id\": \"38ef3fd3-d80f-4eb0-9bbb-2e995b711e07\", \"dns_name\": \"test-vm2\", \"binding:vif_details\": {\"port_filter\": true, \"ovs_hybrid_plug\": true}, \"binding:vnic_type\": \"normal\", \"binding:vif_type\": \"ovs\", \"tenant_id\": \"7fdd23889b214e66b94f498c9529fbd6\", \"mac_address\": \"fa:16:3e:d7:07:7a\"}}}, \"_unique_id\": \"71a75d632a004e11a2029e8bb44c8220\", \"_context_tenant_id\": \"9ed3902618c54b84a0e23dc1eb827dec\", \"_context_project_name\": \"service\", \"_context_user_identity\": \"36c4334c1d01456ebab7041c669d40a3 9ed3902618c54b84a0e23dc1eb827dec - - -\", \"_context_tenant\": \"9ed3902618c54b84a0e23dc1eb827dec\", \"_context_project_id\": \"9ed3902618c54b84a0e23dc1eb827dec\", \"_context_read_only\": false, \"_context_user_domain\": null, \"_context_user_name\": \"neutron\"}", "oslo.version": "2.0"}

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1531426/+subscriptions


Follow ups