Return-Path: X-Original-To: apmail-cloudstack-commits-archive@www.apache.org Delivered-To: apmail-cloudstack-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 12953DE71 for ; Wed, 29 May 2013 22:12:13 +0000 (UTC) Received: (qmail 24359 invoked by uid 500); 29 May 2013 22:12:12 -0000 Delivered-To: apmail-cloudstack-commits-archive@cloudstack.apache.org Received: (qmail 24308 invoked by uid 500); 29 May 2013 22:12:12 -0000 Mailing-List: contact commits-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 commits@cloudstack.apache.org Received: (qmail 24300 invoked by uid 99); 29 May 2013 22:12:12 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 29 May 2013 22:12:12 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 7004689D2D2; Wed, 29 May 2013 22:12:12 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anthonyxu@apache.org To: commits@cloudstack.apache.org Message-Id: <0bd9f7f2a70f41a8b21b31067e432cd9@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: git commit: updated refs/heads/master to a4d4284 Date: Wed, 29 May 2013 22:12:12 +0000 (UTC) Updated Branches: refs/heads/master 3ae00f4b2 -> a4d428434 Don't use volume name as snapshot name because volume name may incude space, \ and other special character, which cannot be part of path name in vmware after this commit, snapshot name is volumeUuid_timestring. Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/a4d42843 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/a4d42843 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/a4d42843 Branch: refs/heads/master Commit: a4d428434daa64221771597985cefa5f70741b96 Parents: 3ae00f4 Author: Anthony Xu Authored: Wed May 29 15:10:49 2013 -0700 Committer: Anthony Xu Committed: Wed May 29 15:10:49 2013 -0700 ---------------------------------------------------------------------- .../storage/snapshot/SnapshotManagerImpl.java | 7 +------ 1 files changed, 1 insertions(+), 6 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/a4d42843/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java index 26aae48..92d80ee 100755 --- a/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java +++ b/server/src/com/cloud/storage/snapshot/SnapshotManagerImpl.java @@ -1033,12 +1033,7 @@ public class SnapshotManagerImpl extends ManagerBase implements SnapshotManager, // Snapshot Name: VMInstancename + volumeName + timeString String timeString = DateUtil.getDateDisplayString(DateUtil.GMT_TIMEZONE, new Date(), DateUtil.YYYYMMDD_FORMAT); - VMInstanceVO vmInstance = _vmDao.findById(volume.getInstanceId()); - String vmDisplayName = "detached"; - if (vmInstance != null) { - vmDisplayName = vmInstance.getHostName(); - } - String snapshotName = vmDisplayName + "_" + volume.getName() + "_" + timeString; + String snapshotName = volume.getUuid() + "_" + timeString; // Create the Snapshot object and save it so we can return it to the // user