Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5EE78176DC for ; Tue, 16 Feb 2016 04:22:18 +0000 (UTC) Received: (qmail 39686 invoked by uid 500); 16 Feb 2016 04:22:18 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 39645 invoked by uid 500); 16 Feb 2016 04:22:18 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 39623 invoked by uid 99); 16 Feb 2016 04:22:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Feb 2016 04:22:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 0DE832C14F3 for ; Tue, 16 Feb 2016 04:22:18 +0000 (UTC) Date: Tue, 16 Feb 2016 04:22:18 +0000 (UTC) From: "Gour Saha (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-14690) Configurable system resource values for ambari-agent MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-14690?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D15= 148073#comment-15148073 ]=20 Gour Saha commented on AMBARI-14690: ------------------------------------ [~oleewere], [~sumitmohanty] if we have +1 from reviewers can we merge this= patch to the 2.2 line? > Configurable system resource values for ambari-agent > ---------------------------------------------------- > > Key: AMBARI-14690 > URL: https://issues.apache.org/jira/browse/AMBARI-14690 > Project: Ambari > Issue Type: Improvement > Components: ambari-agent > Affects Versions: 2.2.0 > Reporter: Oliv=C3=A9r Szab=C3=B3 > Assignee: Oliv=C3=A9r Szab=C3=B3 > Fix For: 2.2.2 > > Attachments: AMBARI-14690.patch, AMBARI-14690_v5.patch > > > When an ambari agent starts, host system details are registered into amba= ri server database. These values are calculated by ambari-agents based on d= ifferent files on the hosts (e.g : /proc/meminfo).=20 > In some cases it isn't a correct behavior: If ambari-agent is in a docker= -container, it will see the same memory/cpu details. (stack advisor also us= es these values, its possible stack advisor can recommend a too high memory= value for some services) > Solution: Configurable system resources for hosts (ambari-agent). > Added new option to 'agent' section in ambari-agent.ini: system_resource_= overrides. It points to a directory, if the value/directory does not exist = or empty, it will use the default behavior > {code:java} > [agent] > ... > system_resource_overrides=3D/etc/resource_overrides > ... > {code} > It reads all json files from that directory. JSON structure looks like th= is: > {code:java} > { > "memoryfree" : "15600", > "memorytotal" : .... > } > {code} > In ambari-agent Facter.py set these values, all of the factor info values= can be redefined in one or multiple JSON files. > That means ambari is not responsible to gather these values from the syst= em. > - use case:=20 > During 'docker run' , before 'ambari-agent start', 'system_resource_overr= ides' value can be overwritten, or the default ('/etc/resource_overrides') = can be mount with '-v' flag (docker run -v /my/path:/etc/resource_overrides= ). > Facter.py is called during ambari-agent start, so if the values will be m= odified later, ambari-agent needs to be restarted. -- This message was sent by Atlassian JIRA (v6.3.4#6332)