[openstack-dev] [Quantum] [LBaaS] Quantum create port
Dan Wendlandt
dan at nicira.com
Thu Nov 29 20:44:01 UTC 2012
On Thu, Nov 29, 2012 at 12:11 PM, John Gruber <john.t.gruber at gmail.com>wrote:
> Looking for advice...
>
> I am working with Quantum as an IPAM solution and preparing for the basic
> methods needed to get L3 addressing on the appropriate subnets for an LBaaS
> device cluster.
>
> Because every L3 address object inside a L2 failover domain will require
> the same MAC address, I can't just create separate ports for each L3 object
> as the MAC address can only be 'in-use' on one port at a time for Quantum.
> This makes sense, but leads me to a problem. There is neither 1) a way to
> specify the number of fixed IP addresses you want allocated when you create
> a port nor 2) a way to update a port telling Quantum to allocate an
> additional fixed IPs to that port.
>
> So I am left with tracking all the ports for a network, mapping them to
> subnets, doing IP address math to understand the start and end of the
> allocation pool, then trying to 'guess', with possibly repeated update
> calls to the port, what new set of fixed IPs I can put together, letting
> exceptions occur to tell me if I need to try again. This is a bad plan. I
> have not done this yet, but will if I have to. Basically reproducing a lot
> of Quantum IPAM business logic outside of Quantum.
>
> Is this why it was suggested just to access the DB directly?
>
> I'm really hoping that I'm wrong and there is a way in the Quantum API
> that I missed to simply get additional fixed IPs allocated for a port on
> the same subnet. Seems like an obvious requirement even for VM hosts with
> aliased IP addresses on the same quantum port, so I had assumed it was
> would be in the API syntax.
>
> I see bugs for multiple floating IPs:
>
> https://bugs.launchpad.net/quantum/+bug/1057844
>
> and advice on adding multiple fixed IPs on different subnets:
>
> https://lists.launchpad.net/openstack/msg17634.html
>
> But I am missing how to create multiple fixed_ips on the same subnet for
> the same port. Preferably calls to update a port and have Quantum allocate
> additional fixed_ips without the client having to already know which IPs it
> can have.
>
>From what I'm reading, it would be exactly like the example you linked to
above, but specify the same subnet-id twice if you want both of the fixed
IPs to be from the same subnet.
nicira at com-dev:~/devstack$ quantum subnet-list -c id -c network_id
+--------------------------------------+--------------------------------------+
| id | network_id
|
+--------------------------------------+--------------------------------------+
| 2ff33f9d-0468-4d60-97c3-3a41e1ae1d25 |
a1d4ed77-122a-42d6-97eb-0e8394005374 |
+--------------------------------------+--------------------------------------+
nicira at com-dev:~/devstack$ quantum port-create --fixed-ip
subnet_id=2ff33f9d-0468-4d60-97c3-3a41e1ae1d25 --fixed-ip
subnet_id=2ff33f9d-0468-4d60-97c3-3a41e1ae1d25
a1d4ed77-122a-42d6-97eb-0e8394005374
Created a new port:
+----------------+---------------------------------------------------------------------------------+
| Field | Value
|
+----------------+---------------------------------------------------------------------------------+
| admin_state_up | True
|
| device_id |
|
| device_owner |
|
| fixed_ips | {"subnet_id": "2ff33f9d-0468-4d60-97c3-3a41e1ae1d25",
"ip_address": "10.1.0.7"} |
| | {"subnet_id": "2ff33f9d-0468-4d60-97c3-3a41e1ae1d25",
"ip_address": "10.1.0.8"} |
| id | 20ae47bc-8708-4c65-b761-67d4c8672964
|
| mac_address | fa:16:3e:c2:82:74
|
| name |
|
| network_id | a1d4ed77-122a-42d6-97eb-0e8394005374
|
| status | ACTIVE
|
| tenant_id | 80a03bf4d7a04839a2ff149357733260
|
+----------------+---------------------------------------------------------------------------------+
Is this sufficient, or am I misunderstanding what you're asking?
Dan
>
> I even see recent messages where the libvirt driver only support 1 IP per
> vif right now:
>
> http://www.gossamer-threads.com/lists/openstack/dev/20264
>
> That doesn't help the LBaaS device.
>
> I didn't find anything obvious showing how to allocate multiple fixed_ips
> on the same port on the same subnet. Forgetting HA even for a minute,
> won't we need to allocate a fixed_ip for each VIP on a Quantum managed
> subnet? We might be doing this a lot no?
>
> Am I missing something obvious?
>
> John Gruber
>
>
> _______________________________________________
> OpenStack-dev mailing list
> OpenStack-dev at lists.openstack.org
> http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev
>
>
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dan Wendlandt
Nicira, Inc: www.nicira.com
twitter: danwendlandt
~~~~~~~~~~~~~~~~~~~~~~~~~~~
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20121129/21da4379/attachment.html>
More information about the OpenStack-dev
mailing list