Question 480
A Linux administrator evaluates: A bash function returns nonzero and its caller ignores the status before declaring the deployment healthy. Select TWO complementary answers: the most suitable corrective action AND the evidence proving it worked.
Explanation
Correct Answers
For the specific observation (A bash function returns nonzero and its caller ignores the status before declaring the deployment healthy), the acceptance evidence is: An intentionally failed command triggers a nonzero job result and stops the dependent publication or deletion step. This verifies the action (Check command exit codes and use supported shell error handling such as explicit if tests and pipefail where appropriate to prevent false success.) rather than merely proving that an unrelated Linux tool works. It also addresses the known risk: A pipeline that returns the last successful command status can hide an earlier failed backup or data transfer.
The observed Linux condition is: A bash function returns nonzero and its caller ignores the status before declaring the deployment healthy. The recommended direct administrative response is: Check command exit codes and use supported shell error handling such as explicit if tests and pipefail where appropriate to prevent false success. The relevant failure or security risk is: A pipeline that returns the last successful command status can hide an earlier failed backup or data transfer. Validate success with: An intentionally failed command triggers a nonzero job result and stops the dependent publication or deletion step.
Incorrect Answers
Git branch workflow and reviewed merging (4.4) addresses another technical failure: Editing the main branch directly or merging without a review can deploy untested configuration to production. The case states: the most suitable corrective action AND the evidence proving it worked. The most direct paired action and test is: An intentionally failed command triggers a nonzero job result and stops the dependent publication or deletion step.
AI data governance and sensitive prompt handling (4.5) would demonstrate or implement: A documented review confirms submitted prompts contain only permitted or sanitized data and no live credentials. This choice can be useful for that problem, but it does not establish the Shell exit status and fail-fast pipelines control being assessed here.
Python virtual environments and dependencies (4.3) would demonstrate or implement: Installing packages globally can break OS-managed Python tools or cause incompatible versions between applications. The paired-answer requirement concerns Shell exit status and fail-fast pipelines; this alternative does not provide the matching intervention and separate acceptance evidence.