Return-Path: X-Original-To: apmail-aurora-issues-archive@minotaur.apache.org Delivered-To: apmail-aurora-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id A024A181A2 for ; Tue, 8 Dec 2015 23:39:11 +0000 (UTC) Received: (qmail 78756 invoked by uid 500); 8 Dec 2015 23:39:11 -0000 Delivered-To: apmail-aurora-issues-archive@aurora.apache.org Received: (qmail 78689 invoked by uid 500); 8 Dec 2015 23:39:11 -0000 Mailing-List: contact issues-help@aurora.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@aurora.apache.org Delivered-To: mailing list issues@aurora.apache.org Received: (qmail 78655 invoked by uid 99); 8 Dec 2015 23:39:11 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2015 23:39:11 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id EE39A2C14F7 for ; Tue, 8 Dec 2015 23:39:10 +0000 (UTC) Date: Tue, 8 Dec 2015 23:39:10 +0000 (UTC) From: "Maxim Khutornenko (JIRA)" To: issues@aurora.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (AURORA-1549) Updater kills instances with scoped update MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 Maxim Khutornenko created AURORA-1549: ----------------------------------------- Summary: Updater kills instances with scoped update Key: AURORA-1549 URL: https://issues.apache.org/jira/browse/AURORA-1549 Project: Aurora Issue Type: Bug Components: Scheduler Reporter: Maxim Khutornenko Assignee: Maxim Khutornenko Consider the following sequence for the hello_world job with 3 instances: {noformat} aurora job create devcluster/www-data/prod/hello aurora/examples/jobs/hello_world.aurora aurora update start devcluster/www-data/prod/hello/0 aurora/examples/jobs/hello_world.aurora aurora job kill devcluster/www-data/prod/hello/1 aurora update start devcluster/www-data/prod/hello/0,1 aurora/examples/jobs/hello_world.aurora {noformat} The expectation is to have all 3 instances on the same config. The result: instance 0 is killed with only instances 1 and 2 remaining. The problem is that [UpdateFactory|https://github.com/apache/aurora/blob/33d7e2170a86f54722a02a2dc9cb1e09fb52df25/src/main/java/org/apache/aurora/scheduler/updater/UpdateFactory.java#L95-L101] iterates over scoped instances thus overriding the JobDiff results. This leads to [InstanceUpdater|https://github.com/apache/aurora/blob/d7a1619fa85195937e74d1b09594909f0ed0ffd5/src/main/java/org/apache/aurora/scheduler/updater/InstanceUpdater.java#L102-L107] killing any instances that are present in actual state but not present in the desired state. These are the (correct) results produced by the [JobDiff|https://github.com/apache/aurora/blob/2e2371481d9aaccd6a45ad0f442d963d5ae7a3c8/src/main/java/org/apache/aurora/scheduler/updater/JobDiff.java#L185-L202] that should be used to drive the update instead: {noformat} "Unscoped diff contents:" Replaced: [2] Replacements: [1, 2] Unchanged: [0] "Scoped (final) diff contents:" Replaced: [] Replacements: [1] Unchanged: [2, 0] {noformat} The current behavior appears to be a leftover that should have been removed in this refactoring: https://reviews.apache.org/r/25969/. -- This message was sent by Atlassian JIRA (v6.3.4#6332)