LBaaS should populate DNS Name on creating LoadBalancer

Bug #1537169 reported by Graham Hayes
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
octavia
Invalid
Wishlist
Unassigned

Bug Description

With the merge of https://blueprints.launchpad.net/neutron/+spec/external-dns-resolution (https://review.openstack.org/#/c/212213/)

neutron supports a name parameter on a port. this can be used to create a DNS record for the port, both locally on the network, and globally in Designate.

when creating a loadbalancer, LBaaS should populate this field.

Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

If I am correct in the understanding of the bug title, the name parameter is updated, but with the ID of current LBaaS.
http://paste.openstack.org/show/484784/

Please correct if my understanding is wrong.

Revision history for this message
Miguel Lavalle (minsel) wrote :

Reedip,

In the paste, when you show the port, it has a 'dns_name' attribute. It is left blank when creating a load balancer. What Graham is requesting is for 'dns_name' to be populated with a value that could be sent to external DNS service. Similar to what is being done for nova instances: https://review.openstack.org/#/c/271578/

Changed in neutron:
status: New → Confirmed
linwei,wu (wlwwu)
Changed in neutron:
assignee: nobody → linwei,wu (wlwwu)
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

This doesn't not need an RFE, IMO. The dsn feature is there for other components to use it. This can be treated a regular bug fix.

tags: removed: rfe
Changed in neutron:
importance: Undecided → Wishlist
Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Hi linwei,wu
Are you working on this?

Revision history for this message
linwei,wu (wlwwu) wrote :

Hi reedip,

you can take it.. thanks for reminding

Changed in neutron:
assignee: linwei,wu (wlwwu) → Reedip (reedip-banerjee)
summary: - LBaaS Ports should be created with the name parameter
+ LBaaS should populate DNS Name on creating LoadBalancer
Revision history for this message
Jan Alexander (jan-alexander) wrote :

I ended up adding this functionality in my private cluster because when LBaaSv2 is used together with DNS integration plugin, creating new loadbalancers fails. This is because DNS integration expects dns_name field to be present when a create port request is received and the deserialization logic ensures that (there is a default value for dns_name field). However, the LBaaS calls create port directly on the core plugin, bypassing the REST API layer and this causes the issues (the dns_name field never gets added before reaching the DNS integration driver). This is what I did to fix this (in the stable/mitaka branch), feel free to use this if you find it useful:

--- a/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py
+++ b/neutron_lbaas/db/loadbalancer/loadbalancer_dbv2.py
@@ -21,6 +21,7 @@ from neutron.callbacks import registry
 from neutron.callbacks import resources
 from neutron.db import common_db_mixin as base_db
 from neutron import manager
+from neutron.api import extensions
 from neutron.plugins.common import constants
 from neutron_lib import constants as n_constants
 from neutron_lib import exceptions as n_exc
@@ -53,6 +54,11 @@ class LoadBalancerPluginDbv2(base_db.CommonDbMixin,
     """

     @property
+ def _has_dns_ext(self):
+ return 'dns-integration' in extensions.PluginAwareExtensionManager.get_instance().extensions
+
+
+ @property
     def _core_plugin(self):
         return manager.NeutronManager.get_plugin()

@@ -107,6 +113,9 @@ class LoadBalancerPluginDbv2(base_db.CommonDbMixin,
             'fixed_ips': [fixed_ip]
         }

+ if self._has_dns_ext:
+ port_data['dns_name'] = lb_db.name
+
         port = self._core_plugin.create_port(context, {'port': port_data})
         lb_db.vip_port_id = port['id']
         for fixed_ip in port['fixed_ips']:

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to neutron-lbaas (master)

Fix proposed to branch: master
Review: https://review.openstack.org/404774

Changed in neutron:
status: Confirmed → In Progress
affects: neutron → octavia
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron-lbaas (master)

Change abandoned by Michael Johnson (<email address hidden>) on branch: master
Review: https://review.openstack.org/404774
Reason: The comments on this patch have not been addressed in two years. Abandoning.

Revision history for this message
Reedip (reedip-banerjee-deactivatedaccount) wrote :

Since I am not active anymore, I would like to remove myself from the assignee. Its open for anyone else to take up.

Changed in octavia:
assignee: Reedip (reedip-banerjee) → nobody
Revision history for this message
Gregory Thiemonge (gthiemonge) wrote : auto-abandon-script

Abandoned after re-enabling the Octavia launchpad.

Changed in octavia:
status: In Progress → Invalid
tags: added: auto-abandon
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.