anjuna-nitro-cli terminate-enclave
anjuna-nitro-cli terminate-enclave --enclave-name <enclave-name> [OPTIONS...]
Terminates one or all enclaves that are running.
When issuing the terminate-enclave option, the Anjuna Runtime will first send a SIGTERM signal to the main process inside the enclave, allowing it to do any needed termination activities to allow for a graceful termination before exiting. The main process has a default grace period of 30 seconds for the termination activities. After the main process exits or the grace period expires, the Anjuna Runtime will perform any remaining termination activities and then terminate the enclave. If the grace period expires before the enclave finishes its termination activities, a message displays indicating that a forceful termination occurred due to the expiration of the grace period.
You can also define a specific grace period other than 30 seconds or decide to terminate the enclave immediately. This is described in the Options section below.
When destroying an Anjuna Enclave Pod in Kubernetes, the same flow and behavior will take place. Refer to Deleting a Pod for more information.
Options
--enclave-name
(Recommended) Custom name assigned to the enclave by the user, used to uniquely identify an enclave
Required to identify the enclave that you want to terminate, with the exception of the following situations:
-
Only one enclave is running, and that enclave was started with the default name
-
The
--all
argument is included, which negates the need for an enclave name
Examples
To terminate a specific enclave, with the enclave name of "example":
$ anjuna-nitro-cli terminate-enclave --enclave-name example
To terminate all running enclaves:
$ anjuna-nitro-cli terminate-enclave --all
To terminate a specific enclave with a 45-second grace period instead of the default 30-seconds:
$ anjuna-nitro-cli terminate-enclave --enclave-name example --grace-period 45
To terminate a specific enclave immediately, with no grace period:
$ anjuna-nitro-cli terminate-enclave --enclave-name example --force