How does hab detect changes to /hab/user/*/config/user.toml

I’m looking at an issue where changes to the user.toml were rendered to a file, however hab didn’t render files in /hab/svc/*/config as it was supposed to, and restart the processes with updated config. I think that the answer is inotify, and if so, my follow up question is does hab do anything to deal with dropped events?

Do you have any configuration that is also being gossiped? Gossip layers on top of user.toml, so it’s possible to mask changes to user.toml that way.

But yeah, the underlying system is file notification events, similar to how the files in /hab/sup/default/specs/ are monitored.

I don’t have any proof that there isn’t anything being gossiped, but I do think its unlikely as we don’t tell customers how to use hab config apply to set the configuration and would also require a few implementation details.

OK, good… that’s always the first think I think of :slight_smile:

The user.toml watching logic is a bit more involved than the spec-watching logic, though, so it’s possible there may be some edge cases that aren’t accounted for… I believe that was taking into account some aspects of how Kubernetes does file swapping to ensure it worked there. I think all the file-watching logic is probably due for an overhaul, though. Any additional data you could provide about what you’re seeing would be appreciated.