From issues-return-92895-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Wed Jun 20 16:55:04 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 C242318067A for ; Wed, 20 Jun 2018 16:55:03 +0200 (CEST) Received: (qmail 44796 invoked by uid 500); 20 Jun 2018 14:55:02 -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 44784 invoked by uid 500); 20 Jun 2018 14:55:02 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 44736 invoked by uid 99); 20 Jun 2018 14:55:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jun 2018 14:55:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 3CBBB180730 for ; Wed, 20 Jun 2018 14:55:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 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, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id T_rKITLGwcnT for ; Wed, 20 Jun 2018 14:55:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id C28075F1F3 for ; Wed, 20 Jun 2018 14:55:00 +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 59066E012F for ; Wed, 20 Jun 2018 14:55: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 201E02183A for ; Wed, 20 Jun 2018 14:55:00 +0000 (UTC) Date: Wed, 20 Jun 2018 14:55: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= =3D16518220#comment-16518220 ]=20 ASF GitHub Bot commented on CLOUDSTACK-10326: --------------------------------------------- rafaelweingartner commented on issue #2493: CLOUDSTACK-10326: Prevent hosts= fall into Maintenance when there are running VMs on it URL: https://github.com/apache/cloudstack/pull/2493#issuecomment-398780625 =20 =20 @nvazquez please do the honors. ---------------------------------------------------------------- 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)