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 4D9B9200C63 for ; Thu, 11 May 2017 21:43:09 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 4C3CD160BB3; Thu, 11 May 2017 19:43:09 +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 92CBE160BC7 for ; Thu, 11 May 2017 21:43:08 +0200 (CEST) Received: (qmail 45821 invoked by uid 500); 11 May 2017 19:43:07 -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 45807 invoked by uid 500); 11 May 2017 19:43:07 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 45804 invoked by uid 99); 11 May 2017 19:43:07 -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; Thu, 11 May 2017 19:43:07 +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 5CA83C03A8 for ; Thu, 11 May 2017 19:43:07 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.002 X-Spam-Level: X-Spam-Status: No, score=-100.002 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, 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 8YUmfR2-I7XW for ; Thu, 11 May 2017 19:43:06 +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 62C6A5F523 for ; Thu, 11 May 2017 19:43:05 +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 8C5A1E06C9 for ; Thu, 11 May 2017 19:43:04 +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 4CEF521E0B for ; Thu, 11 May 2017 19:43:04 +0000 (UTC) Date: Thu, 11 May 2017 19:43:04 +0000 (UTC) From: "Mike Tutkowski (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (CLOUDSTACK-9917) Root disks stranded on primary storage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 11 May 2017 19:43:09 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-9917?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mike Tutkowski reassigned CLOUDSTACK-9917: ------------------------------------------ Assignee: Mike Tutkowski > Root disks stranded on primary storage > -------------------------------------- > > Key: CLOUDSTACK-9917 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-991= 7 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Components: Management Server > Affects Versions: 4.10.0.0 > Environment: N/A > Reporter: Mike Tutkowski > Assignee: Mike Tutkowski > Priority: Blocker > Fix For: 4.10.0.0 > > > From dev@ > OK, here=E2=80=99s the gist of the problem: > In StorageManagerImpl.cleanupStorage(boolean), the following line in 4= .9 > List vols =3D _volsDao.listVolumesToBeDe= stroyed(new Date(System.currentTimeMillis() - ((long) StorageCleanupDelay.v= alue() << 10))); > was changed to the following in 4.10 > // ROOT volumes will be destroyed as part of VM cl= eanup > List vols =3D _volsDao.listNonRootVolume= sToBeDestroyed(new Date(System.currentTimeMillis() - ((long) StorageCleanup= Delay.value() << 10))); > This leads to a problem (for both managed and traditional storage) in = the following situation: > For example: Let=E2=80=99s say we have a system VM running on NFS prim= ary storage. We then put this primary storage into maintenance mode, which = creates the system VM (with the same name) on a different primary storage (= we do not create a new row in the cloud.vm_instance table for this VM). Whi= le this VM works, the original root disk of the system VM remains on the or= iginal primary storage and is not destroyed by the code in StorageManagerIm= pl.cleanupStorage(boolean) in 4.10 because 4.10 (as shown above) only asks = for non-root volumes to consider for deletion. In the 4.9 version of the co= de, the original root disk is cleaned up in StorageManagerImpl.cleanupStora= ge(boolean). The problem with 4.10 relying on a root disk always being dele= ted when the VM it belongs to is deleted is that in a situation like this t= hat the system VM doesn=E2=80=99t get deleted at this point =E2=80=93 it ge= ts a new root disk that=E2=80=99s hosted by a different primary storage (so= now it=E2=80=99s original root disk is stranded). > Here is the ticket and the PR where the code change went in: > https://issues.apache.org/jira/browse/CLOUDSTACK-9660 > https://github.com/apache/cloudstack/pull/1825 > To me, this needs to be fixed before we release 4.10, so I am -1 on th= is RC. > My suggestion would be to basically revert PR 1825 and to make use of = just bits and pieces of it. > For example, this part should be kept: > - volService.expungeVolumeAsync(volFactory.= getVolume(vol.getId())); > + VolumeInfo volumeInfo =3D volFactory.get= Volume(vol.getId()); > + if (volumeInfo !=3D null) { > + volService.expungeVolumeAsync(volume= Info); > + } else { > + s_logger.debug("Volume " + vol.getUu= id() + " is already destroyed"); > + } -- This message was sent by Atlassian JIRA (v6.3.15#6346)