Skip to content
This repository was archived by the owner on Apr 29, 2020. It is now read-only.
Open
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
12 changes: 11 additions & 1 deletion pkg/store/consul/rollstore/consul_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,17 @@ func (s ConsulStore) CreateRollingUpdateFromOneExistingRCWithID(

err = s.checkForConflictingUpdates(rcIDs)
if err != nil {
return roll_fields.Update{}, err
conflictingErr, ok := err.(ConflictingRUError)
if !ok {
return roll_fields.Update{}, err
}
// There is an unknown reason where sometimes an RU still exists when it
// shouldn't. This deletes the dangling RU which is what we've been
// doing manually
err = s.Delete(ctx, conflictingErr.ConflictingID)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we check if there is only a single RC before deleting the RU blindly? 99% of the time I agree, but we have seen a couple where the RU is stuck because the RC is not at zero replicas.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this function only gets called when there’s only one RC. I can
double check later again, the name also suggests that this code path occurs
when there’s only one rc “...FromOneExistingRC”.

if err != nil {
return roll_fields.Update{}, err
}
}

rc, err := s.rcstore.CreateTxn(ctx, newRCManifest, newRCNodeSelector, availabilityZone, clusterName, newRCPodLabels, newRCLabels, newAllocationStrategy)
Expand Down