Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Change Log

## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
- Fix AKS Volume Resize mode

## [1.1.4](https://github.com/arangodb/kube-arangodb/tree/1.1.4) (2021-02-15)
- Add support for spec.ClusterDomain to be able to use FQDN in ArangoDB cluster communication
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/deployment/v1/member_phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (
MemberPhaseShuttingDown MemberPhase = "ShuttingDown"
// MemberPhaseRotating indicates that a member is being rotated
MemberPhaseRotating MemberPhase = "Rotating"
// MemberPhaseRotateStart indicates that a member is being rotated but wont get up outside of plan
MemberPhaseRotateStart MemberPhase = "RotateStart"
// MemberPhaseUpgrading indicates that a member is in the process of upgrading its database data format
MemberPhaseUpgrading MemberPhase = "Upgrading"
)
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/deployment/v2alpha1/member_phase.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ const (
MemberPhaseShuttingDown MemberPhase = "ShuttingDown"
// MemberPhaseRotating indicates that a member is being rotated
MemberPhaseRotating MemberPhase = "Rotating"
// MemberPhaseRotateStart indicates that a member is being rotated but wont get up outside of plan
MemberPhaseRotateStart MemberPhase = "RotateStart"
// MemberPhaseUpgrading indicates that a member is in the process of upgrading its database data format
MemberPhaseUpgrading MemberPhase = "Upgrading"
)
Expand Down
2 changes: 1 addition & 1 deletion pkg/deployment/reconcile/action_rotate_start_member.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ func (a *actionRotateStartMember) Start(ctx context.Context) (bool, error) {
}
}
// Update status
m.Phase = api.MemberPhaseRotating
m.Phase = api.MemberPhaseRotateStart

if err := a.actionCtx.UpdateMember(m); err != nil {
return false, errors.WithStack(err)
Expand Down
14 changes: 12 additions & 2 deletions pkg/deployment/reconcile/plan_builder_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,23 @@ func pvcResizePlan(log zerolog.Logger, group api.ServerGroup, groupSpec api.Serv
api.NewAction(api.ActionTypePVCResize, group, memberID),
}
case api.PVCResizeModeRotate:
return api.Plan{
var plan api.Plan

if group == api.ServerGroupDBServers {
plan = append(plan,
api.NewAction(api.ActionTypeCleanOutMember, group, memberID),
)
}

plan = append(plan,
api.NewAction(api.ActionTypeRotateStartMember, group, memberID),
api.NewAction(api.ActionTypePVCResize, group, memberID),
api.NewAction(api.ActionTypePVCResized, group, memberID),
api.NewAction(api.ActionTypeRotateStopMember, group, memberID),
api.NewAction(api.ActionTypeWaitForMemberUp, group, memberID),
}
)

return plan
default:
log.Error().Str("server-group", group.AsRole()).Str("mode", mode.String()).
Msg("Requested mode is not supported")
Expand Down
2 changes: 1 addition & 1 deletion pkg/deployment/reconcile/timeouts.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const (
renewTLSCACertificateTimeout = time.Minute * 30
operationTLSCACertificateTimeout = time.Minute * 30
rotateMemberTimeout = time.Minute * 15
pvcResizeTimeout = time.Minute * 15
pvcResizeTimeout = time.Minute * 30
pvcResizedTimeout = time.Minute * 15
backupRestoreTimeout = time.Minute * 15
shutdownMemberTimeout = time.Minute * 30
Expand Down
2 changes: 1 addition & 1 deletion pkg/deployment/resilience/member_failure.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ func (r *Resilience) CheckMemberFailure() error {
switch m.Phase {
case api.MemberPhaseNone:
continue
case api.MemberPhaseUpgrading, api.MemberPhaseRotating, api.MemberPhaseCleanOut:
case api.MemberPhaseUpgrading, api.MemberPhaseRotating, api.MemberPhaseCleanOut, api.MemberPhaseRotateStart:
if len(status.Plan) == 0 {
log.Error().Msgf("No plan but member is in phase %s - marking as failed", m.Phase)
m.Phase = api.MemberPhaseFailed
Expand Down
2 changes: 1 addition & 1 deletion pkg/deployment/resources/pod_inspector.go
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ func (r *Resources) InspectPods(ctx context.Context, cachedStatus inspector.Insp
case api.MemberPhaseNone:
// Do nothing
log.Debug().Str("pod-name", podName).Msg("PodPhase is None, waiting for the pod to be recreated")
case api.MemberPhaseShuttingDown, api.MemberPhaseUpgrading, api.MemberPhaseFailed:
case api.MemberPhaseShuttingDown, api.MemberPhaseUpgrading, api.MemberPhaseFailed, api.MemberPhaseRotateStart:
// Shutdown was intended, so not need to do anything here.
// Just mark terminated
wasTerminated := m.Conditions.IsTrue(api.ConditionTypeTerminated)
Expand Down