Octavia how to recreate deleted Amphora

asked 2020-05-25 17:25:52 -0500

chalans gravatar image

Hello,

OpenStack Stein version with Octavia with amphora/haproxy That is a question with an answer but i want to know if you have a better solution than me ;) My issue was the following : After a network outage some amphora lost their IPs. One of the solution was to stop/start them, but bad idea the instance was deleted ... So we are in the situation that the LoadBalancer is active but no amphora When we do an

openstack loadbalancer amphora list | grep {id_Lb}

=> nothing return ... It seems there are no command to retrieve , the only way was to go in database Octavia . Type

select * from load_balancer where id = 'Id_lb' ;
select * from amphora where load_balancer_id = 'id_lb' ;

That should return lines with id of amphora with status DELETED like this

| e8df1c33-566c-4ee0-91e0-35392d0f7e23 | 5a67ff45-b384-4e41-8eab-e3ccff6aebaf | DELETED | 49ab80bc-50a7-4c86-a173-1e25b3b94165 | 10.x.xxx | 10.x.xxx | 10.x.xxx | e55e68cb-4f55-4a96-a750-922a20502819 | dd00d6f6-09e2-4ecd-bf30-41a5c9fb5c30 | STANDALONE | 2022-05-04 08:05:31 |         0 | NULL           |       1 |          NULL | nova        | 20231 | 20:21 | 33b0ec25-b2d1-4d17-bb51-c1fa50495273 | octavia        |

Retrieve the id of the amphora Type

update amphora set status ='ERROR' where id = 'id_amphora' ;

Set the loadbalancer provisoning to ACTIVE for remove immuable

 update load_balancer set provisioning_status = 'ACTIVE' where id = 'id_lb' ;

The amphora should be present now and you can retrieve the id for a Failover to put it on Allocated status

openstack loadbalancer amphora list | grep id_lb

openstack loadbalancer amphora failover id_amphora

The amphora was recreated with the right information and you LB was ready to serve !

It works but that is a pain to do,we created an ansible playbook, but anyone have a better solution and more clean (i dont like to go in database ) ?

Thank you

Stephane Chalansonnet

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2020-06-01 12:54:46 -0500

johnsom gravatar image

Hi there,

You should be able to use the "openstack loadbalancer failover" command to rebuild those amphora. This is the intended mechanism for repairing a load balancer.

That said, there are some bugs in the failover flows in current versions of Octavia, such as Stein. We are working to get those fixed now, but in most cases you will not have a problem with the loadbalancer failover command.

This patch: https://review.opendev.org/705317 is the proposed fix for the edge cases where a "openstack loadbalancer failover" may not be successful on the existing versions of Octavia. Once this patch is approved we will work towards backporting it to the stable versions.

Michael

edit flag offensive delete link more

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2020-05-25 17:25:52 -0500

Seen: 86 times

Last updated: Jun 01