Extend IPAM tables to store more information helpful for IPAM drivers

Bug #1513981 reported by Shraddha Pandhe
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Wishlist
Unassigned

Bug Description

We (Yahoo) have some use cases where it would be great if following information is associated with the subnet db table

1. Rack switch info
2. Backplane info
3. DHCP ip helpers
4. Option to tag allocation pools inside subnets
5. Multiple gateway addresses

Heres our use cases in detail:

Case 1: IP allocation in L3 TOR deployments:

1. User sends a boot request as usual. The user need not know all the network and subnet information beforehand. All he would do is send a boot request.

2. The scheduler will pick a node in an L3 rack. The way we map nodes <-> racks is as follows:
    a. For VMs, we store rack_id in nova.conf on compute nodes
    b. For Ironic nodes, right now we have static IP allocation, so we practically know which IP we want to assign. But when we move to dynamic allocation, we would probably use 'chassis' or 'driver_info' fields to store the rack id.

3. Nova compute will try to pick a network ID for this instance. At this point, it needs to know what networks (or subnets) are available in this rack. Based on that, it will pick a network ID and send port creation request to Neutron. At Yahoo, to avoid some back-and-forth, we send a fake network_id and let the plugin do all the work.

4. We need some information associated with the network/subnet that tells us what rack it belongs to. Right now, for VMs, we have that information embedded in physnet name. But we would like to move away from that. If we had a column for subnets - e.g. tag, it would solve our problem. Ideally, we would like a column 'rack id' or a new table 'racks' that maps to subnets, or something. We are open to different ideas that work for everyone. This is where IPAM can help.

Case 2: Scheduling based on IP availability when user needs multiple IPs allocated for the instance

1. User sends a boot request with --num-ips X
    The network/subnet level complexities need not be exposed to the user. For better experience, all we want our users to tell us is the number of IPs they want.

2. When the scheduler tries to find an appropriate host in L3 racks, we want it to find a rack that can satisfy this IP requirement. So, the scheduler will basically say, "give me all racks that have >X IPs available". If we have a 'Racks' table in IPAM, that would help.
    Once the scheduler gets a rack, it will apply remaining filters to narrow down to one host and call nova-compute. The IP count will be propagated to nova compute from scheduler.

3. Nova compute will call Neutron and send the node details and IP count along. Neutron IPAM driver will then look at the node details, query the database to find a network in that rack and allocate X IPs from the subnet.

Case 3: Multiple Gateways for Subnets

Currently, the subnets in Neutron only support one gateway. For provider networks in large data centers like ours, quite often, the architecture is such a way that multiple gateways are configured for the subnets. These multiple gateways are typically spread across backplanes so that the production traffic can be load-balanced between backplanes. Neutron subnets currently don't support multiple gateways

In a way, this information is not specific to our company. Its generic information which ought to go with the subnets. Different companies can use this information differently in their IPAM drivers. But, the information needs to be made available to justify the flexibility of ipam. In fact, there are few companies that are interested in some having some of these attributes in the database.

Considering that the community is against arbitrary JSON blobs, I think we can expand the database to incorporate such use cases. I would prefer to avoid having our own database to make sure that our use-cases are always shared with the community.

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

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

Changed in neutron:
assignee: nobody → Shraddha Pandhe (shraddha-pandhe)
status: New → In Progress
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

As per [1], a spec is something that comes later on, as advised by the drivers team.

[1] http://docs.openstack.org/developer/neutron/policies/blueprints.html#neutron-request-for-feature-enhancements

Changed in neutron:
status: In Progress → New
Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

Adding DB tables is not a requirement. It's one of the means to fulfill a requirement or a use case. What is that you're trying to achieve?

I don't fully understand why we would want to ever track some of this information in Neutron. These would need to be exposed via the API too, but to what aim?

Please review [1], before submitting RFE reports.

[1] http://docs.openstack.org/developer/neutron/policies/blueprints.html#rfe-submission-guidelines

Revision history for this message
Kyle Mestery (mestery) wrote :

At first glance, I don't see why this info would be stored in the subnet db table. This is leaking out details of the physical topology into an entity of the logical model. I think the use case needs to be understood, because this doesn't seem like the right approach here.

Revision history for this message
Carl Baldwin (carl-baldwin) wrote :

From the discussion on the ML, the use case around this request is actually the "routed-networks" one that the large deployers team (LDT) has requested. Other relevant references can be found in this post [1].

[1] http://lists.openstack.org/pipermail/openstack-dev/2015-November/078910.html

Revision history for this message
Doug Wiegley (dougwig) wrote :

I agree with Armando, I'm seeing an implementation, not requirements.

If you just wanted to store extra info, you can derive from the ref today and add your own alembic/db class.

Is this new info expected to be available via an API?

An example of phrasing it as requirements, using just the first two bullets, I can ambiguously guess at, "We want to be able to give IPAM hints about rack switch and backplane to be used in ip allocation calculation", or, "We want to be able to store specific rack switch and backplane info about a given port after it's been allocated", or both, or ?

Revision history for this message
Gary Kotton (garyk) wrote :

Why not use tags? There is a sped for that

Revision history for this message
Shraddha Pandhe (shraddha-pandhe) wrote :

@garyk,

I went through the spec you referenced. Its not going to solve the problem. In fact, its probably going to make things worse.

To start with, tags have the same problem of people putting arbitrary data there. Maybe its not as bad as JSON blobs, but it is bad.

We want to put lot more information there and not just tags. We want to be able to schedule based on network information. I think its a valid use-case and potentially a more common use-case in future. In order to make scheduling decisions, ideal scenario would be storing the required data in separate columns in the database.

We could put all the information in the "tags" field itself, but we wont be able to do any intelligent DB operations on them. So IMHO, tags cannot be leveraged for scheduling purposes.

description: updated
Revision history for this message
Shraddha Pandhe (shraddha-pandhe) wrote :

@Kyle,

>> "This is leaking out details of the physical topology into an entity of the logical model."

I don't see this as "leaking out". I don't think there is anything wrong with storing physical network details in the database. As Carl said, a lot of companies, mostly large deployments don't use SDN. So the physical network architecture is actually the only information they have, and they need to be able to use it.

Currently we are solving this problem by making calls to external services that actually store the data, or put some hacks and embed some of information in the the name, etc. But we cant use any of that for scheduling. It will be extremely inefficient and won't scale.

I think it will be really great if Neutron can become the source of truth for this information.

@Doug,

>> "If you just wanted to store extra info, you can derive from the ref today and add your own alembic/db class."

That would be our last option, of course. The problem is, we do have our own database and our own IPAM driver, there is chance that, in future, a lot of our use cases won't make it to the community. Of course, its not an excuse and we will do everything to not let that happen, but own DB is always a short cut. Please consider that we are not exactly a vendor. A lot of our requirements come from scale. If its useful to others, we would like to know that. If we are doing something wrong, we would like to know that as well.

>> "Is this new info expected to be available via an API?"

Not necessary. We can leave it upto the drivers to use it or ignore it.

Revision history for this message
Armando Migliaccio (armando-migliaccio) wrote :

I am still struggling to understand this RFE: it's a gazillion use cases in one. It looks like it's a cross-projects effort, and it looks like there's overlapping with some other activities. IPAM is pluggable. Nothing should stop you to develop an IPAM driver with added knowledge on your datacenter and make it available as sub-project. What is that the Neutron core prevents your from doing?

I can't seem to justify why we would track this any differently, yet.

Changed in neutron:
status: New → Incomplete
importance: Undecided → Wishlist
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on neutron-specs (master)

Change abandoned by Armando Migliaccio (<email address hidden>) on branch: master
Review: https://review.openstack.org/242688
Reason: This review is > 4 weeks without comment and currently blocked by a core reviewer negative score. We are abandoning this for now. Feel free to reactivate the review by pressing the restore button and contacting the reviewer to ensure you address their concerns.

Changed in neutron:
assignee: Shraddha Pandhe (shraddha-pandhe) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.