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-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
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-discuss+unsubscribe@googlegroups.com.
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:If I then want to override that variable at the farm or server scope, the default value turns into this:The global-scope default value does render correctly on luanched servers, i.e. szradm queryenv list-global-variables displays this:
<variable name="CUSTOM_YAML" private="0">---
blah: blahblah
blah2: blah2blah2
blah3:
blah3.1:
blah3.1.1: blah3.1.1_value</variable>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 <dan...@scalr.com> 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 <westb...@gmail.com> 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.