mirror of
https://github.com/datarhei/core.git
synced 2025-10-05 07:57:13 +08:00
Get peer config via cluster API
This commit is contained in:
@@ -721,7 +721,7 @@ func (c *cluster) checkClusterNodes() error {
|
||||
return fmt.Errorf("node %s has a different version: %s: %w", id, version, err)
|
||||
}
|
||||
|
||||
config, err := node.Config()
|
||||
config, err := node.CoreConfig()
|
||||
if err != nil {
|
||||
return fmt.Errorf("node %s has no configuration available: %w", id, err)
|
||||
}
|
||||
@@ -783,6 +783,14 @@ func verifyClusterConfig(local, remote *config.Config) error {
|
||||
return fmt.Errorf("srt.passphrase is different")
|
||||
}
|
||||
|
||||
if local.Resources.MaxCPUUsage == 0 || remote.Resources.MaxCPUUsage == 0 {
|
||||
return fmt.Errorf("resources.max_cpu_usage must be defined")
|
||||
}
|
||||
|
||||
if local.Resources.MaxMemoryUsage == 0 || remote.Resources.MaxMemoryUsage == 0 {
|
||||
return fmt.Errorf("resources.max_memory_usage must be defined")
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user