Skip to content

Commit c2c5a4c

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "Add specs to resize a load balancer"
2 parents 47b8c36 + 29855dd commit c2c5a4c

File tree

2 files changed

+158
-0
lines changed

2 files changed

+158
-0
lines changed

doc/source/contributor/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,15 @@ Version 14.0 (caracal)
9898

9999
specs/version14.0/*
100100

101+
Version 15.0 (Dalmatian)
102+
````````````````````````
103+
104+
.. toctree::
105+
:glob:
106+
:maxdepth: 1
107+
108+
specs/version15.0/*
109+
101110
.. only:: latex
102111

103112
Module Reference

specs/version15.0/resize.rst

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
======================
2+
Load balancer resizing
3+
======================
4+
Link to blueprint: https://blueprints.launchpad.net/octavia/+spec/octavia-resize-loadbalancer
5+
6+
This spec's goal is to describe the functionality of resizing of load
7+
balancers. The main aim of this new feature is to enable you to change the
8+
flavor directly from the API.
9+
10+
Problem description
11+
===================
12+
Today's users can't easily change the flavor. They have to recreate their load
13+
balancer with the new flavor and migrate their configurations such as
14+
l7 rules, listeners, etc.
15+
This can be very tedious for a user who wants to quickly resize his load
16+
balancer. It can be especially complicated to script.
17+
18+
Proposed change
19+
===============
20+
The proposed change would be to add an endpoint to allow load balancer
21+
resizing. It would also be easy to cancel a resize in progress and return
22+
to the previous flavor.
23+
24+
To achieve this, the endpoint will launch a workflow to initiate a failover
25+
with the new flavor ID. This will involve patching the `get_failover_LB_flow`
26+
to add the `flavorId` parameter. At the end of the workflow the `flavor_id`
27+
will be updated in the `loadbalancer` table.
28+
29+
A check will be added before the start of the failover to prevent migration
30+
to a flavor profile topology different from the original one. A user cannot
31+
migrate from a flavorprofile standalone to active/passive.
32+
33+
If a problem occurs during resizing, the load balancer status will be set
34+
to ERROR. The flavor will remain the same in database, allowing the user
35+
to perform a failover or retry the same call.
36+
37+
Alternatives
38+
------------
39+
* Rebuild the vm of the loadbalancer with the new flavor compute.
40+
* Use the "backup" and "restore".
41+
42+
43+
Data model impact
44+
-----------------
45+
None
46+
47+
48+
REST API impact
49+
---------------
50+
Add one endpoint in `/v2.0/lbaas/loadbalancers`.
51+
52+
To run this endpoint, the user must have the role `load-balancer:write"`.
53+
54+
Start a resize of a load balancer::
55+
56+
PUT /v2.0/lbaas/loadbalancers/{loadbalancer_id}/resize
57+
58+
{
59+
"new_flavor_id": "6d425a5e-429f-4848-b240-ab31c6d211e4"
60+
}
61+
62+
.. list-table:: Response code
63+
:widths: 15 50
64+
:header-rows: 1
65+
66+
* - Code
67+
- Description
68+
* - 202 Accepted
69+
- Resize starting
70+
* - 400 Bad request
71+
- Resize object is invalid
72+
* - 401 Unauthorized
73+
- X-Auth-Token is invalid
74+
* - 403 Forbidden
75+
- X-Auth-Token is valid, but the associated project does not have
76+
the appropriate role/scope
77+
* - 404 Not Found
78+
- Load balancer not found
79+
80+
Security impact
81+
---------------
82+
None
83+
84+
Notifications impact
85+
--------------------
86+
Add a notification to announce a loadbalancer resize.
87+
88+
Other end user impact
89+
---------------------
90+
Add one command to launch resize in CLI client.
91+
92+
Start a resize: openstack loadbalancer resize \
93+
--flavor <flavor-id|flavor-name> \
94+
<lb-id|lb-name>
95+
96+
Add functions to resize in the `openstacksdk`.
97+
98+
Performance Impact
99+
------------------
100+
None
101+
102+
103+
Other deployer impact
104+
---------------------
105+
None
106+
107+
108+
Developer impact
109+
----------------
110+
None
111+
112+
113+
Implementation
114+
==============
115+
116+
Assignee(s)
117+
-----------
118+
TBD
119+
120+
Work Items
121+
----------
122+
- Create endpoints
123+
- Patch the `get_failover_LB_flow` to add `flavorId` parameter.
124+
- Add unit tests
125+
- Add API functional tests
126+
- Add tempest tests
127+
- Update Octavia CLI and OpenstackSDK
128+
- Write Documentation
129+
130+
Dependencies
131+
============
132+
None
133+
134+
Testing
135+
=======
136+
Tempest tests should be added for testing this new feature:
137+
- Create a loadbalancer
138+
- Try to resize
139+
140+
Documentation Impact
141+
====================
142+
- A user guide to explain how that works.
143+
- Add a note on the fact that some flavor changes can cause data plane
144+
downtime. Similarly, going from a newer image tag to an older one may
145+
cause failures or features to be disabled.
146+
147+
References
148+
==========
149+
None

0 commit comments

Comments
 (0)