aws / amazon-ecs-init

ecs-init is now part of the amazon-ecs-agent repo https://github.com/aws/amazon-ecs-agent/tree/master/ecs-init
https://github.com/aws/amazon-ecs-agent
Apache License 2.0
200 stars 117 forks source link

Clean up mount path when mount failed #312

Closed fenxiong closed 4 years ago

fenxiong commented 4 years ago

Summary

Currently, when mounting a volume failed for whatever reason, the mount path is left on the host. This PR adds the logic to cleanup the mount path in that case.

Implementation details

See above.

Testing

Modified existing unit test. Manually tested that with the fix mount path is cleaned up when mount failed.

New tests cover the changes: yes

Description for the changelog

N/A

Licensing

This contribution is under the terms of the Apache 2.0 License: