anchor.diff:  # The script will use SOLR_PORT+10000 for the RMI_PORT or you can set it here
   RMI_PORT=<%= node['solrcloud']['jmx']['port'] %>
   
  -# Anything you add to the SOLR_OPTS variable will be included in the java
  -# start command line as-is, in ADDITION to other options. If you specify the
  -# -a option on start script, those options will be appended as well.
  -<% if node['solrcloud']['hdfs']['enable'] && node['solrcloud']['hdfs']['hdfs_home'] -%>
  -SOLR_OPTS="$SOLR_OPTS \
  --Dsolr.directoryFactory=<%= node['solrcloud']['hdfs']['directory_factory'] %> \
  --Dsolr.lock.type=<%= node['solrcloud']['hdfs']['lock_type'] %> \
  --Dsolr.hdfs.home=<%= node['solrcloud']['hdfs']['hdfs_home'] %>"
  -<% end -%>
  +# By default the start script uses "localhost"; override the hostname here
  +# for production SolrCloud environments to control the hostname exposed to cluster state
  +SOLR_HOST="<%= node['solrcloud']['solr_config']['solr_host'] %>"
   
  -<% if node['solrcloud']['enable_jmx'] -%>
  -SOLR_OPTS="$SOLR_OPTS \
  --Dcom.sun.management.jmxremote \
  --Dcom.sun.management.jmxremote.local.only=false \
  --Dcom.sun.management.jmxremote.ssl=false \
  --Dcom.sun.management.jmxremote.authenticate=<%= node['solrcloud']['jmx']['authenticate'] %> \
  --Dcom.sun.management.jmxremote.password.file=<%= node['solrcloud']['jmx']['password_file'] %> \
  --Dcom.sun.management.jmxremote.access.file=<%= node['solrcloud']['jmx']['access_file'] %> \
  --Djava.rmi.server.hostname=<%= node['solrcloud']['solr_config']['solr_host'] %>"
  -<% end -%>
  -
  -<%= unless node['solrcloud']['java_options'].empty? -%>
  -SOLR_OPTS="$SOLR_OPTS \
  -<%= node['solrcloud']['java_options'].join(' \/n') -%>
  -"
  -<% end -%>
  +# By default the start script uses UTC; override the timezone if needed
  +SOLR_TIMEZONE="<%= node['solrcloud']['solr_config']['solr_timezone'] %>"
   
   # Location where the bin/solr script will save PID files for running instances
   # If not set, the script will create PID files in $SOLR_TIP/bin
  
positive.code: # See the License for the specific language governing permissions and
  # limitations under the License.
  
  # By default the script will use JAVA_HOME to determine which java
  # to use, but you can set a specific path for Solr to use without
  # affecting other Java applications on your server/workstation.
  
negative.code: # Comment out SOLR_HEAP if you are using this though, that takes precedence
  SOLR_JAVA_MEM="-Xms<%= node.solrcloud.java_xms %> -Xmx<%= node.solrcloud.java_xmx %>"
  
  # Set the ZooKeeper connection string if using an external ZooKeeper ensemble
  # e.g. host1:2181,host2:2181/chroot
  # Leave empty if not using SolrCloud
  <% unless node['solrcloud']['zk_run'] -%>
  ZK_HOST="<%=node['solrcloud']['solr_config']['solrcloud']['zk_host'].sort.uniq.join(',') %><%= node['solrcloud']['solr_config']['solrcloud']['zk_chroot'] %>"
  <% end -%>
  
  # Set the ZooKeeper client timeout (for SolrCloud mode)
  ZK_CLIENT_TIMEOUT="<%= node['solrcloud']['solr_config']['solrcloud']['zk_client_timeout'] %>"
  
  # Enable verbose GC logging
  GC_LOG_OPTS="<%= node['solrcloud']['solr_config']['gc_log_opts'].sort.join(" \n") %>"
  
  # These GC settings have shown to work well for a number of common Solr workloads
  GC_TUNE="<%= node['solrcloud']['solr_config']['gc_tune'].sort.join(" \n") %>"
  
  # Set to true to activate the JMX RMI connector to allow remote JMX client applications
  # to monitor the JVM hosting Solr; set to "false" to disable that behavior
  