gravitl / netmaker

Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks.
https://netmaker.io
Other
9.52k stars 552 forks source link

[Bug]: v0.20.0 host still has associated nodes, when trying to delete a netclient host in unknown state #2322

Closed jalbstmeijer closed 1 year ago

jalbstmeijer commented 1 year ago

Contact Details

No response

What happened?

Upgraded from v0.19 docker images. I found some duplicate netclient hosts from previous attempts. They are in a "unknown" state. When I try to remove them I get the error:

Failed to delete host
host still has associated nodes

In the netmaker logs I see

netmaker  | [netmaker] 2023-05-20 09:34:36 admin failed to delete a host: host still has associated nodes 
netmaker  | [netmaker] 2023-05-20 09:34:36 processed request error: host still has associated nodes 

What does it mean? these hosts have no ingress or egress gw's assigned.

Version

v0.20.0

What OS are you using?

No response

Relevant log output

netmaker  | [netmaker] 2023-05-20 09:34:36 admin failed to delete a host: host still has associated nodes 
netmaker  | [netmaker] 2023-05-20 09:34:36 processed request error: host still has associated nodes 


### Contributing guidelines

- [X] Yes, I did.
afeiszli commented 1 year ago

Netmaker prevents you from deleting a host if it is currently in networks. In the UI, remove the hosts from the network first, then delete the hosts.

jalbstmeijer commented 1 year ago

@afeiszli

These hosts in unknown state are not mentioned in the network overviews. I only see the healthy hosts in the network overviews.

hunterljc commented 1 year ago

@jalbstmeijer 健康的网络就可以先disconnect 然后再删除

luzfcb commented 1 year ago

I have the same problem here. It occurred after I removed all hosts from all existing networks and then immediately removed the networks themselves, and when trying to remove the hosts, I get the message "host still has associated nodes" from a host with Unknown.

kaaass commented 1 year ago

Suffering the same situation as @luzfcb. I got this message after disconnecting the host from every existing network.

JPBeltman commented 1 year ago

Experiencing the same issue. The node in question is not in my possession anymore, and (stupidly) removed it before I removed it from the netmaker portal.

Would be nice to have a sort of 'nuke' button to disband a network and all of its clients/host in case of emergency

brapp0111 commented 1 year ago

Similar issue here. I uninstalled netclient from a host without removing it from netmaker. Re-installed netclient then rejoined the network. Now there are two hosts with the same name, one listed as healthy and the other is listed as unknown. I cannot delete the host listed as unknown. I'm running version 0.20.1.

abhishek9686 commented 1 year ago

Force delete is added in the upcoming release v0.20.5, which lets you delete the host and all of its associated nodes at once

Rudi9719 commented 1 year ago

Bringing this back up, I ended up in this situation however force delete does not solve the issue The popup when force deleting an unknown host