-
Notifications
You must be signed in to change notification settings - Fork 4.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't download nodeup if already in the AMI #11524
Conversation
This is great :) |
pkg/model/resources/nodeup.go
Outdated
local -r nodeup_urls=( $(split-commas "${NODEUP_URL}") ) | ||
download-or-bust nodeup "${NODEUP_HASH}" "${nodeup_urls[@]}" | ||
|
||
chmod +x nodeup |
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.
Probably best to move urls (not used anywhere else) and chmod to download-or-bust()
and keep download-release()
clean.
local -r nodeup_urls=( $(split-commas "${NODEUP_URL}") ) | |
download-or-bust nodeup "${NODEUP_HASH}" "${nodeup_urls[@]}" | |
chmod +x nodeup | |
download-or-bust nodeup "${NODEUP_HASH}" "${NODEUP_URL}" |
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.
download-or-bust
has two return points, so it is simpler to have the chmod outside it. Also, it's not completely impossible that we might later need to download a second, non-executable file before running nodeup.
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.
I agree, chmod would be better outside. Could you move the nodeup_urls part though?
There's something to be said for having the wrong |
If nodeup is re-downloaded, in most cases means a few seconds. Most people should not notice that part. |
A few seconds might be enough to blow your SLA. It might not be noticed until peak traffic and even then the cause wouldn't be obvious. Failure to replace nodes on the rolling update following a configuration change would be much more likely to be noticed quickly, before it becomes a big problem. |
903b4d5
to
65711d0
Compare
If anyone is that serious about not starting if nodeup is out of date, could have a boot script that checks the sha256 and stops the process. |
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.
I am ok with this as is. Thanks.
In case you would like more feedback...
/hold
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: hakman 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 |
I'm okay with this for now. We can iterate as follow-up. |
No description provided.