Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id A446E200BD2 for ; Sat, 3 Dec 2016 23:38:03 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 92AA2160B16; Sat, 3 Dec 2016 22:38:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D759C160B0F for ; Sat, 3 Dec 2016 23:38:02 +0100 (CET) Received: (qmail 21903 invoked by uid 500); 3 Dec 2016 22:38:00 -0000 Mailing-List: contact issues-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list issues@ambari.apache.org Received: (qmail 21888 invoked by uid 99); 3 Dec 2016 22:38:00 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 03 Dec 2016 22:38:00 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0310F2C0086 for ; Sat, 3 Dec 2016 22:37:59 +0000 (UTC) Date: Sat, 3 Dec 2016 22:37:59 +0000 (UTC) From: "Hudson (JIRA)" To: issues@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-19055) Removing Tasks From host_role_command Causes Upgrades To Show As PENDING MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Sat, 03 Dec 2016 22:38:03 -0000 [ https://issues.apache.org/jira/browse/AMBARI-19055?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15718857#comment-15718857 ] Hudson commented on AMBARI-19055: --------------------------------- FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #6152 (See [https://builds.apache.org/job/Ambari-trunk-Commit/6152/]) AMBARI-19055 - Removing Tasks From host_role_command Causes Upgrades To (jhurley: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=12a3cd87184167cadf3cd12eb9b3c9d67dd3907a]) * (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java * (edit) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java * (edit) ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CalculatedStatusTest.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/StageResourceProvider.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CalculatedStatus.java * (edit) ambari-server/src/main/java/org/apache/ambari/server/topology/TopologyManager.java > Removing Tasks From host_role_command Causes Upgrades To Show As PENDING > ------------------------------------------------------------------------ > > Key: AMBARI-19055 > URL: https://issues.apache.org/jira/browse/AMBARI-19055 > Project: Ambari > Issue Type: Bug > Components: ambari-server > Affects Versions: 2.2.0 > Reporter: Jonathan Hurley > Assignee: Jonathan Hurley > Priority: Critical > Fix For: 2.5.0 > > Attachments: AMBARI-19055.patch > > > It may be necessary to remove entries from the {{host_role_command}} table if the size of the table has grown excessively large in order to reduce the query times for "IN_PROGRESS" requests. > However, if you remove all tasks for an upgrade, but you leave the stages, request, and upgrade items, the upgrade will appear as though it is now {{PENDING}}. > {noformat:title=Before Removal} > { > "href": "http://localhost:8080/api/v1/clusters/c1/upgrades/12", > "Upgrade": { > "cluster_name": "c1", > "create_time": 1480517560897, > "direction": "UPGRADE", > "downgrade_allowed": true, > "end_time": 1480517643350, > "exclusive": false, > "from_version": "2.5.0.0-1237", > "pack": "nonrolling-upgrade-2.5", > "progress_percent": 0, > "request_context": "Upgrading to 2.5.2.0-67", > "request_id": 12, > "request_status": "COMPLETED", > "skip_failures": false, > "skip_service_check_failures": false, > "start_time": 1480517560950, > "suspended": false, > "to_version": "2.5.2.0-67", > "type": "INTERNAL_REQUEST", > "upgrade_type": "NON_ROLLING" > }, > "upgrade_groups": [ > ... > {noformat} > {noformat:title=After Removal} > { > "href": "http://localhost:8080/api/v1/clusters/c1/upgrades/12", > "Upgrade": { > "cluster_name": "c1", > "create_time": 1480517560897, > "direction": "UPGRADE", > "downgrade_allowed": true, > "end_time": 1480517643350, > "exclusive": false, > "from_version": "2.5.0.0-1237", > "pack": "nonrolling-upgrade-2.5", > "progress_percent": 0, > "request_context": "Upgrading to 2.5.2.0-67", > "request_id": 12, > "request_status": "PENDING", > "skip_failures": false, > "skip_service_check_failures": false, > "start_time": 1480517560950, > "suspended": false, > "to_version": "2.5.2.0-67", > "type": "INTERNAL_REQUEST", > "upgrade_type": "NON_ROLLING" > }, > "upgrade_groups": [ > ... > {noformat} > The actual request is showing as {{COMPLETED}} correctly: > {noformat} > { > "href": "http://localhost:8080/api/v1/clusters/c1/requests/12", > "Requests": { > "aborted_task_count": 0, > "cluster_name": "c1", > "completed_task_count": 0, > "create_time": 1480517560897, > "end_time": 1480517643350, > "exclusive": false, > "failed_task_count": 0, > "id": 12, > "inputs": null, > "operation_level": null, > "progress_percent": 100, > "queued_task_count": 0, > "request_context": "Upgrading to 2.5.2.0-67", > "request_schedule": null, > "request_status": "COMPLETED", > "resource_filters": [], > "start_time": 1480517560950, > "task_count": 0, > "timed_out_task_count": 0, > "type": "INTERNAL_REQUEST" > }, > "tasks": [], > ... > {noformat} > STR: > - Perform a simple upgrade of a ZK-only cluster > - Find out the ID of the upgrade request (say its 12) > - Remove tasks > {code} > DELETE FROM execution_command WHERE task_id IN (SELECT task_id FROM host_role_command WHERE request_id = 12) > DELETE FROM host_role_command WHERE request_id = 12 > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)