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 23185200ABF for ; Tue, 3 May 2016 07:45:15 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 21CD016098B; Tue, 3 May 2016 07:45:15 +0200 (CEST) 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 74AD51609B3 for ; Tue, 3 May 2016 07:45:14 +0200 (CEST) Received: (qmail 52634 invoked by uid 500); 3 May 2016 05:45:13 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 52413 invoked by uid 500); 3 May 2016 05:45:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 52367 invoked by uid 99); 3 May 2016 05:45:13 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 May 2016 05:45:13 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 520882C1F68 for ; Tue, 3 May 2016 05:45:13 +0000 (UTC) Date: Tue, 3 May 2016 05:45:13 +0000 (UTC) From: "Mike Tutkowski (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (CLOUDSTACK-9374) Replace timer.sleep in host-delete method to correct timing problem MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Tue, 03 May 2016 05:45:15 -0000 Mike Tutkowski created CLOUDSTACK-9374: ------------------------------------------ Summary: Replace timer.sleep in host-delete method to correct timing problem Key: CLOUDSTACK-9374 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-9374 Project: CloudStack Issue Type: Bug Security Level: Public (Anyone can view this level - this is the default.) Components: marvin Affects Versions: 4.9.0 Environment: N/A Reporter: Mike Tutkowski Fix For: 4.9.0 In the base.py file, there is a Host class with a delete instance method. This method first attempts to transition the host into the maintenance resource state. The first step in this process is to transition the host into the prepare-for-maintenance resource state. A while later, the host can be transitioned completely into the maintenance resource state. In an attempt to wait for this transition to occur, the delete method has a timer.sleep(30) call. The hope is that the host will have transitioned from the prepare-for-maintenance resource state to the maintenance resource state within 30 seconds, but this does not always happen. We should correct this problem by putting in logic to query the management server for the resource state of the host. If it's in the expected state, move on; else, sleep for a bit and try again (up to a certain limit). -- This message was sent by Atlassian JIRA (v6.3.4#6332)