Make sure that the health checks handle the state transitions properly

- nodes with states Provisioning, Provisioning Fail, Deprovisioning,
  and Deprovisioning Fail should bypass health checks and should never
  transition due to the existing machinery
- nodes with states Unavailable and Installed can transition to Ready
  if they check out as healthy
- nodes in the Ready state should transition to Unavailable if they
  fail a check
This commit is contained in:
Jeff Bradberry
2022-07-27 17:17:13 -04:00
parent 81e68cb9bf
commit 3bcd539b3d
3 changed files with 18 additions and 8 deletions

View File

@@ -441,6 +441,7 @@ class InstanceHealthCheck(GenericAPIView):
def post(self, request, *args, **kwargs):
obj = self.get_object()
# Note: hop nodes are already excluded by the get_queryset method
if obj.node_type == 'execution':
from awx.main.tasks.system import execution_node_health_check