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

[ML] Migrate unallocated jobs and datafeeds #37536

Merged
merged 8 commits into from
Jan 24, 2019

Conversation

davidkyle
Copy link
Member

@davidkyle davidkyle commented Jan 16, 2019

Backport of #37430 but some tests have changed. Reproducing the original description here:

The final step of the process of migrating ml configs in #32905. This change migrates jobs & datafeed configs of open jobs once the persistent task becomes unallocated, the persistent task parameters must be updated for open jobs.

  1. Prevent allocation of job tasks where the task parameters have not been updated.
    OpenJobPersistentTasksExecutor.getAssignment will not assign a task that has the missing parameters
  2. Change MlConfigMigrator to also migrate the configs of unallocated jobs & datafeeds
  3. In the clusterstate update where configs are removed from MlMetadata also update the persistent task parameters of the unallocated tasks

WIP as this change cannot be merged until the issue described in #36810 (comment) has been resolved otherwise the rolling upgrade tests will fail intermittently. The cause was fixed in #37656

@davidkyle davidkyle added WIP :ml Machine learning v6.7.0 labels Jan 16, 2019
@elasticmachine
Copy link
Collaborator

Pinging @elastic/ml-core


// TODO is eligible for migration check (all nodes are at the same version)
if (params.getJob() == null) {
return AWAITING_MIGRATION;
Copy link
Member Author

Choose a reason for hiding this comment

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

The major difference between this and 6.6 is that in a mixed cluster an open job will not get an assignment i.e. a job left open during rolling upgrade will not be assigned until it has been migrated and the persistent task parameters changed which will only happen once all nodes in the cluster are at least version 6.6.0. 6.7 is capable of running un-migrated jobs so we could allow the un-migrated job to run in a mixed cluster depending on the result of MlConfigMigrationEligibilityCheck.jobIsEligibleForMigration.

Either way I need to remove the TODO

@davidkyle davidkyle removed the WIP label Jan 22, 2019
Migrate ml job and datafeed config of open jobs and update
the parameters of the persistent tasks as they become unallocated
during a rolling upgrade. Block allocation of ml persistent tasks
until the configs are migrated.
@davidkyle davidkyle force-pushed the migrate-unallocated branch from 3f71c36 to ccd29f3 Compare January 23, 2019 11:13
@davidkyle
Copy link
Member Author

run elasticsearch-ci/2

@davidkyle davidkyle merged commit 9c7b3fc into elastic:6.x Jan 24, 2019
@davidkyle davidkyle deleted the migrate-unallocated branch January 24, 2019 09:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants