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
Editing server.xml with vim fails to update in the container #887
Comments
Further investigation shows that the issue seems to be related to editing files with vim. When editing server.xml with IntelliJ, dev mode acted as expected and the application was updated accordingly. |
Editing configuration files, such as server.xml, while running dev mode, works with the following editors on Ubuntu:
Editing server.xml while running dev mode does not work with vim. |
There is some information here on how using vim breaks the docker bind-mount: moby/moby#15793. It basically says the original file is deleted, and a new one is put in its place with the same name, and this causes the bind-mount to break. This seems like it could potentially explain the issue here, but the major difference is we are not mounting the file that is being directly modified. We modify server.xml in |
I tried a similar thing by copying a server.xml into the src tree. On the first attempt Liberty said there were no functional changes detected but when I tried to reproduce it to work on the issue, my copying a second time caused Liberty to detect the change and to process the new configuration properly. |
Known bug or limitation in Docker : docker/for-win#1392 We could possibly document this. Each editor may provide a work around. For vim it is the command
Another quirk is to also mount the containing directory and read the file from there and then the mounted file is correct but this could be an implementation artifact and could change without notice. |
Fixed in OpenLiberty/ci.common#171 by restarting the image once the container's mounts are corrupt. Only restarted when running Linux. Documentation explains you can avoid this restart by using a certain vim option described above. |
Steps to reproduce:
mvn liberty:devc
for demo-devmode on Ubuntu 16devc output
(note the line CWWKG0018I: The server configuration was not updated. No functional changes were detected.)
docker run command from devc
(note that server.xml appears to be mounted properly: -v /home/ibmadmin/Git/demo-devmode/target/liberty/wlp/usr/servers/defaultServer/server.xml:/config/server.xml)
The text was updated successfully, but these errors were encountered: