Open pcsegal opened 6 months ago
As the system user do the following.
nats server account purge acc1
Thank you.
If I understand correctly, this needs to be run before I remove the account from the configuration, right?
It can be run at any time, so if you run it now it will instruct the system to remove any jetstream artifacts from that account that are still on the system.
Thank you.
So, in a situation where accounts represent tenancies that can be decommissioned, forgetting to purge the account first could lead to downtime, if some stream with only 1 replica happens to live in the node that failed the healthcheck.
If I want to automate account purging, can something like the NACK operator help here? I see that NACK allows managing accounts via CRDs.
NACK does not allow purging accounts.
However, you can achieve that programatically by sending a Request to $JS.API.ACCOUNT.PURGE.{ACC_NAME}
in the client, using a System account. That achieves the same result as the CLI call.
Thank you; how about purging streams? Would NACK help with purging individual streams (rather than the entire account) when a stream CRD is deleted?
I ran into this same issue and am wondering why nsc delete account X
+ push -R X
doesnt do the equivelent of the purge command above? IE is there anyway to access the stranded assets after the account is deleted from the server?
Not at this time via the JS API layer, but you can access on disk.
Observed behavior
When I do the following:
acc1
.acc1
.acc1
and adding accountacc2
.Expected behavior
NATS should still load if an account is removed from the configuration.
Server and client version
Server: 2.10.14 Client: 0.1.1
Host environment
Ubuntu 20.04, amd64.
Steps to reproduce
Here is a gist with an example reproducing the issue:
https://gist.github.com/pcsegal/532d15b827d9b13f8a1456e95f1ebc52
The script
test-cluster.sh
and the accompanying files should all be in the same directory.The script runs through the described scenario.
In the end, the node in which the KV bucket was placed should be unable to load. It should show the following warning in the logs:
In turn, the other nodes will show the following warning: