File tree 2 files changed +13
-0
lines changed
2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,17 @@ var rootCmd = &cobra.Command{
39
39
}
40
40
log .Println ("Running config:" , cfgStr )
41
41
42
+ if config .CoordinatorConfig ().EnableRoleSystem {
43
+ if config .CoordinatorConfig ().RolesFile == "" {
44
+ return fmt .Errorf ("role system enabled but no roles file specified, see `enable_role_system` and `roles_file` in config" )
45
+ }
46
+ rolesCfgStr , err := config .LoadRolesCfg (config .CoordinatorConfig ().RolesFile )
47
+ if err != nil {
48
+ return err
49
+ }
50
+ log .Println ("Running roles config:" , rolesCfgStr )
51
+ }
52
+
42
53
if logLevel != "" {
43
54
config .CoordinatorConfig ().LogLevel = logLevel
44
55
}
Original file line number Diff line number Diff line change @@ -26,6 +26,8 @@ type Coordinator struct {
26
26
UseSystemdNotifier bool `json:"use_systemd_notifier" toml:"use_systemd_notifier" yaml:"use_systemd_notifier"`
27
27
SystemdNotifierDebug bool `json:"systemd_notifier_debug" toml:"systemd_notifier_debug" yaml:"systemd_notifier_debug"`
28
28
IterationTimeout time.Duration `json:"iteration_timeout" toml:"iteration_timeout" yaml:"iteration_timeout"`
29
+ EnableRoleSystem bool `json:"enable_role_system" toml:"enable_role_system" yaml:"enable_role_system"`
30
+ RolesFile string `json:"roles_file" toml:"roles_file" yaml:"roles_file"`
29
31
}
30
32
31
33
// LoadCoordinatorCfg loads the coordinator configuration from the specified file path.
You can’t perform that action at this time.
0 commit comments