From issues-return-92057-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Fri Apr 20 15:00:06 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 76E0B180645 for ; Fri, 20 Apr 2018 15:00:05 +0200 (CEST) Received: (qmail 26417 invoked by uid 500); 20 Apr 2018 13:00:04 -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 26406 invoked by uid 500); 20 Apr 2018 13:00:04 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 26403 invoked by uid 99); 20 Apr 2018 13:00:04 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 20 Apr 2018 13:00:04 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id E010DC033A for ; Fri, 20 Apr 2018 13:00:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.51 X-Spam-Level: X-Spam-Status: No, score=-109.51 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, URIBL_BLOCKED=0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id D9woDh7ExsfO for ; Fri, 20 Apr 2018 13:00:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 515B65F1C6 for ; Fri, 20 Apr 2018 13:00:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 86D61E00A9 for ; Fri, 20 Apr 2018 13:00:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 399A22403C for ; Fri, 20 Apr 2018 13:00:00 +0000 (UTC) Date: Fri, 20 Apr 2018 13:00:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-10326) Prevent hosts fall into Maintenance when there are running VMs on it MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-10326?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16445683#comment-16445683 ]=20 ASF GitHub Bot commented on CLOUDSTACK-10326: --------------------------------------------- borisstoyanov commented on issue #2493: CLOUDSTACK-10326: Prevent hosts fal= l into Maintenance when there are running VMs on it URL: https://github.com/apache/cloudstack/pull/2493#issuecomment-383087774 =20 =20 @nvazquez should this be marked against 4.11.1 ? I don't think we'll be = able to squeeze it in... ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > Prevent hosts fall into Maintenance when there are running VMs on it > -------------------------------------------------------------------- > > Key: CLOUDSTACK-10326 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-103= 26 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Affects Versions: 4.11.0.0 > Reporter: Nicolas Vazquez > Assignee: Nicolas Vazquez > Priority: Major > Fix For: 4.11.1.0 > > Attachments: CLOUDSTACK-10326-Debug.png, CLOUDSTACK-10326-Initial= State.png, CLOUDSTACK-10326-Migrating.png, CLOUDSTACK-10326-MigrationFailed= .png > > > This issue was discovered, fixed and tested on KVM, but applies for every= hypervisor. > h2. Background > When=C2=A0enabling maintenance mode in a host, host state is put into 'Pr= epareForMaintenance' and running VMs are migrated into another host. After = every VM is migrated, host goes to 'Maintenance' state. > Checks are performed on ResourceManagerImpl.checkAndMaintan() method: > * List VMs=C2=A0with host_id =3D HOST_ID > * List VMs with last_host_id =3D HOST_ID and state=3DMigrating > When both=C2=A0queries are empty, then the host can be put into Maintenan= ce. > When a VM is being migrated to DEST_HOST, its host_id column is set to DE= ST_HOST, last_host_id =3D ORIGIN_HOST and state =3D Migrating. If then migr= ation fails,=C2=A0host_id =3D last_host_id =3D ORIGIN_HOST=C2=A0 > h2. Issue > This sequence: > * Enable maintenance mode on ORIGIN_HOST > * VMs start being migrated to a host, say DEST_HOST > * checkAndMaintain() starts: > ** First check passes (no VM with host_id =3D ORIGIN_HOST_ID as those ar= e being migrated) > ** Before the second check, one or more migrations fail > ** Second check passes, however there are VMs running on the host as mig= rations have failed. > * Host goes into Maintenance state. > Screenshots attached, query executed on each case: > select id, name, instance_name, state, host_id, last_host_id from vm_inst= ance; -- This message was sent by Atlassian JIRA (v7.6.3#76005)