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
File based dynamic configuration, cluster not updating #13853
Comments
hi @dili91 not sure why its not working on your system exactly, but keen to figure out. It wfm locally and in CI I have the same version of docker as you so i dont think that is the problem. regarding removing |
...also if you test this sandbox with the
if you want to test it more than once |
/assign phlax |
Hey @phlax thanks for the prompt reply. Mac comes with a slightly different version of sed compared to GNU's one. Below command inside verify.sh returns an error and does not replace service1 with service2 on cds.yaml file. I can easily overcome this by either replacing
That said, I ran the script multiple times as well as testing on my own (manually changing the values) but the updated file is not picked up by the envoy process running on the Docker container. I'm keen to provide extra troubleshooting details if any |
@dili91 so 2 things fixing the sed commandim keen to update the verify.sh script to make it work on mac (i have no easy access to any versions atm) this has always been a bit of a mess on mac, and seems to still be - see https://stackoverflow.com/questions/4247068/sed-command-with-i-option-failing-on-mac-but-works-on-linux i dont think does a variant of this work ?
if i can get a decent command to work on both ill update the script debugging your envcan you confirm that after running |
if the file is getting updated and the example is still not working then my guess is its something to do with file inodes and envoy not seeing the file as changed (its the only thing i can think of atm) if this is the case, the first question would be whether the timestamp has changed inside the container |
maybe relevant moby/moby#15793 (comment) |
Hey, so:
Yeah sorry, you're right. But afterwards I manually changed the file with vim.
This one applies the desired changes to the file: Yes, timestamp is updated:
Last but not least, during my manual changes I used vim. I just found out that vim and inotify seem not to be happy toghether. See this thread as reference. I solved by updating the file like this, from the host system (my Mac):
I also tried to replace the original sed command in the verify.sh script with the above command and the verification passed. If interested, I could raise a PR to trigger this update on the container rather than updating the host file. |
great solution! this also removes the need to give the umask warning in the docs can you PR to update ? if not, im happy to |
(...just read rest of post...) yep please! do PR! |
on the exec its better to add |
Sure, will raise a PR then ! |
I've been struggling a few hours to make this sample work, but no luck. Originally I implemented something very similar on my own: I could see the cds.yaml file properly updated across host and container's filesystem, but envoy did not pick the updated file at runtime.
This is the only update I could spot on proxy logs soon after updating the file:
Finally, I also cloned this repo and ran this project but I got the same results: even though I can see the file properly updated on both host and containers file systems, it seems envoy is not acknowledging any changes.
below verify.sh logs (I had to remove the -i option on sed command in order to use it on my Mac)
Last but not least, my docker setup info, if required:
I tried and noticed the above issues on both envoyproxy/envoy-dev:latest and envoyproxy/envoy:v1.16-latest Docker images.
Thank you.
Andrea
The text was updated successfully, but these errors were encountered: