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 D6A6E200C5B for ; Thu, 27 Apr 2017 19:15:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id D53D6160B9E; Thu, 27 Apr 2017 17:15:08 +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 28180160BA7 for ; Thu, 27 Apr 2017 19:15:08 +0200 (CEST) Received: (qmail 69297 invoked by uid 500); 27 Apr 2017 17:15:07 -0000 Mailing-List: contact dev-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list dev@brooklyn.apache.org Received: (qmail 69285 invoked by uid 99); 27 Apr 2017 17:15:07 -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; Thu, 27 Apr 2017 17:15:07 +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 F04531A00B0 for ; Thu, 27 Apr 2017 17:15:06 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.001 X-Spam-Level: X-Spam-Status: No, score=-100.001 tagged_above=-999 required=6.31 tests=[RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id zPGyyoPqXm9D for ; Thu, 27 Apr 2017 17:15:06 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 7A4D05FC8C for ; Thu, 27 Apr 2017 17:15:05 +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 F10CDE0C1B for ; Thu, 27 Apr 2017 17:15: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 50A7E21DE2 for ; Thu, 27 Apr 2017 17:15:04 +0000 (UTC) Date: Thu, 27 Apr 2017 17:15:04 +0000 (UTC) From: "Aled Sage (JIRA)" To: dev@brooklyn.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (BROOKLYN-335) brooklyn-client runtime panic on an app with no location MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 27 Apr 2017 17:15:09 -0000 [ https://issues.apache.org/jira/browse/BROOKLYN-335?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15987060#comment-15987060 ] Aled Sage commented on BROOKLYN-335: ------------------------------------ This now works for me (including with the {{br}} tool from 0.10.0). I tested with the following app: {noformat} services: - type: org.apache.brooklyn.entity.stock.BasicApplication {noformat} And then ran the following {{br}} commands: {noformat} Aleds-MBP-2:brooklyn-335 aledsage $ br deploy app.yaml Id: | pix1w8855u Name: | Application (pix1w8855u) Status: | In progress Aleds-MBP-2:brooklyn-335 aledsage $ br app Id | Name | Status | Location pix1w8855u | Application (pix1w8855u) | RUNNING | j1oer63oc8 | Application (j1oer63oc8) | STARTING | x72k258kls Aleds-MBP-2:brooklyn-335 aledsage $ br app pix1w8855u Id: | pix1w8855u Name: | Application (pix1w8855u) Status: | RUNNING ServiceUp: | true Type: | org.apache.brooklyn.entity.stock.BasicApplication CatalogItemId: | {noformat} > brooklyn-client runtime panic on an app with no location > -------------------------------------------------------- > > Key: BROOKLYN-335 > URL: https://issues.apache.org/jira/browse/BROOKLYN-335 > Project: Brooklyn > Issue Type: Bug > Reporter: Geoff Macartney > Priority: Minor > Fix For: 0.10.0 > > > It is possible (though rare) to have an application in Brooklyn with no location, e.g. if its entities specify their own locations. With such an application, the {{br}} client will correctly report the details with a {{br app}} command, > {code} > br app > Id Name Status Location > mcp7qvfh6o Test RUNNING > {code} > but on requesting details for the individual application there is a panic: > {code} > $ br app mcp7qvfh6o > panic: runtime error: index out of range > goroutine 1 [running]: > panic(0x3dad60, 0xc820010080) > /usr/local/Cellar/go/1.6/libexec/src/runtime/panic.go:464 +0x3e6 > github.com/apache/brooklyn-client/commands.(*Application).show(0xc820030068, 0x7fff5fbff8c7, 0xa) > /Users/geoff/go/src/github.com/apache/brooklyn-client/commands/application.go:82 +0xe70 > github.com/apache/brooklyn-client/commands.(*Application).Run(0xc820030068, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) > /Users/geoff/go/src/github.com/apache/brooklyn-client/commands/application.go:61 +0x21d > github.com/apache/brooklyn-client/command_runner.ConcreteRunner.RunCmdByName(0x78ac28, 0xc8200110d0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, ...) > /Users/geoff/go/src/github.com/apache/brooklyn-client/command_runner/runner.go:49 +0xe7 > github.com/apache/brooklyn-client/command_runner.(*ConcreteRunner).RunCmdByName(0xc820018300, 0x464970, 0xb, 0xc820016780, 0x0, 0x0) > :1 +0xe0 > github.com/apache/brooklyn-client/app.getCommand.func1(0xc820016780) > /Users/geoff/go/src/github.com/apache/brooklyn-client/app/app.go:72 +0x57 > github.com/apache/brooklyn-client/vendor/github.com/codegangsta/cli.Command.Run(0x464970, 0xb, 0x0, 0x0, 0xc82000b320, 0x3, 0x3, 0xc8200c2ac0, 0x14, 0x0, ...) > /Users/geoff/go/src/github.com/apache/brooklyn-client/vendor/github.com/codegangsta/cli/command.go:174 +0x1399 > github.com/apache/brooklyn-client/vendor/github.com/codegangsta/cli.(*App).Run(0xc820016500, 0xc82000b2c0, 0x3, 0x3, 0x0, 0x0) > /Users/geoff/go/src/github.com/apache/brooklyn-client/vendor/github.com/codegangsta/cli/app.go:187 +0x112b > main.main() > /Users/geoff/go/src/github.com/apache/brooklyn-client/br/brooklyn.go:60 +0x850 > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)