brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Valentin Aitken <valentin.ait...@cloudsoftcorp.com>
Subject Re: [DISCUSS][VOTE] Release Apache Brooklyn 0.9.0 [rc4]
Date Sun, 10 Apr 2016 20:24:16 GMT
Hi,

BashCommands.ifExecutableElse(String, List, List) is correct and it has 
been tested many times before.
It is an extension of BashCommands.ifExecutableElse0(String executable, 
String command) but with an else option.

test -z checks whether stdout length is zero. I will elaborate this with 
an example
if test -z `which dir`; then echo executing the other; else echo 
executing dir; fi

---
Aled, I think Riak is not tested in CentOS 7. The installation steps 
should be the same but it may have some small differences with firewall 
or else.

Valentin.

On 10/04/16 23:11, Aled Sage wrote:
> Regarding Svet's finding that RiakCluster has a problem:
>
>    Found a problem with template 3 - it's failing because of a problem
>    in RiakCluster. It's swapping the install scripts for redhat and
>    debian based systems, see [1].
>
>    [1]
> https://github.com/apache/brooklyn-library/blob/master/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/riak/RiakNodeSshDriver.java#L195
>
>
> This works for me.
>
> I tested on aws-ec2:eu-central-1 and it worked (letting it choose an 
> AMI - ubuntu-trusty-14.04-amd64-server-20160406.manifest.xml 
> (ami-311dfc5e)).
>
> I also tested with CentOS 6 (RightImage_CentOS_6.5_x64_v14.1.3.1_EBS 
> (ami-e82016f5)).
>
> For CentOS 7 (RightImage_CentOS_7.0_x64_v14.2.1_HVM_EBS 
> (ami-70d3ee6d)), each RiakNode reported healthy but the RiakCluster 
> failed during the joinCluster command - I've reported this at 
> https://issues.apache.org/jira/browse/BROOKLYN-252. I don't think we 
> should let that block the release, but should definitely investigate 
> and fix (for a 0.9.1 and/or 0.10.0).
>
> ---
> The line you pointed at looks wrong, but it seems to actually work! 
> This is because of the implementation of BashCommands.ifExecutableElse 
> (which is only ever called by this one place).
>
> It builds up the command:
>
>    if test -z `which <cmd>`; then <ifTrue>; else <otherwise>; fi
>
> That also seems the wrong way round, which therefore negates the error 
> in RiakNodeSshDriver:L195.
>
> Aled
>
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message