Bug #1494
Newlines wrongly interpreted in multiline context variables with template variables
Status: | Closed | Start date: | 09/24/2012 | |
---|---|---|---|---|
Priority: | Low | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Core & System | |||
Target version: | - | |||
Resolution: | worksforme | Pull request: | ||
Affected Versions: | OpenNebula 3.6 |
Description
If I create multi-line context variable with template variables, newlines aren't interpreted as expected (and as it works with pure hardcoded variables).
VM context example:
<<VM template>>
CONTEXT=[
MULTI_LINE1="test1
test2
test3",
MULTI_LINE2="$NIC[IP]
$NIC[IP]
$NIC[IP]
",
MULTI_LINE3="$NIC[IP]
$NIC[IP]
$NIC[IP]",
MULTI_LINE4="$NIC[IP]
$NIC[IP]
$NIC[IP] " ]
<<VM template>>
<<VM context script>>
- Context variables generated by OpenNebula
MULTI_LINE1="test1
test2
test3"
MULTI_LINE2="10.0.0.110.0.0.110.0.0.1"
MULTI_LINE3="10.0.0.110.0.0.110.0.0.1"
MULTI_LINE4="10.0.0.1
10.0.0.1
10.0.0.1 "
<<VM context script>>
Hardcoded MULTI_LINE1 is simply OK, no problem with that. In MULTI_LINE2 and 3 with template variables new lines are ignored. In MULTI_LINE4 I have added additional space character after each template variable as a hack and I got expected result. 4th example is OK, but it's a tricky and not obvious to common user. $NIC[IP] here is just an example, my original motivation was to have a single multiline variable with all user's SSH public keys.
History
#1 Updated by Ruben S. Montero almost 9 years ago
- Target version set to Release 3.8
#2 Updated by Ruben S. Montero over 8 years ago
- Target version changed from Release 3.8 to Release 4.0
#3 Updated by Ruben S. Montero over 8 years ago
- Target version changed from Release 4.0 to Release 4.2
#4 Updated by Ruben S. Montero about 8 years ago
- Category set to Core & System
#5 Updated by Ruben S. Montero about 8 years ago
- Priority changed from Normal to Low
#6 Updated by Ruben S. Montero about 8 years ago
- Target version deleted (
Release 4.2)
#7 Updated by Ruben S. Montero over 7 years ago
- Target version set to Release 4.6
#8 Updated by Ruben S. Montero over 7 years ago
- Target version deleted (
Release 4.6)
#9 Updated by Ruben S. Montero almost 4 years ago
- Status changed from New to Closed
- Resolution set to worksforme
at least in 5.4