Feature: Instance removal
Picodata should provide a user-friendly way to remove an instance from a cluster.
When an instance is down it is hard to automatically determine if the instance is unavailable temporarily or if it is lost forever. Therefore instance deletion should be triggered manually by an admin command.
API
Lua: picodata.remove_instance(instance_id)
The implementation should be done in Rust, the Lua API should only proxy calls to Rust.
CLI:
picodata --address ADDR rm instance <instance_id>
picodata -a ADDR rm i <instance_id>
where ADDR is an address of any instance of the cluster
Behavior
The procedure of an instance removal is the following:
- Bring the instance down.
- Execute the instance removal command.
If the instance removal command is issued while the instance is running, an error should be raised.
DoD
- The API is implemented
- CLI command
- Integration test
- The docs website contains a brief description of the feature usage.
Motivation
Instance removal is a basic functionality required for production usage. An instance removal is needed when, for example, a server where the instance is running is decommissioned.