FoundationDB / fdb-kubernetes-operator

A kubernetes operator for FoundationDB
Apache License 2.0
238 stars 81 forks source link

Ignore Pods that are updated in bounce #869

Closed johscheuer closed 2 years ago

johscheuer commented 2 years ago

In the getAddressesForUpgrade method of the bounce_processes sub reconciler we can run in an issue if a user runs an FDB cluster spread across multiple Kubernetes Clusters or dc (any configuration that has multiple FDB cluster specs). If for some reason a cluster is already upgraded the method will block complaining that not all processes are added and these processes will never be added since from the point of view of the local operator the processes are upgraded and there is no need to add them to the PendingUpgrades. A simple solution to that would be to ignore processes that are already up-to-date e.g. by a replacement or some manual interaction.

Like this:

    for _, process := range databaseStatus.Cluster.Processes {
        processID := process.Locality["instance_id"]
        if process.Version == version.String() {
            continue
        }

        if pendingUpgrades[processID] {
            addresses = append(addresses, process.Address)
        } else {
            notReadyProcesses = append(notReadyProcesses, processID)
        }
    }
AnnigeriShambu commented 2 years ago

This is resolved in https://github.com/FoundationDB/fdb-kubernetes-operator/pull/884