From issues-return-31826-archive-asf-public=cust-asf.ponee.io@geode.apache.org Tue Feb 27 01:12:05 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 9258218064A for ; Tue, 27 Feb 2018 01:12:04 +0100 (CET) Received: (qmail 34102 invoked by uid 500); 27 Feb 2018 00:12:03 -0000 Mailing-List: contact issues-help@geode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@geode.apache.org Delivered-To: mailing list issues@geode.apache.org Received: (qmail 34093 invoked by uid 99); 27 Feb 2018 00:12:03 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 27 Feb 2018 00:12:03 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 3960F1A04A6 for ; Tue, 27 Feb 2018 00:12:03 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -101.511 X-Spam-Level: X-Spam-Status: No, score=-101.511 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id epCreNEGIMHZ for ; Tue, 27 Feb 2018 00:12:02 +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 3A67D5F369 for ; Tue, 27 Feb 2018 00:12:01 +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 58874E00D4 for ; Tue, 27 Feb 2018 00:12:00 +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 1800B2190B for ; Tue, 27 Feb 2018 00:12:00 +0000 (UTC) Date: Tue, 27 Feb 2018 00:12:00 +0000 (UTC) From: "Dave Barnes (JIRA)" To: issues@geode.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (GEODE-4101) Replace Redirection Sytem Properties by --redirect-output flag in GFSH commands 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/GEODE-4101?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Dave Barnes reassigned GEODE-4101: ---------------------------------- Assignee: Dave Barnes (was: Kenneth Howe) > Replace Redirection Sytem Properties by --redirect-output flag in GFSH co= mmands > -------------------------------------------------------------------------= ------ > > Key: GEODE-4101 > URL: https://issues.apache.org/jira/browse/GEODE-4101 > Project: Geode > Issue Type: Bug > Components: docs, gfsh > Reporter: Juan Jos=C3=A9 Ramos Cassella > Assignee: Dave Barnes > Priority: Major > Labels: pull-request-available > Fix For: 1.5.0 > > > Currently GEODE is "swallowing" all output sent to stdout and stderr by d= efault and there's no way of changing this behavior when starting members t= hrough gfsh. > This, between other things, prevents users from playing around with {{Sys= tem.out.println()}} during development phases, there could even be certain = scenarios where some critical piece of information that comes out through s= tdout somehow bypassed all the logging frameworks. Not only that, but this = also prevents the user from getting thread dumps by executing a plain {{kil= l -3}} or {{kill -QUIT}} using the processId, which is critical in troubles= hooting. > Currently there are two internal flags that can be used to prevent this d= efault behavior, both have to be used at the same time and both are very co= unterintuitive {{gemfire.OSProcess.ENABLE_OUTPUT_REDIRECTION=3Dtrue}} and {= {gemfire.OSProcess.DISABLE_OUTPUT_REDIRECTION=3Dfalse}}. These flags, howev= er, don't work at all when starting members through {{gfsh}}, and that's be= cause the relevant commands wrongly assume that the flags are already part = of the system properties too early in the lifecylce execution of the comman= d: > {code:title=3DStartLocatorCommand.java|borderStyle=3Dsolid} > @CliCommand(value =3D CliStrings.START_LOCATOR, help =3D CliStrings.START= _LOCATOR__HELP) > @CliMetaData(shellOnly =3D true, relatedTopic =3D {CliStrings.TOPIC_GEODE= _LOCATOR, CliStrings.TOPIC_GEODE_LIFECYCLE}) > public Result startLocator(...) throws Exception { > =09(...) > =09final boolean redirectOutput =3D Boolean.getBoolean(OSProcess.ENABLE_O= UTPUT_REDIRECTION_PROPERTY); > =09LocatorLauncher.Builder locatorLauncherBuilder =3D > =09=09new LocatorLauncher.Builder() > .setRedirectOutput(redirectOutput) > =09(...) > } > {code} > {code:title=3DStartServerCommand.java|borderStyle=3Dsolid} > @CliCommand(value =3D CliStrings.START_SERVER, help =3D CliStrings.START_= SERVER__HELP) > @CliMetaData(shellOnly =3D true, relatedTopic =3D {CliStrings.TOPIC_GEODE= _SERVER, CliStrings.TOPIC_GEODE_LIFECYCLE}) > public Result startServer(...) throws Exception { > =09(...) > =09final boolean redirectOutput =3D Boolean.getBoolean(OSProcess.ENABLE_O= UTPUT_REDIRECTION_PROPERTY); > ServerLauncher.Builder serverLauncherBuilder =3D=20 > =09new ServerLauncher.Builder() > .setRedirectOutput(redirectOutput) > =09(...) > {code} > At this stage during the execution, the system properties used when start= ing the members haven't been fully parsed yet and the flags only present wi= thin the {{sun.java.command}} system property, so {{Boolean.getBoolean(OSPr= ocess.ENABLE_OUTPUT_REDIRECTION_PROPERTY)}} will always return {{false}}. > The goal of the current JIRA is to add a {{--redirect-ouput}} flag to the= start commands in {{GFSH}} and deprecate the properties {{OSProcess.DISABL= E_OUTPUT_REDIRECTION}} and {{OSProcess.ENABLE_OUTPUT_REDIRECTION}}; unfortu= nately they can't be directly deleted because, even when they are internal,= they've been referenced several times in external articles to workaround o= lder issues. -- This message was sent by Atlassian JIRA (v7.6.3#76005)