]
Michal Petrov commented on WFCORE-4018:
---------------------------------------
[~brian.stansberry] this doesn't happen in domain mode, from what I'm seeing the
steps of the composite operation are executed separately (by the time they reach host) and
as such under different OperationContexts so the first one is locking the second one out.
I haven't found out what component is responsible for that.
Remove alias and read-aliases in a batch causes blocking behavior
-----------------------------------------------------------------
Key: WFCORE-4018
URL:
https://issues.jboss.org/browse/WFCORE-4018
Project: WildFly Core
Issue Type: Bug
Components: Security
Reporter: Claudio Miranda
Assignee: Michal Petrov
Calling :remove-alias and :read-aliases on key-store resource in a composite operation
makes the resource blocked.
Generate two self signed certificates on a key-store resource and store it.
{code}
/host=master/server=server-three/subsystem=elytron/key-store=keysto1:generate-key-pair(alias=foobar,distinguished-name="cn=claudio,c=BR")
/host=master/server=server-three/subsystem=elytron/key-store=keysto1:generate-key-pair(alias=foobar2,distinguished-name="cn=claudio2,c=BR")
/host=master/server=server-three/subsystem=elytron/key-store=keysto1:store()
/host=master/server=server-three/subsystem=elytron/key-store=keysto1:read-aliases
{
"outcome" => "success",
"result" => [
"foobar2",
"foobar"
]
}
{code}
{code}
batch
/host=master/server=server-three/subsystem=elytron/key-store=keysto1:remove-alias(alias=foobar)
/host=master/server=server-three/subsystem=elytron/key-store=keysto1:read-aliases
run-batch
{code}
The above just blocks the prompt.
Then the blocking operation is show as:
{code}
/host=master/core-service=management/service=management-operations:read-resource(include-runtime,recursive)
{
"outcome" => "success",
"result" => {"active-operation" => {
"352328021" => {
"access-mechanism" => "NATIVE",
"address" => [
("host" => "master"),
("core-service" => "management"),
("service" => "management-operations")
],
"caller-thread" => "management-handler-thread - 1",
"cancelled" => false,
"domain-rollout" => false,
"domain-uuid" => undefined,
"exclusive-running-time" => -1L,
"execution-status" => "executing",
"operation" => "read-resource",
"running-time" => 10032404L
},
"-1467399640" => {
"access-mechanism" => "NATIVE",
"address" => [],
"caller-thread" => "management-handler-thread - 2",
"cancelled" => false,
"domain-rollout" => false,
"domain-uuid" => undefined,
"exclusive-running-time" => -1L,
"execution-status" => "executing",
"operation" => "composite",
"running-time" => 260150849919L
}
}}
}
{code}
After timeout there is the following message on CLI prompt
{code}
The batch failed with the following error (you are remaining in the batch editing mode to
have a chance to correct the error):
WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:
Step: step-2
Operation:
/host=master/server=server-three/subsystem=elytron/key-store=keysto1:read-aliases
Failure: WFLYCTL0409: Execution of operation 'read-aliases' on remote process at
address '[
("host" => "master"),
("server" => "server-three")
]' timed out after 305000 ms while awaiting initial response; remote process has been
notified to terminate operation
{code}
To fix the problem in HAL I will run it as individual commands.