fdbstatus

package
v1.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanSafelyRemoveFromStatus

func CanSafelyRemoveFromStatus(logger logr.Logger, client fdbadminclient.AdminClient, addresses []fdbv1beta2.ProcessAddress, status *fdbv1beta2.FoundationDBStatus) ([]fdbv1beta2.ProcessAddress, error)

CanSafelyRemoveFromStatus checks whether it is safe to remove processes from the cluster, based on the provided status.

The list returned by this method will be the addresses that are *not* safe to remove.

func DoCoordinatorFaultDomainCheckOnStatus

func DoCoordinatorFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error

DoCoordinatorFaultDomainCheckOnStatus does a coordinator related fault domain check over the given status object. @note an empty function for now. We will revisit this later.

func DoFaultDomainChecksOnStatus

func DoFaultDomainChecksOnStatus(status *fdbv1beta2.FoundationDBStatus, storageServerCheck bool, logServerCheck bool, coordinatorCheck bool) error

DoFaultDomainChecksOnStatus does the specified fault domain check(s) over the given status object. @note this is a wrapper over the above fault domain related functions.

func DoLogServerFaultDomainCheckOnStatus

func DoLogServerFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error

DoLogServerFaultDomainCheckOnStatus does a log server related fault domain check over the given status object.

func DoStorageServerFaultDomainCheckOnStatus

func DoStorageServerFaultDomainCheckOnStatus(status *fdbv1beta2.FoundationDBStatus) error

DoStorageServerFaultDomainCheckOnStatus does a storage server related fault domain check over the given status object.

func GetCoordinatorsFromStatus

func GetCoordinatorsFromStatus(status *fdbv1beta2.FoundationDBStatus) map[string]fdbv1beta2.None

GetCoordinatorsFromStatus gets the current coordinators from the status. The returning set will contain all processes by their process group ID.

func GetExclusions

func GetExclusions(status *fdbv1beta2.FoundationDBStatus) ([]fdbv1beta2.ProcessAddress, error)

GetExclusions gets a list of the addresses currently excluded from the database, based on the provided status.

func GetMinimumUptimeAndAddressMap

func GetMinimumUptimeAndAddressMap(logger logr.Logger, cluster *fdbv1beta2.FoundationDBCluster, status *fdbv1beta2.FoundationDBStatus, recoveryStateEnabled bool) (float64, map[fdbv1beta2.ProcessGroupID][]fdbv1beta2.ProcessAddress, error)

GetMinimumUptimeAndAddressMap returns address map of the processes included the the foundationdb status. The minimum uptime will be either secondsSinceLastRecovered if the recovery state is supported and enabled otherwise we will take the minimum uptime of all processes.

func HasDesiredFaultToleranceFromStatus

func HasDesiredFaultToleranceFromStatus(log logr.Logger, status *fdbv1beta2.FoundationDBStatus, cluster *fdbv1beta2.FoundationDBCluster) bool

HasDesiredFaultToleranceFromStatus checks if the cluster has the desired fault tolerance based on the provided status.

func RemoveWarningsInJSON

func RemoveWarningsInJSON(jsonString string) ([]byte, error)

RemoveWarningsInJSON removes any warning messages that might appear in the status output from the fdbcli and returns the JSON output without the warning message.

Types

type StatusContextKey

type StatusContextKey struct{}

StatusContextKey will be used as a key in a context to pass down the cached status.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL