Dfdaemon will fail the health check if there is no available scheduler address.
So in the case of local dynconfig, the address of scheduler should be passed.
For dfdaemon health check, please refer to https://github.com/dragonflyoss/Dragonfly2/pull/2130.
Signed-off-by: Gaius <gaius.qi@gmail.com>
feat: support reload scheduler addresses for local Dynconfig in client
Add OnNotify to client dynconfig, it will listen changes of the
local configuration.
Signed-off-by: Gaius <gaius.qi@gmail.com>
Dynconfig only supports refresh new configs from manager, but local
dynconfig is unable to reload scheduler addresses when local config file
is updated.
Now we introduce new Dynconfig method 'SetConfig()', which sets the
given DaemonOption to struct dynconfigLocal, and register it as a
watcher of WatchConfig(), which will reload config file periodically. So
that dynconfigLocal.GetResolveSchedulerAddrs() will get new scheduler
addresses.
Signed-off-by: Eryu Guan <eguan@linux.alibaba.com>