aws / efs-utils

Utilities for Amazon Elastic File System (EFS)
MIT License
301 stars 192 forks source link

Check private key file size to skip generation #174

Closed otorreno closed 1 year ago

otorreno commented 1 year ago

Nowadays, the private key generation function checks if the private key file exists. However, if the openssl command that generates the private key file is interrupted before writing the key, the file is there but empty. Such behaviour has been confirmed locally.

That causes the following issue (https://github.com/kubernetes-sigs/aws-efs-csi-driver/issues/683) when the EFS CSI driver pod is restarted. On the next start of the pod in the node, it doesn't generate the private key because of what is stated above.

With this change, if the file is empty it will be generated. No need for the workaround with the initContainer to delete the file.

130 only did it for the watchdog file, we have the same code duplicated in mount_efs/__init__.py. Reusing the same

approach.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

RyanStan commented 1 year ago

This was already merged into v1.35.0 from another PR: https://github.com/aws/efs-utils/commit/c52de83f3f245b09f5af22e23002995b3d3a5009.

otorreno commented 1 year ago

@RyanStan but that was a change to the watchdog folder not to the mount one. The code is duplicated in both places and since such PR you are referencing was merged the code is different

RyanStan commented 1 year ago

Sorry about that! Thanks for pointing that out. We'll merge this.

otorreno commented 1 year ago

@RyanStan do you have an estimate on when this is going to be merged?

otorreno commented 1 year ago

@RyanStan when can I expect a new release to be cut for this and the EFS CSI driver? We are facing this problem on a weekly basis and would like to get past it as soon as possible.

yafanasiev commented 1 year ago

Same here - started hitting this issue quite frequently. Would really appreciate a new release with a fix!

eugeniykurasov commented 1 year ago

@RyanStan could you please release a new version? Thank you.

otorreno commented 11 months ago

@RyanStan when would you cut a new release?