Only install stack templates via elected master node (#59624) (#59657)

to avoid many error stacktraces in logs during a rolling upgrade.

Stack templates use the composable index template and component APIs,these APIs
aren't supported in 7.7 and earlier and in mixed cluster
environments this can cause a lot of ActionNotFoundTransportException
errors in the logs during rolling upgrades. If these templates
are only installed via elected master node then the APIs are always
there and the ActionNotFoundTransportException errors are then prevented.
This commit is contained in:
Martijn van Groningen 2020-07-15 22:22:01 +02:00 committed by GitHub
parent 74372df824
commit f1028fbbcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -137,4 +137,15 @@ public class StackTemplateRegistry extends IndexTemplateRegistry {
protected String getOrigin() { protected String getOrigin() {
return ClientHelper.STACK_ORIGIN; return ClientHelper.STACK_ORIGIN;
} }
@Override
protected boolean requiresMasterNode() {
// Stack templates use the composable index template and component APIs,
// these APIs aren't supported in 7.7 and earlier and in mixed cluster
// environments this can cause a lot of ActionNotFoundTransportException
// errors in the logs during rolling upgrades. If these templates
// are only installed via elected master node then the APIs are always
// there and the ActionNotFoundTransportException errors are then prevented.
return true;
}
} }