-
Notifications
You must be signed in to change notification settings - Fork 250
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
BUG FIX: Make install-cni.sh check if the etcd cert file exist. #526
BUG FIX: Make install-cni.sh check if the etcd cert file exist. #526
Conversation
d418383
to
31bb1a6
Compare
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.
Thanks for submitting this.
Could you clean up the first several lines of the while loop to be spaces too instead of tabs?
k8s-install/scripts/install-cni.sh
Outdated
@@ -191,14 +191,16 @@ while [ "$should_sleep" == "true" ]; do | |||
# version to the host. Just check the timestamp on the certificate to see if it | |||
# has been updated. A bit hokey, but likely good enough. | |||
if [ "$(ls ${SECRETS_MOUNT_DIR} 2>/dev/null)" ]; |
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 think you should just change this line instead of adding a new check. I don't think there is a need for 2 checks.
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.
Addressed
The file has more places where it uses tabs and it's a mix of tabs and spaces for indentation should I just clean the entire file and make it use all spaces? |
31bb1a6
to
22671c3
Compare
This will prevent it from terminating because stat returns non-zero when called a non-existing file and also stat_output ends up being an unbound variable. Affected Component: install-cni container.
22671c3
to
dca283d
Compare
Added a second commit to consistently use spaces vs tabs |
Yeah I'd be fine with cleaning up the whole file. I just wanted at least that loop to be consistent. Thanks.
I don't think it is necessary. |
k8s-install/scripts/install-cni.sh
Outdated
# Kubernetes Secrets can be updated. If so, we need to install the updated | ||
# version to the host. Just check the timestamp on the certificate to see if it | ||
# has been updated. A bit hokey, but likely good enough. | ||
if [ "$(ls ${SECRETS_MOUNT_DIR} 2>/dev/null)" ]; |
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.
Your second commit reverted the changes in your first.
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.
doh, fixed thanks!
ec995fc
to
1ddc24f
Compare
Dismissing my review because someone else needs to review this first.
@caseydavenport WDYT? |
This will prevent it from terminating because
stat
returns non-zerowhen called a non-existing file and also stat_output ends up being an
unbound variable.
Affected Component: install-cni container
@tmjd PTAL not sure if this needs a release note thanks!