[openstack-dev] [neutron] Significance of subnet_id for LBaaS Pool
Rabi Mishra
ramishra at redhat.com
Tue Feb 25 06:06:47 UTC 2014
Hi All,
'subnet_id' attribute of LBaaS Pool resource has been documented as "The network that pool members belong to"
However, with 'HAProxy' driver, it allows to add members belonging to different subnets/networks to a lbaas Pool.
It also allows to create VIP from a separate subnet than the pool. I could see there is a validation in horizon that restricts vip to the subnet of the pool.
My understanding is that a Pool with a specific subnet, would allow members from the same subnet and the VIP would be also of the same subnet.
Can someone please help clarify the design consideration?
[stack at devstack-rabi devstack]$ neutron lb-pool-create --name http-pool --lb-method ROUND_ROBIN --protocol HTTP --subnet-id 547f99da-7dd5
[stack at devstack-rabi devstack]$ neutron lb-pool-list
+--------------------------------------+-----------+----------+-------------+----------+----------------+--------+
| id | name | provider | lb_method | protocol | admin_state_up | status |
+--------------------------------------+-----------+----------+-------------+----------+----------------+--------+
| 8235339a-4158-468b-9377-5ece0826e7a6 | http-pool | haproxy | ROUND_ROBIN | HTTP | True | ACTIVE |
+--------------------------------------+-----------+----------+-------------+----------+----------------+--------+
[stack at devstack-rabi devstack]$ neutron lb-member-create --address 10.0.0.2 --protocol-port 80 http-pool
Created a new member:
+--------------------+--------------------------------------+
| Field | Value |
+--------------------+--------------------------------------+
| address | 10.0.0.2 |
| admin_state_up | True |
| id | e9515a09-1a95-4875-b45f-3b2bab559eb8 |
| pool_id | 8235339a-4158-468b-9377-5ece0826e7a6 |
| protocol_port | 80 |
| status | PENDING_CREATE |
| status_description | |
| tenant_id | c46ae2b06ee54d06828c346f77fb5628 |
| weight | 1 |
+--------------------+--------------------------------------+
[stack at devstack-rabi devstack]$ neutron lb-member-create --address 10.10.0.2 --protocol-port 80 http-pool
Created a new member:
+--------------------+--------------------------------------+
| Field | Value |
+--------------------+--------------------------------------+
| address | 10.10.0.2 |
| admin_state_up | True |
| id | 4f4ecd2d-b734-4a98-95ac-06d9d09ddb62 |
| pool_id | 8235339a-4158-468b-9377-5ece0826e7a6 |
| protocol_port | 80 |
| status | PENDING_CREATE |
| status_description | |
| tenant_id | c46ae2b06ee54d06828c346f77fb5628 |
| weight | 1 |
+--------------------+--------------------------------------+
[stack at devstack-rabi devstack]$ neutron lb-member-list --sort-key address --sort-dir asc
+--------------------------------------+-----------+---------------+--------+----------------+--------+
| id | address | protocol_port | weight | admin_state_up | status |
+--------------------------------------+-----------+---------------+--------+----------------+--------+
| 4f4ecd2d-b734-4a98-95ac-06d9d09ddb62 | 10.10.0.2 | 80 | 1 | True | ACTIVE |
| e9515a09-1a95-4875-b45f-3b2bab559eb8 | 10.0.0.2 | 80 | 1 | True | ACTIVE |
+--------------------------------------+-----------+---------------+--------+----------------+--------+
[stack at devstack-rabi devstack]$ neutron lb-vip-create --name http-vip --protocol-port 80 --protocol HTTP --subnet-id b1557101-c8f1-415a-846d-6d165a8e8fc2 8235339a-4158-468b-9377-5ece0826e7a6
Created a new vip:
+---------------------+--------------------------------------+
| Field | Value |
+---------------------+--------------------------------------+
| address | 10.10.0.4 |
| admin_state_up | True |
| connection_limit | -1 |
| description | |
| id | 409e72e6-5a3c-4a7b-be0b-6a8784193dfc |
| name | http-vip |
| pool_id | 8235339a-4158-468b-9377-5ece0826e7a6 |
| port_id | 9dfc3a6f-4641-4f1d-835b-bda3aea9c6ce |
| protocol | HTTP |
| protocol_port | 80 |
| session_persistence | |
| status | PENDING_CREATE |
| status_description | |
| subnet_id | b1557101-c8f1-415a-846d-6d165a8e8fc2 |
| tenant_id | c46ae2b06ee54d06828c346f77fb5628 |
+---------------------+--------------------------------------+
[stack at devstack-rabi devstack]$ neutron lb-vip-list
+--------------------------------------+----------+-----------+----------+----------------+--------+
| id | name | address | protocol | admin_state_up | status |
+--------------------------------------+----------+-----------+----------+----------------+--------+
| 409e72e6-5a3c-4a7b-be0b-6a8784193dfc | http-vip | 10.10.0.4 | HTTP | True | ACTIVE |
+--------------------------------------+----------+-----------+----------+----------------+--------+
Regards,
Rabi Mishra
More information about the OpenStack-dev
mailing list