Bug #4331
Sunstone wizards break certain template elements with char escaping
Status: | Closed | Start date: | 02/13/2016 | |
---|---|---|---|---|
Priority: | High | Due date: | ||
Assignee: | - | % Done: | 0% | |
Category: | Sunstone | |||
Target version: | Release 5.0 | |||
Resolution: | fixed | Pull request: | ||
Affected Versions: | OpenNebula 4.14 |
Description
Sunstone wizards break certain template elements with char escaping, for example:
SCHED_REQUIREMENTS="(HYPERVISOR=\"kvm\") && (CLUSTER=\"mycluster\")"
will be escaped as
SCHED_REQUIREMENTS="(HYPERVISOR=\"kvm\") & (CLUSTER=\"mycluster\")"
and break the scheduler:
Error in SCHED_REQUIREMENTS: 'CLUSTER_ID = 1 & !(PUBLIC_CLOUD = YES) & ( (HYPERVISOR="kvm") &amp; (CLUSTER="mycluster") )', error: syntax error, unexpected STRING, expecting '!' or '=' or '>' or '<' at
line 1, columns 70:73
Something similar happens in CONTEXT=[USER_DATA="..."].
Related issues
History
#1 Updated by Ruben S. Montero over 5 years ago
- Target version set to Release 5.0
#2 Updated by Boris Parak over 5 years ago
If you could point me to the code (in JS, I presume) doing this escaping, I would be really grateful. I need to come up with a quick hack to fix this on our production instance.
Thanks!
#3 Updated by Boris Parak over 5 years ago
If anyone is interested, here is our temporary solution for `SCHED_REQUIREMENTS` and `CONTEXT/USER_DATA`.
1.) `SCHED_REQUIREMENTS`
Enabling the `Scheduling` tab for ordinary users (the `user` view) moved the `SCHED_REQUIREMENTS` attribute to the proper input box (originally it appeared in `Custom` on the `Other` tab). This prevented further unwanted escaping.
2.) `CONTEXT/USER_DATA`
Creating a custom input area on the `Context` tab moved the `CONTEXT/USER_DATA` attribute out of `Custom` on the `Other` tab. This prevented further unwanted escaping.
The first one can be achieved by configuration only, we can provide a simple patch for the second one.
#4 Updated by Boris Parak over 5 years ago
- File user_data.patch added
Attaching the USER_DATA patch. If there is interest, I can open a pull request against the master branch on GH.
#5 Updated by Daniel Molina over 5 years ago
- Related to Feature #4106: Implement consistent treatment of double quotes in inputs added
#6 Updated by Daniel Molina over 5 years ago
- Status changed from Pending to New
- Priority changed from Normal to High
#7 Updated by Carlos MartÃn about 5 years ago
- Status changed from New to Closed
- Resolution set to fixed
Fixed in master (feature #4106)