Hi José, This is indeed something we're aware of, and we're investigating solutions.
In the meantime, what you can do is the following: - Configure your script to asynchronous - Make sure your script runs last on HostUp and HostTerminate (your can see the order in the Scripting tab) - Start your script by adding a small sleep That's a hack, but it should work: the IP List Builder handler (which touches the IP files), runs *just* after the last script has run, and asynchronous execution means you don't wait for the script to exit before moving on. I have a tutorial (the code is ready, not the text) where we do exactly this: https://github.com/scalr-tutorials/workertier/blob/master/scalr/scripts/workertier.findbackend.sh If you want something more rock solid, you can use `szradm -q list-roles` in your script. Cheers, On Thursday, September 12, 2013 8:30:30 PM UTC+2, José Juan Montes wrote: > > Hello. > > I'm trying to configure my own balancer role (using nginx). > > I have a script that uses the information in > /etc/scalr/private.d/hosts/<my_role> to build nginx configuration, and > works ok. > > The problem is when I add this script to the "HostUp" and > "BeforeHostTerminate" events. It is executed _before_ the list of IPs has > been updated (as I can tell from scalarizr logs). > > How should I orchestrate this kind of thing? > > Any advice is very welcome. > > -- You received this message because you are subscribed to the Google Groups "scalr-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
