Page 1 of 1

How to force leave node from the cluster

Posted: Mon May 16, 2022 1:43 pm
by vlisnyi
I have a node that was reclaimed by AWS, in web UI it shows as

Code: Select all

    Unable to reach this node
    Reason: User timeout caused connection failure.
Manuals show that I can remove a node from the cluster by clicking "Remove" in the cluster-admin area or executing on the exact node

Code: Select all

sacli ClusterLeave
But in this case, I can not do this, because the node agent has already died (node terminated by AWS). I can try of course remove this node in MySQL database, but is there any ability to remove an already terminated node from the cluster in a proper way without modifying MySQL database tables.

Re: How to force leave node from the cluster

Posted: Tue May 17, 2022 10:31 am
by openvpn_inc
Hi Vlisnyi,

In this case you can use these example commands on any of the functional nodes to remove a node called "deadnode":
./confdba --cluster --prof="deadnode" -dk sacli_ip
./confdba --cluster --prof="deadnode" -dk sacli_listen_ip
./confdba --cluster --prof="deadnode" -dk sacli_port

Kind regards,
Johan

Re: How to force leave node from the cluster

Posted: Tue May 17, 2022 11:43 am
by vlisnyi
Thanks for help, this removed records for deleted server from as_cluster database in config table, but seems like also need to remove the profile in the same database but in profile table

Code: Select all

/usr/local/openvpn_as/scripts/confdba --cluster --prof="test-vpn-1" --rm
I also test on another dead server

Code: Select all

/usr/local/openvpn_as/scripts/confdba --cluster --prof="test-vpn-2" --rm
and this command delete profile and all profile information and you don't need to execute 3 previous commands to clean config table