Shutdown and restart management in a distributed computing environment
Devices, methods, and systems for shutdown and restart management in a distributed computing environment are described herein. One method includes determining whether a backup of a workload in a distributed computing environment exists, causing a shutdown sequence of the workload to occur at a first predetermined time to shut down the workload, and causing a restart sequence of the workload to occur to restart the workload in the distributed computing environment.
1 . A method for shutdown and restart management in a distributed computing environment, comprising:
determining, by a computing device, whether a backup of a workload in a distributed computing environment exists;
in response to determining the backup of the workload exists:
causing, by the computing device, a shutdown sequence of the workload to occur at a first predetermined time to shut down the workload in the distributed computing environment;
causing, by the computing device at a second predetermined time that is after the first predetermined time, and after the shutdown sequence has been successfully completed, a restart sequence of the workload to occur to restart the workload in the distributed computing environment;
determining, by the computing device during the shutdown sequence, whether an exemption exists for the workload; and
in response to determining the exemption exists for the workload, initiating halting of the shutdown sequence to refrain from shutting down the workload.
2 . The method of claim 1 , wherein the method includes causing the shutdown sequence to continue to shut down the workload in response to determining no exemption exists for the workload.
3 . The method of claim 1 , wherein the method includes generating, by the computing device, an alert indicating a failure to initiate the shutdown sequence in response to determining the backup of the workload does not exist.
4 . The method of claim 1 , wherein the method includes generating, by the computing device, an alert in response to the restart sequence not being successfully completed.
5 . The method of claim 1 , wherein:
the method includes polling a database to determine whether the backup of the workload exists; and
in response to the backup of the workload not existing in the database, the method includes refraining from initiating the shutdown sequence.
6 . The method of claim 1 , wherein the method includes receiving, by the computing device, an exemption request for an exemption for the workload.
7 . The method of claim 6 , wherein the method includes:
generating, by the computing device, an exemption in response to the exemption request, wherein the exemption is valid for a predetermined period of time; and
saving, by the computing device, the exemption in a database.
8 . The method of claim 6 , wherein the method includes:
receiving, by the computing device, a user input approving the exemption request or denying the exemption request;
saving, by the computing device in response to the user input approving the exemption request, the exemption in a database; and
deleting, by the computing device in response to the user input denying the exemption request, the exemption request.
9 . A non-transitory computer readable medium storing instructions executable by a processing resource to cause the processing resource to:
cause a backup sequence to occur to generate a backup of a workload in a distributed computing environment;
cause the backup sequence to occur by iterating through resources in the distributed computing environment to list a number of namespaces in the distributed computing environment;
determine whether the backup of the workload in the distributed computing environment exists;
cause, in response to determining the backup of the workload exists, a shutdown sequence of the workload to occur at a first predetermined time to shut down the workload in the distributed computing environment; and
cause, at a second predetermined time that is after the first predetermined time and after the shutdown sequence has been successfully completed, a restart sequence of the workload to occur to restart the workload in the distributed computing environment.
10 . The non-transitory computer readable medium of claim 9 , comprising instructions to store specifications of the number of namespaces and replica counts associated with the resources in the distributed computing environment in a database.
11 . The non-transitory computer readable medium of claim 10 , comprising instructions to generate, in response to the specifications and the replica counts being successfully stored in the database, an alert indicating the backup sequence was successful.
12 . The non-transitory computer readable medium of claim 10 , comprising instructions to generate, in response to the specifications and the replica counts not being successfully stored in the database, an alert indicating the backup sequence failed.
13 . A computing device for shutdown and restart management in a distributed computing environment, comprising:
a processing resource; and
a memory resource storing non-transitory machine-readable instructions to cause the processing resource to:
cause a backup sequence for a workload in a distributed computing environment to occur to generate a backup of the workload and save the backup to a database;
determine the backup of the workload exists in the database;
cause, in response to determining the backup of the workload exists in the database, a shutdown sequence of the workload to occur at a first predetermined time to shut down the workload in the distributed computing environment; and
cause, at a second predetermined time that is after the first predetermined time and after the shutdown sequence has been successfully completed, a restart sequence of the workload to occur to restart the workload in the distributed computing environment;
determine, during the shutdown sequence, whether an exemption exists for the workload; and
in response to determining the exemption exists for the workload, initiate stopping the shutdown sequence to refrain from shutting down the workload.
14 . The computing device of claim 13 , wherein the restart sequence includes retrieving the backup of the workload from the database.
15 . The computing device of claim 13 , wherein the restart sequence includes recreating and scaling resources in the distributed computing environment to run the workload based on the backup of the workload.
16 . The computing device of claim 13 , wherein the distributed computing environment is a Kubernetes environment.
17 . The computing device of claim 16 , wherein the workload is run on a pod in the Kubernetes environment.