-
Notifications
You must be signed in to change notification settings - Fork 519
fix: parse SGX driver url and compare checksum #2914
fix: parse SGX driver url and compare checksum #2914
Conversation
/azp run pr-e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
9892d80
to
f8df155
Compare
/azp run pr-e2e |
Commenter does not have sufficient privileges for PR 2914 in repo Azure/aks-engine |
f8df155
to
852f59a
Compare
/azp run pr-e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
Codecov Report
@@ Coverage Diff @@
## master #2914 +/- ##
==========================================
- Coverage 72.50% 72.49% -0.01%
==========================================
Files 141 141
Lines 25744 25847 +103
==========================================
+ Hits 18666 18739 +73
- Misses 5998 6021 +23
- Partials 1080 1087 +7
Continue to review full report at Codecov.
|
read -ra tmp_array <<< "$(sha256sum ./"$sgx_driver")" | ||
sgx_driver_sha256sum_real="${tmp_array[0]}" | ||
if [ "$sgx_driver_sha256sum_real" != "$sgx_driver_sha256sum_expected" ]; then | ||
# The checksum value is incorrect in download.01.org when the following line of code is written. |
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.
Unfortunately we are short for space in the cloud-init that we deliver, so could we remove these comments?
In fact, if we're ignoring a mismatch, what is the purpose of logging this?
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.
Sure, I can remove the comments. Out of curiosity, could you elaborate on what short for space means? From what you suggested, it gives me an impression that the cloud-init script hit a limitation of text length.
This ignoring of checksum is temporary due the the checksum file is wrong at the moment. After Intel uploads a correct checksum file, I will submit another PR to return a checksum error.
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.
Sure thing: Azure has a 64k limit for the customData property which delivers the cloud-init payload. All of the files that aks-engine dispatches to the VM are via cloud-init, and thus they all have to fit under 64k (translates to around 87k w/ gzip+base64-encoding)
Signed-off-by: Francis Liu <[email protected]>
852f59a
to
4a0cb59
Compare
/azp run pr-e2e |
Azure Pipelines successfully started running 1 pipeline(s). |
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
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: Francis-Liu, jackfrancis The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Congrats on merging your first pull request! 🎉🎉🎉 |
Reason for Change:
When intel-sgx driver upgrades, old url would become invalid, thus breaking provision process. This change tries to determine what's the latest driver version by paring the checksum file.
Issue Fixed:
Prevent future issues as of #2743
Requirements:
Notes:
Tested on both Ubuntu 16.04 and 18.04