Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix issue with docker volume-mounted config file (#1130)
Using `sed -i` was causing an issue when a custom opensearch.yml file was mounted as a volume. ``` sed: cannot rename /usr/share/opensearch/config/sedqdMb0d: Device or resource busy ``` The reason for the issue was found by @unhipzippo opensearch-project/OpenSearch#768 (comment) ❤️ > The "sed -i" is an attempt to modify the opensearch.yml file "in place" -- But according to the GNU sed documentation (https://www.gnu.org/software/sed/manual/sed.html#Command_002dLine-Options), "in-place" actually "does this by creating a temporary file and sending output to this file rather than to the standard output. ... the temporary file is renamed to the output file’s original name". > > I believe this rename would require changing the inode of the original file -- something that Docker volume mounts don't permit. Signed-off-by: Robin Böning <robin.boening@gmail.com>
- Loading branch information