One option would be to schedule an event on a ET_TASK thread and call system("traffic_ctl config reload") there. Or, if you already have a thread polling a mirror, why not call system("...") there?
On Wednesday, May 17, 2017, 6:55:38 PM EDT, Nishant Gaurav <ngau...@linkedin.com.INVALID> wrote: Hi everyone, I work as a part of Traffic team at LinkedIn. Our team has a use case where we want to reload ‘remap.config’ without restarting trafficserver. I understand that I can use ‘traffic_ctl config reload’ command for the same, but we don’t want dependence on an external process to run traffic_ctl. In order to achieve this I submitted this pull request <https://github.com/apache/trafficserver/pull/1815/files> last week, in which I introduced a new API function 'TSRemapConfigReload()' which can reload remap.config. The way we are using it is that we have a thread (running as a part of plugin) which keeps on polling a git mirror at regular interval. Once it identifies that there is a change in remap.config file in that git mirror, it pulls the new file and replaces the the old config file with the new one on disk (with creating a backup of the previous one). After doing that it calls TSRemapConfigReload() to reload the new remap.config. The corresponding pull request for this was not accepted as James pointed out that plugin is not the correct place to do it. As an alternative he suggested that we can use ‘TSReconfigure()’ which is part of ‘mgmtapi.h’. The problem with that is, the functions as a part of management API are not available inside plugins. I am starting this thread to discuss the correct way to solve this problem. Regards, Nishant