implement DB and allocation logic for dns + route info.

Bug #1008180 reported by dan wendlandt
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Simon

Bug Description

implement the database models for the v2 db plugin base to store dns + additional routes that can be associated with a subnet.

dan wendlandt (danwent)
Changed in quantum:
milestone: none → folsom-2
importance: Undecided → Medium
assignee: nobody → dan wendlandt (danwent)
importance: Medium → High
Revision history for this message
dan wendlandt (danwent) wrote :

gary, this one is less urgent and can probably wait a bit, so maybe its better to have you look at this one than the basic IP allocation.

Changed in quantum:
assignee: dan wendlandt (danwent) → Gary Kotton (garyk)
Revision history for this message
Gary Kotton (garyk) wrote : Re: [Bug 1008180] Re: implement DB and allocation logic for dns + route info.

ok

On 06/07/2012 08:49 PM, dan wendlandt wrote:
> gary, this one is less urgent and can probably wait a bit, so maybe its
> better to have you look at this one than the basic IP allocation.
>
> ** Changed in: quantum
> Assignee: dan wendlandt (danwent) => Gary Kotton (garyk)
>

dan wendlandt (danwent)
Changed in quantum:
status: New → Confirmed
dan wendlandt (danwent)
Changed in quantum:
importance: High → Medium
Changed in quantum:
assignee: Gary Kotton (garyk) → ExxonValdeez (exxonvaldeez)
Revision history for this message
ExxonValdeez (exxonvaldeez) wrote :

I've written a rough outline of the code I'm going to add to the model_v2.py and db_base_plugin_v2.py. To handle 'dns_nameservers', I will use the IPAllocation model and add a relationship in the Subnet model. For 'reserved_ranges' and 'additional_host_routes' under the Subnet model and 'host_routes' under the Port model, I will create a new model that stores the 'start' and 'end' in fixed attributes or the 'destination' and 'next_hop', respectively.

The db_base_plugin_v2.py file will need to be updated to correctly create these objects and output them into the dictionaries that the '_make_x_dict' function create.

These modifications should be fairly straightforward and won't require anything unusual in terms of SQLAlchemy model creation.

dan wendlandt (danwent)
Changed in quantum:
status: Confirmed → In Progress
Revision history for this message
dan wendlandt (danwent) wrote :

Josh is reworking this patch, but I don't see a need to rush it in for F-2.

Changed in quantum:
milestone: folsom-2 → folsom-3
Revision history for this message
dan wendlandt (danwent) wrote :

Hi Josh, do you have an update on the status of this? This is the last real chunk of v2 API implementation that needs to be completed, and we need it before we can have DHCP start including route and DNS data.

Changed in quantum:
importance: Medium → High
Revision history for this message
Nachi Ueno (nati-ueno) wrote :

oops

I have also do same fix in https://bugs.launchpad.net/quantum/+bug/1022737

Can I take this bug?

Revision history for this message
dan wendlandt (danwent) wrote :

Nachi, this bug is about creating the database models and logic in db_plugin_based_v2.py to store route and dhcp data for subnets and ports. Josh has a branch that he's close to pushing on this already. Please work with him and provide feedback on his branch.

Josh, is this branch in a public repo yet? Once its close to being ready for review, you you can push it to gerrit and mark it as "work in progress" to get early feedback.

Revision history for this message
ExxonValdeez (exxonvaldeez) wrote : Re: [Bug 1008180] Re: implement DB and allocation logic for dns + route info.

I can push it to a public repo today. Its sitting on Github but not on
Launchpad.

Nachi, your bug is slightly different from mine but I'll push the code
so you can look at it.

Josh

On Tue, Jul 17, 2012 at 12:34 PM, dan wendlandt
<email address hidden> wrote:
> Nachi, this bug is about creating the database models and logic in
> db_plugin_based_v2.py to store route and dhcp data for subnets and
> ports. Josh has a branch that he's close to pushing on this already.
> Please work with him and provide feedback on his branch.
>
> Josh, is this branch in a public repo yet? Once its close to being
> ready for review, you you can push it to gerrit and mark it as "work in
> progress" to get early feedback.
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1008180
>
> Title:
> implement DB and allocation logic for dns + route info.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/1008180/+subscriptions

--
Josh Valdez
Stanford University 2013 | Computer Science
about.me/joshvaldez

Revision history for this message
Nachi Ueno (nati-ueno) wrote :

Hi Dan, Josh

OK I got it!
# In order to solve my bug, I have also implemented DB model .

I'll rewrite code with Josh's patch

dan wendlandt (danwent)
Changed in quantum:
assignee: ExxonValdeez (exxonvaldeez) → Simon (xchenum)
Revision history for this message
dan wendlandt (danwent) wrote :

Simon, can you confirm that you're working on this? Or should I try to find someone else? Thanks.

Revision history for this message
Simon (xchenum) wrote :

Yes, I am working on it... Got side-tracked to something else, will
get it done soon.

On Mon, Jul 30, 2012 at 1:00 PM, dan wendlandt
<email address hidden> wrote:
> Simon, can you confirm that you're working on this? Or should I try to
> find someone else? Thanks.
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1008180
>
> Title:
> implement DB and allocation logic for dns + route info.
>
> Status in OpenStack Quantum (virtual network service):
> In Progress
>
> Bug description:
> implement the database models for the v2 db plugin base to store dns +
> additional routes that can be associated with a subnet.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/1008180/+subscriptions

Revision history for this message
dan wendlandt (danwent) wrote :

ok, no worries, just wanted to make sure it was on your radar :)

Revision history for this message
dan wendlandt (danwent) wrote :

Hi Simon, we're looking to have all new functionality available for code review by next tuesday, Aug. 7th. Does that seem reasonable for this work?

Revision history for this message
Simon (xchenum) wrote :

No problem...

On Tue, Jul 31, 2012 at 5:33 PM, dan wendlandt
<email address hidden> wrote:
> Hi Simon, we're looking to have all new functionality available for code
> review by next tuesday, Aug. 7th. Does that seem reasonable for this
> work?
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1008180
>
> Title:
> implement DB and allocation logic for dns + route info.
>
> Status in OpenStack Quantum (virtual network service):
> In Progress
>
> Bug description:
> implement the database models for the v2 db plugin base to store dns +
> additional routes that can be associated with a subnet.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/1008180/+subscriptions

Revision history for this message
Simon (xchenum) wrote :

Dan,

I will submit something for review very soon... A quick question, do
you think it makes sense to add "dhcp_ip" in this patch? We briefly
talked about this, but basically it allows a network owner to specify
the IP to spawn DHCP daemon on. Since this will impact the available
fixed IP range, I think it makes sense to put it here...

I did read the V2API spec you pointed to me, but I didn't see it
there. So I want to double-check with you before I actually put it in
:-)

Thanks.
-Simon

On Wed, Aug 1, 2012 at 9:00 AM, Xu (Simon) Chen <email address hidden> wrote:
> No problem...
>
> On Tue, Jul 31, 2012 at 5:33 PM, dan wendlandt
> <email address hidden> wrote:
>> Hi Simon, we're looking to have all new functionality available for code
>> review by next tuesday, Aug. 7th. Does that seem reasonable for this
>> work?
>>
>> --
>> You received this bug notification because you are a bug assignee.
>> https://bugs.launchpad.net/bugs/1008180
>>
>> Title:
>> implement DB and allocation logic for dns + route info.
>>
>> Status in OpenStack Quantum (virtual network service):
>> In Progress
>>
>> Bug description:
>> implement the database models for the v2 db plugin base to store dns +
>> additional routes that can be associated with a subnet.
>>
>> To manage notifications about this bug go to:
>> https://bugs.launchpad.net/quantum/+bug/1008180/+subscriptions

Revision history for this message
dan wendlandt (danwent) wrote :

Great to hear. The idea of adding an optional dhcp_ip attribute makes
sense, and is covered in the bug here:
https://blueprints.launchpad.net/quantum/+spec/expose-dhcp-server-ip .
 Please assign the bug to yourself.

Under the principle of keeping patches small if possible, in general I
think it would make sense to have it in a separate patch, particularly
since completing this task will also require changes to the dhcp_agent
itself. That said, if you think putting the two in the same patch is
definitely better, I'm not morally opposed.

I think we'd want the ability for someone to specify a dhcp ip on creation,
and if none is specified, for the system to allocate one if dhcp is
enabled. There are some corner cases that we'll have to document, like
whether this field is cleared if someone updates the network to disable
dhcp, or whether it is valid to update the dhcp_ip value after the subnet
is created (presumably this would require the dhcp agent to react and being
listening on a new IP address).

Dan

Revision history for this message
Simon (xchenum) wrote :

I'm totally with you... If having that dhcp_ip require many changes,
I'll keep it separate. Let me think it through...

On Wed, Aug 1, 2012 at 10:26 PM, dan wendlandt
<email address hidden> wrote:
> Great to hear. The idea of adding an optional dhcp_ip attribute makes
> sense, and is covered in the bug here:
> https://blueprints.launchpad.net/quantum/+spec/expose-dhcp-server-ip .
> Please assign the bug to yourself.
>
> Under the principle of keeping patches small if possible, in general I
> think it would make sense to have it in a separate patch, particularly
> since completing this task will also require changes to the dhcp_agent
> itself. That said, if you think putting the two in the same patch is
> definitely better, I'm not morally opposed.
>
> I think we'd want the ability for someone to specify a dhcp ip on creation,
> and if none is specified, for the system to allocate one if dhcp is
> enabled. There are some corner cases that we'll have to document, like
> whether this field is cleared if someone updates the network to disable
> dhcp, or whether it is valid to update the dhcp_ip value after the subnet
> is created (presumably this would require the dhcp agent to react and being
> listening on a new IP address).
>
> Dan
>
> --
> You received this bug notification because you are a bug assignee.
> https://bugs.launchpad.net/bugs/1008180
>
> Title:
> implement DB and allocation logic for dns + route info.
>
> Status in OpenStack Quantum (virtual network service):
> In Progress
>
> Bug description:
> implement the database models for the v2 db plugin base to store dns +
> additional routes that can be associated with a subnet.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/quantum/+bug/1008180/+subscriptions

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

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/10791
Committed: http://github.com/openstack/quantum/commit/1a9717a8cbd2fe405ccde25fa21214553deee635
Submitter: Jenkins
Branch: master

commit 1a9717a8cbd2fe405ccde25fa21214553deee635
Author: xchenum <email address hidden>
Date: Sun Aug 12 01:11:05 2012 -0400

    implementation for bug 1008180

    implement the database models for the v2 db plugin base to store dns + additional routes
    also handles the dns/route remote/update

    Change-Id: I06c585b47668ee963324a5064e40a24471da28c4

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-3 → 2012.2
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.