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 043E2200C44 for ; Mon, 13 Mar 2017 01:02:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 02DA7160B87; Mon, 13 Mar 2017 00:02:12 +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 4AAF8160B77 for ; Mon, 13 Mar 2017 01:02:11 +0100 (CET) Received: (qmail 93692 invoked by uid 500); 13 Mar 2017 00:02:10 -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 93683 invoked by uid 500); 13 Mar 2017 00:02:10 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 93679 invoked by uid 99); 13 Mar 2017 00:02:10 -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; Mon, 13 Mar 2017 00:02:10 +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 F1FA0C00B6 for ; Mon, 13 Mar 2017 00:02:09 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] 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 c5EI-ihcuLMJ for ; Mon, 13 Mar 2017 00:02:08 +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 0951D5FCB0 for ; Mon, 13 Mar 2017 00:02:08 +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 A95C5E026E for ; Mon, 13 Mar 2017 00:02: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 4E2AF243A6 for ; Mon, 13 Mar 2017 00:02:04 +0000 (UTC) Date: Mon, 13 Mar 2017 00:02:04 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-8608) Fix unpleasant admin experience with VMware fresh installs/upgrades - System VM's failed to start due to permissions issue MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 13 Mar 2017 00:02:12 -0000 [ https://issues.apache.org/jira/browse/CLOUDSTACK-8608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15906748#comment-15906748 ] ASF GitHub Bot commented on CLOUDSTACK-8608: -------------------------------------------- Github user sureshanaparti commented on a diff in the pull request: https://github.com/apache/cloudstack/pull/1875#discussion_r105573382 --- Diff: plugins/hypervisors/vmware/src/com/cloud/hypervisor/vmware/manager/VmwareManagerImpl.java --- @@ -707,6 +709,23 @@ private String setupMountPoint(String parent) { return mountPoint; } + @Override + public synchronized void setSystemVmTmpltPermission(String mountPoint) { + if (!s_isSystemVmTmpltPermissionSet) { + s_logger.debug("Set permissions for " + mountPoint); + String result = null; + final String systemVmTmpltPermissions = "0777"; + Script script = new Script(true, "chmod", _timeout, s_logger); + script.add("-R", systemVmTmpltPermissions, mountPoint); --- End diff -- @SudharmaJain Moved to TemplateConstants. > Fix unpleasant admin experience with VMware fresh installs/upgrades - System VM's failed to start due to permissions issue > -------------------------------------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-8608 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8608 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Reporter: Likitha Shetty > Assignee: Suresh Kumar Anaparti > Fix For: Future > > > VMware uses a folder in machine where management server is running to mount secondary storage. This is a bootstrap phase to start system vm, because unlike KVM, Xenserver, management server cannot directly access VMWare ESXI host to download systemvm template from secondary storage to primary storage. The secondary storage is usually managed by SSVM that uses root account to download templates. However, management server is using account 'cloud' to manipulate templates after secondary storage is mounted. After admin registers new systemvm template in CS as a normal upgrade procedure, the old SSVM will download the template using account root, but management server will create new SSVM from the new template using account 'cloud'. Then a permission denied error will raise. > Prior to 4.4, CS used to handle this by running 'chmod -R' to the folder to which secondary storage is mounted every time management server mounts secondary storage. Unfortunately, this method is slow because we are trying to give permissions to the entire folder. So in 4.4, we stopped automatically providing the permissions and asked admin to manually run 'chmod -R' to the folder 'templates' on secondary storage, after registering new systemvm template. > We can avoid this manual admin step by only providing permissions for the /templates folder instead of the entire folder. This way we will avoid the snapshots folder which could be very large in upgrade setups. -- This message was sent by Atlassian JIRA (v6.3.15#6346)