@pmuellr pointed out that Cloud doesn't implement such complex validation rules for the configuration as Kibana does.
It might turn out that when a user applies changes on Cloud, a value can be accepted in Cloud UI, but Kibana will fail to start due to a validation error.
When Kibana crashes with a configuration error, it returns either the default error code or 64 when the config file contains unknown values. Thus, Cloud cannot detect a configuration problem with the Kibana server so that it will unsuccessfully try to start the server over and over again.
To help Cloud to detect the configuration problem, Kibana should return the proper exit code to signal that action required before the next attempt. Elasticsearch uses 78 error code for configuration problem https://github.com/elastic/elasticsearch/blob/b32cbc1baa4dbf859cbde91bc7ce5c42929ffadb/libs/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java#L39
Likely, we cannot change the 64 exit code for unknown config values until v8.0 for compatibility reasons, but we can start with returning the 78 exit code when Kibana fails config validation.
@pmuellr pointed out that Cloud doesn't implement such complex validation rules for the configuration as Kibana does.
It might turn out that when a user applies changes on Cloud, a value can be accepted in Cloud UI, but Kibana will fail to start due to a validation error.
When Kibana crashes with a configuration error, it returns either the default error code or
64when the config file contains unknown values. Thus, Cloud cannot detect a configuration problem with the Kibana server so that it will unsuccessfully try to start the server over and over again.To help Cloud to detect the configuration problem, Kibana should return the proper exit code to signal that action required before the next attempt. Elasticsearch uses
78error code for configuration problem https://github.com/elastic/elasticsearch/blob/b32cbc1baa4dbf859cbde91bc7ce5c42929ffadb/libs/cli/src/main/java/org/elasticsearch/cli/ExitCodes.java#L39Likely, we cannot change the
64exit code for unknown config values untilv8.0for compatibility reasons, but we can start with returning the78exit code when Kibana fails config validation.