Return-Path: X-Original-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-cloudstack-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 7F880D80B for ; Tue, 15 Jan 2013 21:24:31 +0000 (UTC) Received: (qmail 6722 invoked by uid 500); 15 Jan 2013 21:24:31 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 6690 invoked by uid 500); 15 Jan 2013 21:24:31 -0000 Mailing-List: contact cloudstack-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: cloudstack-dev@incubator.apache.org Delivered-To: mailing list cloudstack-dev@incubator.apache.org Received: (qmail 6667 invoked by uid 99); 15 Jan 2013 21:24:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jan 2013 21:24:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shadowsor@gmail.com designates 209.85.220.175 as permitted sender) Received: from [209.85.220.175] (HELO mail-vc0-f175.google.com) (209.85.220.175) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Jan 2013 21:24:24 +0000 Received: by mail-vc0-f175.google.com with SMTP id fy7so632533vcb.20 for ; Tue, 15 Jan 2013 13:24:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=jS18YEbB7zGCRd2HsKg+IZdQoVlTszkLpShLTTVpe88=; b=ZdE3WwWzdpxGSIf/LuRhhw6bdEp80E/Hj/Cz6QPzTqr+c2NWb/9U9Ita7foRSMWDmF DkvhsBZdPHfiaAgRVD6QUEzYht4/lGdU9zCMh+1LteVIYrN9awl5mC4mD+Onf0nnEoiB /MR6NuUj8cZin8QVc/H5DylLwwy7S5cxROyoewLvChg/W8vTgYh5KV1Phl8dP+o11ugl 9qt6S63ZxitVOp7nHenA2jntPjp8FkSsvBY5dz2rp1H9ACxR3cv7G67bG2twJ5g2T3cR sSaCP71aG6K33oQRSAB49J8+Ly6zBmaPsu0B2/mBZCmGOE9Zr6/5XY5LKfQOFuuNRU7o DE6A== MIME-Version: 1.0 Received: by 10.52.176.6 with SMTP id ce6mr93449259vdc.57.1358285043882; Tue, 15 Jan 2013 13:24:03 -0800 (PST) Received: by 10.58.152.143 with HTTP; Tue, 15 Jan 2013 13:24:03 -0800 (PST) In-Reply-To: <355CA416-931B-4B94-8793-4084AC6FA88C@schubergphilis.com> References: <355CA416-931B-4B94-8793-4084AC6FA88C@schubergphilis.com> Date: Tue, 15 Jan 2013 14:24:03 -0700 Message-ID: Subject: Re: SystemVM keypair setting in developer mode From: Marcus Sorensen To: cloudstack-dev@incubator.apache.org Content-Type: multipart/alternative; boundary=bcaec51a80ca8b5a0c04d35a6163 X-Virus-Checked: Checked by ClamAV on apache.org --bcaec51a80ca8b5a0c04d35a6163 Content-Type: text/plain; charset=ISO-8859-1 Ok, I'm going to put it back for now, and if there's an issue that can't be resolved some other way then we can address it further. I'm fairly confident that it was ok previously since 4.0 seems to deploy fine. I just didn't want to get into a commit war where someone keeps changing it back because it causes some other problem, without bringing it up. On Tue, Jan 15, 2013 at 2:17 PM, Hugo Trippaers < HTrippaers@schubergphilis.com> wrote: > I ran into the same problem as well, but I didn't do the check where it > came from. I just "fixed" it in the openvswitch branch and continued > working. > > I think it's a plain and simple mistake. > > Cheers, > > Hugo > > Verstuurd vanaf mijn iPad > > Op 15 jan. 2013 om 22:08 heeft "Marcus Sorensen" > het volgende geschreven: > > > Yes, I just got bitten by this as well. I'm hoping Alex can comment on > the > > commit because I'm not super familiar with this or what was being fixed > by > > the change to an OR. It used to be that they keys would generate if you > > were running as user 'cloud' OR the developer configuration flag was set. > > This was accomplished with an &&, which is confusing. The commit changed > it > > to an ||, which means that it only sets up the keys if you're running as > > user 'cloud' AND the developer flag is set. > > > > Went from: > > > > if (!username.equalsIgnoreCase("cloud") && !devel) { > > > > to: > > > > if (!username.equalsIgnoreCase("cloud") || !devel) { > > > > I think this will actually break KVM altogether in 4.1, because now the > > management server needs to be run as user cloud AND the devel flag has to > > be set in order to generate keys. > > > > This sounds lame, but I was confused enough by that if statement that I > put > > it into some test code to verify: > > > > public class TestCase { > > public static void main(String[] args) { > > String username = args[0]; > > String devel = args[1]; > > if (!username.equalsIgnoreCase("cloud") || !devel.equals("1")) { > > System.out.println("skipping keys"); > > } else { > > System.out.println("generating keys"); > > } > > } > > } > > > > How it was, looks right. If you're running as cloud it will generate > > regardless, otherwise the dev flag has to be set: > > > > marcus@mlsorensen-bsdesk:~$ java TestCase cloud 0 > > generating keys > > marcus@mlsorensen-bsdesk:~$ java TestCase cloud 1 > > generating keys > > marcus@mlsorensen-bsdesk:~$ java TestCase root 0 > > skipping keys > > marcus@mlsorensen-bsdesk:~$ java TestCase root 1 > > generating keys > > > > How it is now. You have to be cloud and you need to have the dev flag > set: > > > > marcus@mlsorensen-bsdesk:~$ java TestCase cloud 0 > > skipping keys > > marcus@mlsorensen-bsdesk:~$ java TestCase cloud 1 > > generating keys > > marcus@mlsorensen-bsdesk:~$ java TestCase root 0 > > skipping keys > > marcus@mlsorensen-bsdesk:~$ java TestCase root 1 > > skipping keys > > > > > > On Wed, Dec 19, 2012 at 10:34 PM, Dave Cahill > wrote: > > > >> Hi, > >> > >> There seem to be crossed wires about systemVM keypairs and whether the > >> management server can be run as a user other than "cloud". > >> > >> On Nov 1st, in the mailing list thread "Setting the ssh.publickey and > >> ssh.privatekey options", we decided that if a user is in developer mode > >> (used mvn -P developer -pl developer -Ddeploydb), the "developer" key > >> should be inserted into the database, allowing systemvm keypairs to be > set > >> even if the user is not "cloud". This was reviewed ( > >> https://reviews.apache.org/r/7861/) and committed ( > >> > >> > https://github.com/apache/incubator-cloudstack/commit/476e771c1c8f81b87a77883922bc1b35dea213fc > >> ). > >> > >> However, a Dec 1st commit changes the condition from: > >> Disallow setting systemvm keypairs if the user is not "cloud" user AND > is > >> not in developer mode > >> to > >> Disallow setting systemvm keypairs if the user is not "cloud" user OR is > >> not in developer mode > >> > >> This effectively means the management server can't be run as a non-cloud > >> user. > >> > >> I can't tell form the commit message if this effect is intentional: > >> "Removed that darn exceptions when cloudstack is running in windows. > It's a > >> simple or check that was written as an and check" > >> > >> > https://github.com/apache/incubator-cloudstack/commit/6036f73725889b3557263e1a4a80106f11217974 > >> > >> Anyone have any insights? > >> > >> Thanks, > >> Dave. > >> > --bcaec51a80ca8b5a0c04d35a6163--