Skip to content

feat: Show why a workload's instances could not be created - #372

Draft
scotwells wants to merge 1 commit into
mainfrom
feat/367-report-instance-failures
Draft

scotwells wants to merge 1 commit into
mainfrom
feat/367-report-instance-failures

Conversation

@scotwells

Copy link
Copy Markdown
Contributor

Summary

When the platform could not create an instance for a workload, the workload's status stayed empty, so the customer saw nothing running and no reason why.

The workload and its deployment now report the rejection as unavailable, quoting the API error, and this answer outranks slower causes such as provisioning or quota.

Errors that clear on retry, such as a conflict or a brief outage, still retry without touching status.

Test plan

  • A deployment whose instance is rejected as invalid or forbidden reports the rejection and the API error, and keeps retrying
  • A deployment that already has a serving instance stays available and reports the shortfall on its replica count
  • A workload with one rejected deployment and others still provisioning reports the rejection
  • Unit tests and lint pass

Related to #367

When the API server refused to create an Instance, the WorkloadDeployment
controller returned the error before writing any status. In production an
over-long generated label failed 132 times in 75 minutes while the
WorkloadDeployment and Workload both showed an empty status.

Key changes:
- Add the InstanceRejected reason for Instance writes the API server
  rejects as invalid or forbidden, which fail the same way on every retry
- Set ReplicasReady to InstanceRejected with the API server's message, and
  Available too while no instance is ready, then requeue as before
- Leave transient failures such as conflicts or an unreachable server off
  the status, since they clear on retry
- Rank InstanceRejected with the other hard errors in the Workload rollup
  so it outranks provisioning, quota and referenced-data blockers
- Catalog the reason for the diagnosis agent as a platform fault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant