brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (BROOKLYN-444) Effector call works from GUI but fails from CLI
Date Thu, 27 Apr 2017 15:50:04 GMT

    [ https://issues.apache.org/jira/browse/BROOKLYN-444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15986850#comment-15986850
] 

Aled Sage commented on BROOKLYN-444:
------------------------------------

I confirmed this works for me from the CLI:
{noformat}
br app effector-test entity ix37k1u5sp effector DoStuff invoke

aledsage
{noformat}

I also confirmed it now works over the REST api:
{noformat}
curl -u ********:******** -X POST --header 'Content-Type: application/json' --header 'Accept:
application/json' --header 'X-CSRF-TOKEN: ********' -d '{}' 'http://localhost:8081/v1/applications/effector-test/entities/ix37k1u5sp/effectors/DoStuff?timeout=never'

aledsage
{noformat}

> Effector call works from GUI but fails from CLI
> -----------------------------------------------
>
>                 Key: BROOKLYN-444
>                 URL: https://issues.apache.org/jira/browse/BROOKLYN-444
>             Project: Brooklyn
>          Issue Type: Bug
>    Affects Versions: 0.10.0
>         Environment: Brooklyn Version 0.10.0 on Mac
>            Reporter: Murdo Aird
>            Assignee: Geoff Macartney
>            Priority: Critical
>
> The following simple BP adds an Effector to an entity. The entity can be called from
the web UI and succeeds. Drilling into the Activity logs shows the simple bash command works.
> However if I try to invoke the Effector via the CLI [1], the call fails:
> br app "effector-test" entity "Empty Software Process" effector DoStuff invoke
> For the CLI failure, it looks like a random (?) environment variable is being injected
via the CLI [2].
> {code:none}
> name: effector-test
> location: localhost
> services:
>   - type: org.apache.brooklyn.entity.software.base.EmptySoftwareProcess
>     install.command: echo True
>     launch.command: echo True
>     checkRunning.command: echo true
>     brooklyn.initializers:
>       - type: org.apache.brooklyn.core.effector.ssh.SshCommandEffector
>         brooklyn.config:
>           name: DoStuff
>           command: whoami
> {code}
> * Calling a standard Effector (e.g. stop) via the CLI works. 
> * If the DoSuff Effector via CLI fails, I can subsequently call it from the web UI and
it works
> Not to muddy the waters, but calling the same Effector from the REST API also results
in an error - but it's a different one [3].
> [1] https://gist.github.com/murdoaird/0ba46476b8ec1e5039097b3754f720f7
> [2] https://gist.github.com/murdoaird/50777a5fa398a79611b4ec5bbfdc1d7d#env-1
> [3] https://gist.github.com/murdoaird/e153c5b3502d5475dee7358e2d9c3472



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message