stratos-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akila Ravihansa Perera <raviha...@wso2.com>
Subject Re: '/tools/puppet3-agent/config.sh' - make capable of being called from another script?
Date Sat, 19 Apr 2014 11:25:24 GMT
Hi Chris,

On 19 Apr 2014 16:09, "chris snow" <chsnow123@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
> <ravihansa@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 <udara@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

Mime
View raw message