janhoy commented on code in PR #530: URL: https://github.com/apache/solr-operator/pull/530#discussion_r1150958026
########## controllers/util/solr_update_util_test.go: ########## @@ -180,6 +205,26 @@ func TestPickPodsToUpgrade(t *testing.T) { solrCloud.Spec.Replicas = Replicas(4) podsToUpgrade = getPodNames(pickPodsToUpdate(solrCloud, lastPod, testHealthyClusterStatus, overseerLeader, 6, log)) assert.ElementsMatch(t, []string{"foo-solrcloud-0"}, podsToUpgrade, "Incorrect set of next pods to upgrade. The overseer should be upgraded when everything is healthy and it is the last node, even though this SolrCloud resource doesn't manage all Nodes") + + /* + Test when some pods have already been selected for deletion + */ + + // Normal inputs + maxshardReplicasUnavailable = intstr.FromInt(1) + podsToUpgrade = getPodNames(pickPodsToUpdate(solrCloud, someScheduledForDeletionPods, testHealthyClusterStatus, overseerLeader, 6, log)) + assert.ElementsMatch(t, []string{}, podsToUpgrade, "Incorrect set of next pods to upgrade. Do to replica placement, only the node with the least leaders can be upgraded and replicas.") Review Comment: *Due* to? ########## docs/solr-cloud/managed-updates.md: ########## @@ -89,3 +89,25 @@ spec: annotations: manualrestart: "2021-10-20T08:37:00Z" ``` + +## Pod Readiness during updates + +The Solr Operator sets up at least two Services for every SolrCloud. +- Always + - A clusterIP service for all solr nodes (What we call the "common service") +- Either + - A [Headless Service](https://kubernetes.io/docs/concepts/services-networking/service/#headless-services) for individual Solr Node endpoints that are not exposed via an Ingress. + - Individual clusterIP services for Solr Nodes that are exposed via an Ingress + +Only the common service uses the `publishNotReadyAddresses: false` option, since the common service should load balance between all available nodes. +The second two services have individual endpoints for each node, so there is no reason to de-list pods that are not available. Review Comment: ```suggestion The other services have individual endpoints for each node, so there is no reason to de-list pods that are not available. ``` ########## docs/upgrade-notes.md: ########## @@ -120,6 +120,12 @@ _Note that the Helm chart version does not contain a `v` prefix, which the downl - Provided Zookeeper pods use the `IfNotPresent` pullPolicy by default. Users that specify this field manually will not see a change. +- The Solr Operator now tries to limit connectivity to pods before they are deleted, for rolling updates or other reasons. + Before the pod is killed, and evicted of replicas if ephemeral storage is used, a readinessCondition will be set to `false`. + The Headless Service does not use readiness, so internode traffic will not be affected, however the ClusterIP service will no longer include these nodes until they have been restarted. Review Comment: ```suggestion The Headless Service does not use readiness, so internode traffic will not be affected, however the ClusterIP (common) service will no longer include these nodes until they have been restarted. ``` -- 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: issues-unsubscr...@solr.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org For additional commands, e-mail: issues-h...@solr.apache.org