Octavia how to recreate deleted Amphora
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