There is a bug in serverclass.spec that causes Splunk Deployment Server to give the following FALSE error logs:
Checking conf files for problems...
Invalid key in stanza [serverClass:site1_indexers] in /opt/splunk/etc/system/local/serverclass.conf, line XXX: targetRepositoryLocation (value: $SPLUNK_HOME/etc/master-apps).
Invalid key in stanza [serverClass:site1_indexers] in /opt/splunk/etc/system/local/serverclass.conf, line XXX+1: targetRepositoryLocationPolicy (value: rejectAlways).
You can confirm that it actually works by running /opt/splunk/bin/splunk show config serverclass | grep targetRepository which will give you this (which clearly indicates functional configurations):
targetRepositoryLocation=$SPLUNK_HOME/etc/apps
targetRepositoryLocation=$SPLUNK_HOME/etc/master-apps
targetRepositoryLocationPolicy=rejectAlways
You can double-check that it should work by running /opt/splunk/bin/splunk btool serverclass list --debug| grep targetRepository which will give you this (which clearly indicates valid configurations):
/opt/splunk/etc/system/default/serverclass.conf targetRepositoryLocation = $SPLUNK_HOME/etc/apps
/opt/splunk/etc/system/local/serverclass.conf targetRepositoryLocation = $SPLUNK_HOME/etc/master-apps
/opt/splunk/etc/system/local/serverclass.conf targetRepositoryLocationPolicy = rejectAlways
You can also confirm by checking the target Cluster Master destination which will clearly show that it does indeed pull in CM apps to $SPLUNK_HOME/etc/apps/ as well as Indexer apps (via a different serverclass using the targetRepository* settings) to $SPLUNK_HOME/etc/master-apps/ .
It is unfortunate the both the documentation and the spec files are in error. I am open a documentation updated request to get this mess cleared up.
NOTE: You may, or may not, desire the rejectAlways setting. Use it or don't; it has nothing to do with the viability of the other setting(s).
... View more