opendut icon indicating copy to clipboard operation
opendut copied to clipboard

Unable to delete Peers from Netbird

Open mtwardawski opened this issue 1 year ago • 1 comments

If we try to delete peers from LEA (not sure, if this also happens in CLEO when trying to delete peers, but most likely) we encounter an error in CARLs logs which has its origin in Netbird.

The deletion of a group in Netbird was not successful:

Received status code '400 Bad Request' when deleting NetBird group with ID <GroupId("cq8k7e70vv0s73abfjb0")>:
  {"message":"group has been linked to setup key: opendut-peer-32b3fbc4-aa5c-49dc-900d-935cd50af57e","code":400}

Complete error log:

2024-07-12T14:58:48.628914Z TRACE delete_peer_descriptor:delete_peer_descriptor:delete_peer:delete_netbird_group: opendut_vpn_netbird::client::request_handler: Sending request DELETE https://netbird-api.opendut.local/api/groups/cq8k7e70vv0s73abfjb0 peer_id=PeerId(32b3fbc4-aa5c-49dc-900d-935cd50af57e) group_id=GroupId("cq8k7e70vv0s73abfjb0")
2024-07-12T14:58:48.631838Z TRACE delete_peer_descriptor:delete_peer_descriptor:delete_peer:delete_netbird_group: opendut_vpn_netbird::client::request_handler: Got response 400 Bad Request peer_id=PeerId(32b3fbc4-aa5c-49dc-900d-935cd50af57e) group_id=GroupId("cq8k7e70vv0s73abfjb0")
2024-07-12T14:58:48.631866Z TRACE delete_peer_descriptor:delete_peer_descriptor:delete_peer:delete_netbird_group: opendut_vpn_netbird::client::request_handler: Network request completed. peer_id=PeerId(32b3fbc4-aa5c-49dc-900d-935cd50af57e) group_id=GroupId("cq8k7e70vv0s73abfjb0")
2024-07-12T14:58:48.632020Z ERROR delete_peer_descriptor:delete_peer_descriptor:delete_peer:delete_netbird_group: opendut_vpn_netbird::client: Received status code '400 Bad Request' when deleting NetBird group with ID <GroupId("cq8k7e70vv0s73abfjb0")>:
  {"message":"group has been linked to setup key: opendut-peer-32b3fbc4-aa5c-49dc-900d-935cd50af57e","code":400}
 peer_id=PeerId(32b3fbc4-aa5c-49dc-900d-935cd50af57e) group_id=GroupId("cq8k7e70vv0s73abfjb0")
2024-07-12T14:58:48.632058Z ERROR delete_peer_descriptor:delete_peer_descriptor: opendut_carl::actions::peers: Peer 'matthias' <32b3fbc4-aa5c-49dc-900d-935cd50af57e> deleted with internal errors:
  An error occurred while deleting peer <32b3fbc4-aa5c-49dc-900d-935cd50af57e>:
  Received status code '400 Bad Request' indicating an error: {"message":"group has been linked to setup key: opendut-peer-32b3fbc4-aa5c-49dc-900d-935cd50af57e","code":400}

At the moment of writting the ticket, we have no particular solution. First steps could be to analyze the issue and try to make the deletion of peers in Netbird work.

AC:

  • [ ] Analyze error
  • [ ] Come up with a solution or solve the problem

mtwardawski avatar Jul 15 '24 08:07 mtwardawski

using Netbird groups was a workaround for missing persistence handling the peer IDs. Revoking the setup string should allow deletion of group. --> maybe we can keep the groups for now and just revoke the setup string (group becomes unusable).

mirenz1 avatar Jul 17 '24 12:07 mirenz1

This has not been observed in a while. Might have been fixed by #18.

mbfm avatar Dec 18 '24 10:12 mbfm