Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

refactor: store CSE exit codes in code #3012

Merged
merged 5 commits into from Apr 2, 2020

Conversation

jackfrancis
Copy link
Member

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:

@@ -1,72 +1,5 @@
#!/bin/bash
ERR_SYSTEMCTL_STOP_FAIL=3
Copy link
Contributor

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
Copy link

codecov bot commented Apr 2, 2020

Codecov Report

Merging #3012 into master will decrease coverage by <.01%.
The diff coverage is 100%.

@@            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

@jackfrancis
Copy link
Member Author

@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:

Custom data in OSProfile must be in Base64 encoding and with a maximum length of 87380 characters

Copy link
Member

@mboersma mboersma left a 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")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🍺

Copy link
Member

@mboersma mboersma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@jackfrancis jackfrancis merged commit f6ed0e5 into Azure:master Apr 2, 2020
@jackfrancis jackfrancis deleted the cse-exit-codes-in-code branch April 2, 2020 22:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants