using value deleted does not work in all cases
Closed this issue · 2 comments
mkrakowitzer commented
Using the deleted value to remove an entry from jboss generally works, but not in all cases, eg:
{
"remoting" => {
"connector" => {"remoting-connector" => {
"security-realm" => "deleted",
}},
}
}
I have also tried
{
"remoting" => {
"connector" => {"remoting-connector" => {
"security-realm" => undefined,
}},
}
}
[standalone@XXX:9999 /] /subsystem=remoting/connector=remoting-connector:read-resource
{
"outcome" => "success",
"result" => {
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
}
}
jcliff log:
2016-03-23 14:39:16:0532: Opening /opt/jboss1/jcliff_config/foo.conf
2016-03-23 14:39:16:0550: Processing remoting
2016-03-23 14:39:16:0550: Reading current status of remoting
2016-03-23 14:39:16:0550: /subsystem=remoting:read-resource(recursive=true)
2016-03-23 14:39:16:0564: in file:/tmp/jcliff-in8123541853270804807.tmp true
2016-03-23 14:39:16:0565: out file:/tmp/jcliff-out7347759627314159157.tmp true
2016-03-23 14:39:16:0565: err file:/tmp/jcliff-err6181094857491009912.tmp true
2016-03-23 14:39:16:0565: script file:/tmp/jcliff-script7640875743618752113.tmp true
2016-03-23 14:39:16:0565: args:/opt/jboss1/jboss/bin/jboss-cli.sh
2016-03-23 14:39:16:0565: args:--controller=XXX:9999
2016-03-23 14:39:16:0565: args:--connect
2016-03-23 14:39:16:0565: args:--file=/tmp/jcliff-in8123541853270804807.tmp
2016-03-23 14:39:16:0565: args:--timeout=5000
2016-03-23 14:39:16:0566: cmds:/subsystem=remoting:read-resource(recursive=true)
2016-03-23 14:39:16:0566: Script file:/tmp/jcliff-script7640875743618752113.tmp true
2016-03-23 14:39:16:0566: In file:/tmp/jcliff-in8123541853270804807.tmp true
2016-03-23 14:39:17:0589: return Code has :0
2016-03-23 14:39:17:0591: stderr:
2016-03-23 14:39:17:0591: stdout:{
"outcome" => "success",
"result" => {
"worker-read-threads" => 1,
"worker-task-core-threads" => 4,
"worker-task-keepalive" => 60,
"worker-task-limit" => 16384,
"worker-task-max-threads" => 16,
"worker-write-threads" => 1,
"connector" => {"remoting-connector" => {
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
}},
"local-outbound-connection" => undefined,
"outbound-connection" => undefined,
"remote-outbound-connection" => undefined
}
}
2016-03-23 14:39:17:0591: Return:{
"outcome" => "success",
"result" => {
"worker-read-threads" => 1,
"worker-task-core-threads" => 4,
"worker-task-keepalive" => 60,
"worker-task-limit" => 16384,
"worker-task-max-threads" => 16,
"worker-write-threads" => 1,
"connector" => {"remoting-connector" => {
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
}},
"local-outbound-connection" => undefined,
"outbound-connection" => undefined,
"remote-outbound-connection" => undefined
}
}
2016-03-23 14:39:17:0595: Node from server:{
"worker-read-threads" => 1,
"worker-task-core-threads" => 4,
"worker-task-keepalive" => 60,
"worker-task-limit" => 16384,
"worker-task-max-threads" => 16,
"worker-write-threads" => 1,
"connector" => {"remoting-connector" => {
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
}},
"local-outbound-connection" => undefined,
"outbound-connection" => undefined,
"remote-outbound-connection" => undefined
}
2016-03-23 14:39:17:0596: After preprocessing:{
"worker-read-threads" => 1,
"worker-task-core-threads" => 4,
"worker-task-keepalive" => 60,
"worker-task-limit" => 16384,
"worker-task-max-threads" => 16,
"worker-write-threads" => 1,
"connector" => {"remoting-connector" => {
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
}},
"local-outbound-connection" => undefined,
"outbound-connection" => undefined,
"remote-outbound-connection" => undefined
}
2016-03-23 14:39:17:0596: Configuration node after preprocessing:{"connector" => {"remoting-connector" => {"security-realm" => "deleted"}}}
2016-03-23 14:39:17:0598: computeDiff
2016-03-23 14:39:17:0598: Config path:/connector value={"remoting-connector" => {"security-realm" => "deleted"}}
2016-03-23 14:39:17:0599: Config path:/connector/remoting-connector value={"security-realm" => "deleted"}
2016-03-23 14:39:17:0599: Config path:/connector/remoting-connector/security-realm value="deleted"
2016-03-23 14:39:17:0599: Server path:/worker-read-threads value=1
2016-03-23 14:39:17:0599: Server path:/worker-task-core-threads value=4
2016-03-23 14:39:17:0599: Server path:/worker-task-keepalive value=60
2016-03-23 14:39:17:0599: Server path:/worker-task-limit value=16384
2016-03-23 14:39:17:0599: Server path:/worker-task-max-threads value=16
2016-03-23 14:39:17:0599: Server path:/worker-write-threads value=1
2016-03-23 14:39:17:0600: Server path:/connector value={"remoting-connector" => {
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
}}
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector value={
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
}
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector/authentication-provider value=undefined
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector/sasl-protocol value="remote"
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector/security-realm value="ApplicationRealm"
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector/server-name value=undefined
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector/socket-binding value="remoting"
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector/property value=undefined
2016-03-23 14:39:17:0600: Server path:/connector/remoting-connector/security value=undefined
2016-03-23 14:39:17:0600: Server path:/local-outbound-connection value=undefined
2016-03-23 14:39:17:0600: Server path:/outbound-connection value=undefined
2016-03-23 14:39:17:0601: Server path:/remote-outbound-connection value=undefined
2016-03-23 14:39:17:0601: Processing path /connector:OBJECT
2016-03-23 14:39:17:0601: Comparing for reorder: /connector cfg:[remoting-connector] s:[remoting-connector]
2016-03-23 14:39:17:0601: Processing path /connector/remoting-connector:OBJECT
2016-03-23 14:39:17:0601: Comparing for reorder: /connector/remoting-connector cfg:[security-realm] s:[authentication-provider, sasl-protocol, security-realm, server-name, socket-binding, property, security]
2016-03-23 14:39:17:0602: Processing path /connector/remoting-connector/security-realm:STRING
2016-03-23 14:39:17:0602: Node deleted
2016-03-23 14:39:17:0602: Diff:remove:/connector/remoting-connector/security-realm value="deleted"
2016-03-23 14:39:17:0602: Diff:reorder:/connector/remoting-connector value={"security-realm" => "deleted"}(/connector/remoting-connector value={
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
})
2016-03-23 14:39:17:0604: Checking rule modProps
2016-03-23 14:39:17:0604: Checking rule addHttpConnector
2016-03-23 14:39:17:0604: Checking rule removeOutboundConnection
2016-03-23 14:39:17:0604: Checking rule removeConnector
2016-03-23 14:39:17:0604: Checking rule removeHttpConnector
2016-03-23 14:39:17:0605: Checking rule removeRemoteOutboundConnection
2016-03-23 14:39:17:0605: Checking rule removeLocalOutboundConnection
2016-03-23 14:39:17:0605: Checking rule addConnector
2016-03-23 14:39:17:0605: Checking rule addRemoteOutboundConnection
2016-03-23 14:39:17:0605: Checking rule addLocalOutboundConnection
2016-03-23 14:39:17:0605: Checking rule addOutboundConnection
2016-03-23 14:39:17:0605: Checking rule modOutboundConnection
2016-03-23 14:39:17:0605: Checking rule modHttpConnector
2016-03-23 14:39:17:0605: Checking rule modLocalOutboundConnection
2016-03-23 14:39:17:0605: Checking rule modConnector
2016-03-23 14:39:17:0605: Checking rule configEndpointProps
2016-03-23 14:39:17:0605: Checking rule modRemoteOutboundConnection
2016-03-23 14:39:17:0605: No rules for diffs:remove:/connector/remoting-connector/security-realm value="deleted"
reorder:/connector/remoting-connector value={"security-realm" => "deleted"}(/connector/remoting-connector value={
"authentication-provider" => undefined,
"sasl-protocol" => "remote",
"security-realm" => "ApplicationRealm",
"server-name" => undefined,
"socket-binding" => "remoting",
"property" => undefined,
"security" => undefined
})
2016-03-23 14:39:17:0605: Processing deployments
2016-03-23 14:39:17:0606: All requested deployments:{}
bserdar commented
"security-realm" => undefined should work with 2.11.3, let me know if it doesn't.
security-realm is an "attribute", and cannot be deleted, you have to "undefine" it.
mkrakowitzer commented
Sorry about this, should have tried newer version first. TY.