Skip to content

Only first pod of StatefulSet updated on modification of SearchHeadCluster or IndexerCluster (e.g. image, resources) #213

@romain-bellanger

Description

@romain-bellanger

Hello,

This is an impact of #193: on change of SearchHeadCluster or IndexerCluster custom resource properties such as image or resource quotas, only the first pod of the associated StatefulSet is updated. The purpose of this PR was precisely to update the controller-revision-hash label of all the pods to prevent their restart.

We are currently working on the upgrade of clusters in Splunk 8.0.6 deployed with the operator alpha version 0.1.0, to Splunk 8.1.0.1 with the operator beta version 0.2.1. This breaks a lot of automation in the upgrade process. When changing the docker image, pods were previously restarted sequentially with a proper offline (for indexers), which was matching the requirements for a clean upgrade (with just a couple of additional API calls to initialize / finalize the process). With this change only the first pod is restarted automatically. The upgrade of the remaining pods must be done by running offline from inside the container and deleting the pod manually.

The same impact probably exists on all the specs from custom resources inherited by the pods (I tested for instance modifying the CPU limit, again only the first pod was updated).

For now, we patched the operator by commenting the first call to checkAndUpdatePodRevision from method UpdateStatefulSetPods (case of readyReplicas < replicas), which fixed the problem. But we don't understand the impact of this modification, as we don't understand the initial purpose of the PR. We never observed cases of unnecessary pod recycle on scaling. Could you please describe these scenarios, and look for a way to address them without causing such an impact on change of CRD specs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions