HoustonPutman commented on code in PR #429:
URL: https://github.com/apache/solr-operator/pull/429#discussion_r846451877
##########
controllers/solrcloud_controller.go:
##########
@@ -288,9 +288,11 @@ func (r *SolrCloudReconciler) Reconcile(ctx
context.Context, req ctrl.Request) (
}
}
- // Only create stateful set if zkConnectionString can be found (must
contain host and port)
- if !strings.Contains(newStatus.ZkConnectionString(), ":") {
+ // Only create stateful set if zkConnectionString can be found (must
contain a host before the chroot)
+ zkConnectionString := newStatus.ZkConnectionString()
+ if len(zkConnectionString) < 2 || strings.HasPrefix(zkConnectionString,
"/") {
blockReconciliationOfStatefulSet = true
+ logger.Info("Will not create/update the StatefulSet because the
zookeeperConnectionString has no host", "zookeeperConnectionString",
zkConnectionString)
Review Comment:
Unfortunately there is no "WARN", but I can change it to an error. It's
definitely not a good state to be in.
The string will be passed as-is to Solr. (But there is some validation done,
for example the chroot has to be at least a `/`).
I guess we could warn on that, but it'd probably be better to do that
warning in Solr vs the Solr Operator.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]