Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not expect deletion if data migration is in progress #474

Conversation

barkbay
Copy link
Contributor

@barkbay barkbay commented Mar 6, 2019

Fix #469

@barkbay barkbay self-assigned this Mar 6, 2019
Copy link
Contributor

@sebgl sebgl left a comment

Choose a reason for hiding this comment

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

LGTM! Good catch!

// do not delete a pod or expect a deletion if a data migration is in progress
isMigratingData := migration.IsMigratingData(observedState, pod, ToDelete)
if isMigratingData {
log.Info("Skipping deletes because of migrating data", "pod", pod.Name)
Copy link
Contributor

Choose a reason for hiding this comment

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

Nit: I know it doesn't come from your PR, but maybe we could change Skipping deletes to Skipping deletion?

Copy link
Contributor

@thbkrkr thbkrkr left a comment

Choose a reason for hiding this comment

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

LGTM. Left a nit and a question.


// deletePods deletes a list of pods after checking there is no migrating data for each of them
func (d *defaultDriver) deletePods(
ToDelete []corev1.Pod,
Copy link
Contributor

Choose a reason for hiding this comment

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

I would tend to keep the variable name in lowercase: toDelete.

@barkbay barkbay merged commit 4133ad6 into elastic:master Mar 7, 2019
@barkbay barkbay deleted the fix-469-Do-not-expect-deletion-if-data-migration-is-in-progress branch March 7, 2019 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants