Skip to content

Commit ec0c121

Browse files
gmanandhar-nrclaude
andcommitted
fix(nrdot-haproxy): use exit 31 for service failed to start
Use newrelic-cli standard exit code 31 instead of generic exit 1 when nrdot-collector fails to start. This allows the CLI to properly categorize the failure, matching the pattern used by nginx and elasticsearch-otel recipes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent afa8923 commit ec0c121

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

recipes/newrelic/infrastructure/nrdot/haproxy/debian.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,4 +391,5 @@ install:
391391
done
392392
echo "nrdot-collector failed to start within ${MAX_RETRIES} attempts." >&2
393393
journalctl -u nrdot-collector.service --no-pager -n 20
394-
exit 1
394+
# Exit 31: newrelic-cli standard code for service failed to start.
395+
exit 31

recipes/newrelic/infrastructure/nrdot/haproxy/rhel.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,5 +396,6 @@ install:
396396
done
397397
echo "nrdot-collector failed to start within ${MAX_RETRIES} attempts." >&2
398398
journalctl -u nrdot-collector.service --no-pager -n 20
399-
exit 1
399+
# Exit 31: newrelic-cli standard code for service failed to start.
400+
exit 31
400401

0 commit comments

Comments
 (0)