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 2E5199337 for ; Fri, 13 Jul 2012 20:40:54 +0000 (UTC) Received: (qmail 2977 invoked by uid 500); 13 Jul 2012 20:40:54 -0000 Delivered-To: apmail-incubator-cloudstack-dev-archive@incubator.apache.org Received: (qmail 2938 invoked by uid 500); 13 Jul 2012 20:40:53 -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 2929 invoked by uid 99); 13 Jul 2012 20:40:53 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2012 20:40:53 +0000 X-ASF-Spam-Status: No, hits=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of Frank.Zhang@citrix.com designates 66.165.176.89 as permitted sender) Received: from [66.165.176.89] (HELO SMTP.CITRIX.COM) (66.165.176.89) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Jul 2012 20:40:47 +0000 X-IronPort-AV: E=Sophos;i="4.77,580,1336363200"; d="scan'208";a="31458818" Received: from sjcpmailmx01.citrite.net ([10.216.14.74]) by FTLPIPO01.CITRIX.COM with ESMTP/TLS/RC4-MD5; 13 Jul 2012 16:40:25 -0400 Received: from SJCPMAILBOX01.citrite.net ([10.216.4.73]) by SJCPMAILMX01.citrite.net ([10.216.14.74]) with mapi; Fri, 13 Jul 2012 13:40:25 -0700 From: Frank Zhang To: CloudStack DeveloperList , Nitin Mehta , Prachi Damle CC: Prasanna Santhanam Date: Fri, 13 Jul 2012 13:40:24 -0700 Subject: RE: Review Request: CS-15560 : Improve HVM logging of hosts Thread-Topic: Review Request: CS-15560 : Improve HVM logging of hosts Thread-Index: Ac1hJXPAlmN3A1XpRi+Gn9a+GbPMCgAD+hJQ Message-ID: <93099572B72EB341B81A644E134F240B012F6CA38F9F@SJCPMAILBOX01.citrite.net> References: <20120713065857.729.68744@reviews.apache.org> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Taking this chance I have some suggestions to enhance our log strategy. > 2. The log does not contain any context: if there are a 100 concurrent > deployment requests active: which one does this apply to? There is the jo= b- > id of course, but say the cluster name would be useful for immediate > grokking 3. This is what log4j NDC/MDC made for. Cite MDC as an example, you can save Cluster name, mgmt id, job id or whatever in MDC, then change one line in Log4j configuration. All log output will be attached with the string you sa= ved before just like thread name which is commonly used . fortunately our thread model is pretty simple, adding MDC support is not a= big work. >3. It seems to me that just the count of non-HVM hosts is useful: if > you consider that tens of thousands of vms will be deployed, this same > verbose log with the exact same info will be printed thousands of times. = So, > why not just a counter instead of an expensive list? I think logging error/warning is better than logging normal stuff verbosely= . For example, we log each ping command which leads to a very fat log in condition of even= 10000 hosts. And the only thing it tells me is that the periodic ping thread of each Dir= ectAttachedAgent is alive. And also we have separate mgmt log in clustered mgmt server environment, it= will be better off setting a log4j socket server to congregate logs to one place. With MDC/NDC= support, it's easy to trace a asycjob from the womb to the tomb in one log. This way also solves= the issue that log exhausts precious disk of SSVM/CPVM as well. > -----Original Message----- > From: Chiradeep Vittal [mailto:Chiradeep.Vittal@citrix.com] > Sent: Friday, July 13, 2012 11:31 AM > To: CloudStack DeveloperList; Nitin Mehta; Prachi Damle > Cc: Prasanna Santhanam > Subject: Re: Review Request: CS-15560 : Improve HVM logging of hosts >=20 > I think you should re-consider the way this log is handled: > 1. If the cluster only contains non-HVM hosts, then this is going to be a= very > large log string. > 2. The log does not contain any context: if there are a 100 concurrent > deployment requests active: which one does this apply to? There is the jo= b- > id of course, but say the cluster name would be useful for immediate > grokking 3. It seems to me that just the count of non-HVM hosts is useful= : if > you consider that tens of thousands of vms will be deployed, this same > verbose log with the exact same info will be printed thousands of times. = So, > why not just a counter instead of an expensive list? >=20 > On 7/12/12 11:58 PM, "Nitin Mehta" wrote: >=20 > > > >----------------------------------------------------------- > >This is an automatically generated e-mail. To reply, visit: > >https://reviews.apache.org/r/5927/#review9131 > >----------------------------------------------------------- > > > >Ship it! > > > > > >Ship It! > > > >- Nitin Mehta > > > > > >On July 13, 2012, 6:46 a.m., Prasanna Santhanam wrote: > >> > >> ----------------------------------------------------------- > >> This is an automatically generated e-mail. To reply, visit: > >> https://reviews.apache.org/r/5927/ > >> ----------------------------------------------------------- > >> > >> (Updated July 13, 2012, 6:46 a.m.) > >> > >> > >> Review request for cloudstack, Prachi Damle and Nitin Mehta. > >> > >> > >> Description > >> ------- > >> > >> CS-15560 : Improve HVM logging of hosts > >> > >> When a host is not considered for deployment because it has disabled > >>HVM, then call that out in the logs for debugging. > >> > >> > >> This addresses bug CS-15560. > >> > >> > >> Diffs > >> ----- > >> > >> > >>server/src/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.ja > >>va > >>0f163cc > >> > >> Diff: https://reviews.apache.org/r/5927/diff/ > >> > >> > >> Testing > >> ------- > >> > >> 1) Deployed a Simulator Environment with two Simulator hosts > >> 2) marked a host as non-HVM and template as HVM enabled > >> * update host set capabilities=3DNULL where id=3D1; > >> * update vm_template set hvm=3D1 where id=3D10; > >> 3) restart MS for the VOs to refresh > >> 4) deploy VM using the template > >> 5) Verified the non-HVM hosts are called out in the logs > >> > >> Logs shown as below: > >> 2012-07-13 12:07:58,904 DEBUG [allocator.impl.FirstFitAllocator] > >>(Job-Executor-9:job-30 FirstFitRoutingAllocator) Not considering hosts: > >>[Host[-1-Routing]] to deploy template: Tmpl[10-VHD-simulator-Centos > >>as they are not HVM enabled > >> > >> > >> Thanks, > >> > >> Prasanna Santhanam > >> > >> > >