func (a *actionWaitForMemberUp) checkProgressSingle(ctx context.Context) (bool, bool, error) {
	log := a.log
	c, err := a.actionCtx.GetDatabaseClient(ctx)
	if err != nil {
		log.Debug().Err(err).Msg("Failed to create database client")
		return false, false, nil
	}
	if _, err := c.Version(ctx); err != nil {
		log.Debug().Err(err).Msg("Failed to get version")
		return false, false, nil
	}
	return true, false, nil
}
checkProgressSingle checks the progress of the action in the case
of a single server.
package reconcile
import (
	"context"
	"time"
	"github.com/arangodb/kube-arangodb/pkg/util/arangod"
	"github.com/arangodb/kube-arangodb/pkg/util/errors"
	driver "github.com/arangodb/go-driver"
	"github.com/arangodb/go-driver/agency"
	"github.com/rs/zerolog"
	api "github.com/arangodb/kube-arangodb/pkg/apis/deployment/v1"
)
func init() {
	registerAction(api.ActionTypeWaitForMemberUp, newWaitForMemberUpAction)
}
func newWaitForMemberUpAction(log zerolog.Logger, action api.Action, actionCtx ActionContext) Action {
	a := &actionWaitForMemberUp{}
	a.actionImpl = newActionImplDefRef(log, action, actionCtx, waitForMemberUpTimeout)
	return a
}
type actionWaitForMemberUp struct {
	actionImpl
}
func (a *actionWaitForMemberUp) Start(ctx context.Context) (bool, error) {
	ready, _, err := a.CheckProgress(ctx)
	if err != nil {
		return false, errors.WithStack(err)
	}
	return ready, nil
}
func (a *actionWaitForMemberUp) CheckProgress(ctx context.Context) (bool, bool, error) {
	member, ok := a.actionCtx.GetMemberStatusByID(a.MemberID())
	if !ok || member.Phase == api.MemberPhaseFailed {
		a.log.Debug().Msg("Member in failed phase")
		return true, false, nil
	}
	ctxChild, cancel := context.WithTimeout(ctx, arangod.GetRequestTimeout())
	defer cancel()
	if a.action.Group.IsArangosync() {
		return a.checkProgressArangoSync(ctxChild)
	}
	switch a.actionCtx.GetMode() {
	case api.DeploymentModeSingle:
		return a.checkProgressSingle(ctxChild)
	case api.DeploymentModeActiveFailover:
		if a.action.Group == api.ServerGroupAgents {
			return a.checkProgressAgent(ctxChild)
		}
		return a.checkProgressSingleInActiveFailover(ctxChild)
	default:
		if a.action.Group == api.ServerGroupAgents {
			return a.checkProgressAgent(ctxChild)
		}
		return a.checkProgressCluster()
	}
}