Fix IPv6 member delete on batch operation

When IPv6 is used on the LB+Member and a batch operation is
done over the members (including a delete of one of them),
the member affected remains in ERROR state.

This patch fix the way of extract the info from the member to
create the request to the helper correctly.

Closes-Bug: #1981594

Change-Id: I5a3e836deff810af5b9ad071c7b16f6bd5fdcdcc
(cherry picked from commit 6711a3e32d)
This commit is contained in:
Fernando Royo 2022-07-13 16:39:41 +02:00
parent 29570d3bb9
commit d052e39af7

View File

@ -384,12 +384,14 @@ class OvnProviderDriver(driver_base.ProviderDriver):
for member in members_to_delete: for member in members_to_delete:
member_info = member.split('_') member_info = member.split('_')
member_ip, member_port, subnet_id = (
self._ovn_helper._extract_member_info(member)[0])
request_info = {'id': member_info[1], request_info = {'id': member_info[1],
'address': member_info[2].split(':')[0], 'address': member_ip,
'protocol_port': member_info[2].split(':')[1], 'protocol_port': member_port,
'pool_id': pool_id} 'pool_id': pool_id}
if len(member_info) == 4: if len(member_info) == 4:
request_info['subnet_id'] = member_info[3] request_info['subnet_id'] = subnet_id
request = {'type': ovn_const.REQ_TYPE_MEMBER_DELETE, request = {'type': ovn_const.REQ_TYPE_MEMBER_DELETE,
'info': request_info} 'info': request_info}
request_list.append(request) request_list.append(request)