refactor: store CSE exit codes in code #3012
Conversation
@@ -1,72 +1,5 @@ | |||
#!/bin/bash | |||
ERR_SYSTEMCTL_STOP_FAIL=3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make sure you change the doc references that point to this (ie. troubleshooting doc, AKS wiki, etc)
Codecov Report
@@ Coverage Diff @@
## master #3012 +/- ##
=========================================
- Coverage 72.1% 72.1% -0.01%
=========================================
Files 141 142 +1
Lines 26259 26259
=========================================
- Hits 18935 18934 -1
- Misses 6229 6230 +1
Partials 1095 1095 |
@yangl900 @xuto2 @bowang-666 FYI, moving the semantic definition of the various CSE exit codes out of the shell scripts themselves to reduce the cloud-init data overheard as AKS Engine is seeing reports of these errors:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is obviously less readable but makes sense in terms of saving bytes in CSE. 👍
As @CecileRobertMichon pointed out, let's make sure the "list of exit codes" reference in docs/howto/troubleshooting.md is updated to point to the new file.
errorCodeStrings = append(errorCodeStrings, k) | ||
errorCodes = append(errorCodes, v) | ||
} | ||
errorCodeStrings = append(errorCodeStrings, "ERR_HOLD_MY_BEER") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🍺
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Reason for Change:
This PR moves CSE shell script exit code definitions into a new golang file, primarily to reduce the size of the delivered CSE, secondarily to add some UT enforcement.
Issue Fixed:
Requirements:
Notes: