Skip to content
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

Merged
merged 2 commits into from
May 19, 2021

Conversation

johngmyers
Copy link
Member

No description provided.

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels May 19, 2021
@olemarkus
Copy link
Member

This is great :)
I have been meaning to create a nodeup configuration mode similar to warmpool, but that can be run with packer or similar to build AMIs. This would fit nicely with such a feature.

Comment on lines 133 to 134
local -r nodeup_urls=( $(split-commas "${NODEUP_URL}") )
download-or-bust nodeup "${NODEUP_HASH}" "${nodeup_urls[@]}"

chmod +x nodeup
Copy link
Member

@hakman hakman May 19, 2021

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.

Suggested change
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}"

Copy link
Member Author

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.

Copy link
Member

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?

@johngmyers
Copy link
Member Author

There's something to be said for having the wrong nodeup binary cause a bootstrap failure. In the case of an out-of-date AMI, a noticeable failure might be better than slowness.

@hakman
Copy link
Member

hakman commented May 19, 2021

If nodeup is re-downloaded, in most cases means a few seconds. Most people should not notice that part.
If we stop a cluster from scaling or replacing nodes just because the AMI is outdated, seems we would create quite a big issue. Maybe printing a warning would make it easier for people to notice this in logs.

@johngmyers
Copy link
Member Author

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.

@hakman
Copy link
Member

hakman commented May 19, 2021

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.
😄

Copy link
Member

@hakman hakman left a 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

@k8s-ci-robot k8s-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label May 19, 2021
@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2021
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 19, 2021
@johngmyers
Copy link
Member Author

I'm okay with this for now. We can iterate as follow-up.
/hold cancel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants