The most optimal way to correct the failed deployment is to retry the failed deployment. This option allows the administrator to resume the deployment from the point of failure, without having to redeploy the entire application or create a new runbook. Retrying the failed deployment also preserves the application state and configuration, and avoids creating duplicate resources or conflicts.
Redeploying the application is not the best option, because it requires the administrator to delete the existing application and launch a new one from scratch. This option wastes time and resources, and may result in data loss or inconsistency.
Creating a runbook to retry is also not the best option, because it requires the administrator to write a custom script or workflow to handle the retry logic. This option adds complexity and overhead to the automation process, and may not be compatible with the original blueprint or application.
Rewriting the blueprint to have error handling is a valid option, but it is not the most optimal one. This option requires the administrator to modify the blueprint code and add logic to handle different types of errors and exceptions. This option improves the robustness and reliability of the blueprint, but it does not correct the failed deployment itself. The administrator still has to redeploy the application or retry the failed deployment after rewriting the blueprint.
References:
Nutanix Calm User Guide: Chapter 6: Managing Applications
Nutanix Calm DSL User Guide: Chapter 4: Blueprints
Nutanix Certified Professional - Multicloud Automation (NCP-MCA) Exam Blueprint Guide: Section 3: Validate Blueprints, Runbooks, Playbooks, and Automation Settings