Hi Akila,

The current stratos config.sh is failing for me on:

   ${RM} /mnt/apache-stratos-cartridge-agent-4.0.0-SNAPSHOT/wso2carbon.lck  [1]

The error is that the file doesn't exist.

Is this why you have introduced the method wait_for_puppet?

Many thanks,

Chris

---
[1] 
https://github.com/apache/incubator-stratos/blob/master/tools/puppet3-agent/config.sh#L91

On Sat, Apr 19, 2014 at 12:25 PM, Akila Ravihansa Perera
<raviha...@wso2.com> wrote:
> Hi Chris,
>
> On 19 Apr 2014 16:09, "chris snow" <chsnow...@gmail.com> wrote:
>>
>> Hi Akila,
>>
>> It's looking good. Some questions:
>>
>> 1) Should we add an error handling function before Line 22, so
>> commands like Line 36 (PUPPET=`which puppet`) will be handled properly
>> if puppet doesn't exist?
>>
>> error() {
>>   echo "Error in script around line $1"
>>   exit 1
>> }
>> trap 'error ${LINENO}' ERR
>
> Well, my bad. Actually this should come after puppetinstall script. At that
> point script has either installed puppet or exit with -1
>
> +1 for checking puppetinstall exit status.
>
>>
>> 2) Will Line 36 (PUPPET=`which puppet`) actually point to anything?
>> Puppet isn't installed until Line 167
>>
>> 3) Is it worth introducing a timeout at Line 66?  If puppet doesn't
>> become available, the script will hang forever.
>
> +1
> I added this to test for some certificate issues.
>
>>
>> 4) A '-y' (assume yes) option would be good, so Line 166 doesn't have
>> to prompt for a user response
>
> +1. Will add this as well.
>
>>
>> Many thanks,
>>
>> Chris
>>
>> On Sat, Apr 19, 2014 at 11:15 AM, Akila Ravihansa Perera
>> <raviha...@wso2.com> wrote:
>> > Hi Chris,
>> >
>> > I've been working on this JIRA [1] to improve config and puppetinstall
>> > scripts so that they can be executed again if failed once.
>> > As a part of that I've also been working on taking arguments from config
>> > script. Pl have a look at my forked repo in [2]
>> >
>> > [1] - https://issues.apache.org/jira/browse/STRATOS-583
>> > [2] -
>> >
>> > https://github.com/ravihansa3000/incubator-stratos/blob/master/tools/puppet3-agent/config.sh
>> >
>> >
>> > Thanks.
>> >
>> >
>> > On Sat, Apr 19, 2014 at 12:28 AM, Udara Liyanage <ud...@wso2.com> wrote:
>> >>
>> >>
>> >> Sorry I mixed up with the setup file. My bad.
>> >>
>> >>
>> >> Touched, not typed. Erroneous words are a feature, not a typo.
>> >
>> >
>> >
>> >
>> > --
>> > Akila Ravihansa Perera
>> > Software Engineer
>> > WSO2 Inc.
>> > http://wso2.com
>> >
>> > Phone: +94 77 64 154 38
>> > Blog: http://ravihansa3000.blogspot.com
>>
>>
>>
>> --
>> Check out my professional profile and connect with me on LinkedIn.
>> http://lnkd.in/cw5k69



-- 
Check out my professional profile and connect with me on LinkedIn.
http://lnkd.in/cw5k69

Reply via email to