Re: Preserve line returns in Global Variables (to support YAML)
Following up that I created an issue on Scalr github: https://github.com/Scalr/scalr/issues/80 On Tuesday, October 11, 2016 at 1:56:09 PM UTC-5, Ben West wrote: > > Actually, turns out the issue is with Scalr web UI stripping newlines from > default variable values populated at lower scopes. When I create a global > variable with default value, the correctly formatted YAML looks like this: > > [image: Inline image 2] > > If I then want to override that variable at the farm or server scope, the > default value turns into this: > [image: Inline image 3] > > > The global-scope default value does render correctly on luanched servers, > i.e. szradm queryenv list-global-variables displays this: > > --- > blah: blahblah > blah2: blah2blah2 > blah3: > blah3.1: >blah3.1.1: blah3.1.1_value > > So, the web UI is stripping newlines when it populates default values for > global variables at lower scopes. This appears to not effect the values > actually passed for those variables to launched servers, *unless* someone > unwittingly saves the default value when overriding that variable at farm > or server scope. > > This seems like a rather subtle sharp edge on the web UI. > > > > > > > > On Mon, Oct 10, 2016 at 5:11 PM, Daniele Testa> wrote: > >> Try putting the command "env" in a Scalr Script and see if the new-lines >> are really cut. >> >> If you use "echo" to print the variable, make sure that you use "echo -e" >> to enable new-line conversion. >> >> On Tue, Oct 11, 2016 at 4:07 AM, Ben West > > wrote: >> >>> I'm curious if there is a way to preserve '\n' line returns in a Global >>> Variable, specifically so that one can pass YAML to launched servers. >>> >>> Testing on a copy of Scalr v5.10 seems to indicate the line returns >>> being stripped, and it looks like the printf format string field can't be >>> used prevent that stripping. >>> >>> -- >>> 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 scalr-discus...@googlegroups.com . >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Regards, >> Daniele Testa | Sr. Solutions Architect @ Scalr | dan...@scalr.com >> | www.scalr.com | blog.scalr.com >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "scalr-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/scalr-discuss/6PvsxNq5QEM/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> scalr-discus...@googlegroups.com . >> For more options, visit https://groups.google.com/d/optout. >> > > > > -- > Ben West > m...@benwest.name > -- 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 scalr-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Built in Variable that increments
Hello, I was wondering if there is a built in variable that auto increments so that I can use it in the hostname field. For example the first instance is created, the variable would be 1 or 01. Second instance 02. Then 01 gets shutdown and a third is launched it would be 03, etc. -- Jeff -- 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 scalr-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Preserve line returns in Global Variables (to support YAML)
Hi Ben, Thank you for the collaboration on this issue. We are looking at this internally for resolution in a future version of Scalr. Your efforts are much appreciated. Please let us know if you run in to anything else moving forward. Cheers, Wm. Marc O'Brien Scalr Technical Support On Wednesday, October 12, 2016 at 9:32:02 AM UTC-6, Ben West wrote: > > Following up that I created an issue on Scalr github: > https://github.com/Scalr/scalr/issues/80 > > On Tuesday, October 11, 2016 at 1:56:09 PM UTC-5, Ben West wrote: >> >> Actually, turns out the issue is with Scalr web UI stripping newlines >> from default variable values populated at lower scopes. When I create a >> global variable with default value, the correctly formatted YAML looks like >> this: >> >> [image: Inline image 2] >> >> If I then want to override that variable at the farm or server scope, the >> default value turns into this: >> [image: Inline image 3] >> >> >> The global-scope default value does render correctly on luanched servers, >> i.e. szradm queryenv list-global-variables displays this: >> >> --- >> blah: blahblah >> blah2: blah2blah2 >> blah3: >> blah3.1: >>blah3.1.1: blah3.1.1_value >> >> So, the web UI is stripping newlines when it populates default values for >> global variables at lower scopes. This appears to not effect the values >> actually passed for those variables to launched servers, *unless* >> someone unwittingly saves the default value when overriding that variable >> at farm or server scope. >> >> This seems like a rather subtle sharp edge on the web UI. >> >> >> >> >> >> >> >> On Mon, Oct 10, 2016 at 5:11 PM, Daniele Testawrote: >> >>> Try putting the command "env" in a Scalr Script and see if the new-lines >>> are really cut. >>> >>> If you use "echo" to print the variable, make sure that you use "echo >>> -e" to enable new-line conversion. >>> >>> On Tue, Oct 11, 2016 at 4:07 AM, Ben West wrote: >>> I'm curious if there is a way to preserve '\n' line returns in a Global Variable, specifically so that one can pass YAML to launched servers. Testing on a copy of Scalr v5.10 seems to indicate the line returns being stripped, and it looks like the printf format string field can't be used prevent that stripping. -- 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 scalr-discus...@googlegroups.com. For more options, visit https://groups.google.com/d/optout. >>> >>> >>> >>> -- >>> Regards, >>> Daniele Testa | Sr. Solutions Architect @ Scalr | dan...@scalr.com | >>> www.scalr.com | blog.scalr.com >>> >>> -- >>> You received this message because you are subscribed to a topic in the >>> Google Groups "scalr-discuss" group. >>> To unsubscribe from this topic, visit >>> https://groups.google.com/d/topic/scalr-discuss/6PvsxNq5QEM/unsubscribe. >>> To unsubscribe from this group and all its topics, send an email to >>> scalr-discus...@googlegroups.com. >>> For more options, visit https://groups.google.com/d/optout. >>> >> >> >> >> -- >> Ben West >> m...@benwest.name >> > -- 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 scalr-discuss+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.