Bug 1026319
Summary: | [GSS] (6.4) Wrong datasource connection-url is written in standalone.xml even if CLI script executes successfully | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | Tolis Emmanouilidis <aemmanou> |
Component: | CLI | Assignee: | Alexey Loubyansky <olubyans> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Petr Kremensky <pkremens> |
Severity: | medium | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.1.0, 6.2.0, 6.1.1 | CC: | bbaranow, brian.stansberry, kkhan, kpiwko, oskutka, pkremens |
Target Milestone: | DR1 | ||
Target Release: | EAP 6.4.0 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Tolis Emmanouilidis
2013-11-04 12:15:08 UTC
I'd like to add that the issue appears when using an equality sign inside the connection-url value. e.g: --connection-url=jdbc:h2:~/unifiedpush;DB_CLOSE_DELAY=-1 The equal sign is a special one, although in this position it could be argued that it should not be considered special. I'm gonna see what's going on there. To avoid issues with special characters you can escape or quote them. See the difference in the generated requests [standalone@localhost:9990 /] echo-dmr data-source add --name=myds --driver-name=h2 --jndi-name=java:/myds --connection-url=jdbc:h2:~/unifiedpush;DB_CLOSE_DELAY=-1 { "address" => [ ("subsystem" => "datasources"), ("data-source" => "myds") ], "operation" => "add", "jndi-name" => "java:/myds", "connection-url" => "-1", "driver-name" => "h2" } [standalone@localhost:9990 /] echo-dmr data-source add --name=myds --driver-name=h2 --jndi-name=java:/myds --connection-url=jdbc:h2:~/unifiedpush;DB_CLOSE_DELAY\=-1 { "address" => [ ("subsystem" => "datasources"), ("data-source" => "myds") ], "operation" => "add", "jndi-name" => "java:/myds", "connection-url" => "jdbc:h2:~/unifiedpush;DB_CLOSE_DELAY=-1", "driver-name" => "h2" } [standalone@localhost:9990 /] echo-dmr data-source add --name=myds --driver-name=h2 --jndi-name=java:/myds --connection-url="jdbc:h2:~/unifiedpush;DB_CLOSE_DELAY=-1" { "address" => [ ("subsystem" => "datasources"), ("data-source" => "myds") ], "operation" => "add", "jndi-name" => "java:/myds", "connection-url" => "jdbc:h2:~/unifiedpush;DB_CLOSE_DELAY=-1", "driver-name" => "h2" } The equals sign in the value is treated as a name/value separator because the value parser is a general one, i.e. it can recognize all sorts of value types: - properties of the form name=value (which is how it recognizes the given value); - property lists: name=value(,name=value)*; - structures, such as {a=b,c=[d,e,f]}, etc; - etc. One way to avoid this issue is to rely on the parameter type defined in management model, i.e. connection-url is STRING, and use a simpler value parser. Potential problem with this approach is that, not sure how it is now, before the management model descriptions were not always accurate and STRING type could be used for parameters and properties that were in fact OBJECT, LIST, PROPERTY, etc. Alexey Loubyansky <alex> updated the status of jira WFLY-2464 to Resolved Alexey Loubyansky <alex> made a comment on jira WFLY-2464 Merged. As in my previous comment, a simpler parser is used now for STRING types. As a consequence the equals sign does not have to be escaped in this case. |