]
Brian Stansberry commented on WFCORE-1214:
------------------------------------------
The WFCORE-1214 fix causes WFCORE-2055 by dropping headers from steps in a composite op,
resulting in the domain server not recognizing that a local write was initiated by the
caller rather than by the HC.
Operation headers not propagated to domain servers when
'composite' op is used
------------------------------------------------------------------------------
Key: WFCORE-1214
URL:
https://issues.jboss.org/browse/WFCORE-1214
Project: WildFly Core
Issue Type: Bug
Components: Domain Management
Affects Versions: 2.0.4.Final
Reporter: Brian Stansberry
Assignee: Brian Stansberry
Priority: Critical
Fix For: 2.0.5.CR1
When the user adds request headers to an op, they are not propagated to the servers
during domain rollout if the 'composite' op is involved.
For example, if I add some stdout printing of what the headers are on the various
processes and invoke this:
{code}
[domain@localhost:9990 /] deploy ~/tmp/helloworld.war
--headers={blocking-timeout=5;rollback-on-runtime-failure=false} --all-server-groups
{code}
Then on a HC with two servers, this is logged:
[Host Controller] 10:53:40,697 INFO [stdout] (management-handler-thread - 3)
"composite" headers: {
[Host Controller] 10:53:40,697 INFO [stdout] (management-handler-thread - 3)
"blocking-timeout" => "5",
[Host Controller] 10:53:40,698 INFO [stdout] (management-handler-thread - 3)
"rollback-on-runtime-failure" => "false",
[Host Controller] 10:53:40,698 INFO [stdout] (management-handler-thread - 3)
"caller-type" => "user",
[Host Controller] 10:53:40,698 INFO [stdout] (management-handler-thread - 3)
"access-mechanism" => "NATIVE"
[Host Controller] 10:53:40,698 INFO [stdout] (management-handler-thread - 3) }
[Host Controller] 10:53:40,727 INFO [org.jboss.as.repository] (management-handler-thread
- 3) WFLYDR0001: Content added at location
/Users/bstansberry/dev/wildfly/wildfly-core/dist/target/wildfly-core-2.0.5.Final-SNAPSHOT/domain/data/content/6f/cd9eae343ed6d5aa9fffa83012d155b1ef911c/content
[Server:server-one] 10:53:40,772 INFO [stdout] (ServerService Thread Pool -- 11)
"composite" headers: null
[Server:server-two] 10:53:40,772 INFO [stdout] (ServerService Thread Pool -- 11)
"composite" headers: null
The HC logs, then the servers report. The user-specified headers are not included.
Invoke the same op without the batch and this is logged:
{code}
[Host Controller] 10:43:50,400 INFO [stdout] (management-handler-thread - 4)
"composite" headers: {
[Host Controller] 10:43:50,401 INFO [stdout] (management-handler-thread - 4)
"blocking-timeout" => "5",
[Host Controller] 10:43:50,401 INFO [stdout] (management-handler-thread - 4)
"rollback-on-runtime-failure" => "false",
[Host Controller] 10:43:50,401 INFO [stdout] (management-handler-thread - 4)
"caller-type" => "user",
[Host Controller] 10:43:50,401 INFO [stdout] (management-handler-thread - 4)
"access-mechanism" => "NATIVE"
[Host Controller] 10:43:50,401 INFO [stdout] (management-handler-thread - 4) }
[Host Controller] 10:43:50,425 INFO [org.jboss.as.repository] (management-handler-thread
- 4) WFLYDR0001: Content added at location
/Users/bstansberry/dev/wildfly/wildfly-core/dist/target/wildfly-core-2.0.5.Final-SNAPSHOT/domain/data/content/6f/cd9eae343ed6d5aa9fffa83012d155b1ef911c/content
[Server:server-two] 10:43:50,464 INFO [stdout] (ServerService Thread Pool -- 11)
"composite" headers: {
[Server:server-two] 10:43:50,464 INFO [stdout] (ServerService Thread Pool -- 11)
"blocking-timeout" => "5",
[Server:server-two] 10:43:50,464 INFO [stdout] (ServerService Thread Pool -- 11)
"rollback-on-runtime-failure" => "false",
[Server:server-one] 10:43:50,464 INFO [stdout] (ServerService Thread Pool -- 11)
"composite" headers: {
[Server:server-two] 10:43:50,464 INFO [stdout] (ServerService Thread Pool -- 11)
"access-mechanism" => "NATIVE",
[Server:server-one] 10:43:50,465 INFO [stdout] (ServerService Thread Pool -- 11)
"blocking-timeout" => "5",
[Server:server-two] 10:43:50,465 INFO [stdout] (ServerService Thread Pool -- 11)
"domain-uuid" => "216d2e99-dba5-4c89-8020-b0c16bd553c5"
[Server:server-one] 10:43:50,465 INFO [stdout] (ServerService Thread Pool -- 11)
"rollback-on-runtime-failure" => "false",
[Server:server-two] 10:43:50,465 INFO [stdout] (ServerService Thread Pool -- 11) }
[Server:server-one] 10:43:50,465 INFO [stdout] (ServerService Thread Pool -- 11)
"access-mechanism" => "NATIVE",
[Server:server-one] 10:43:50,465 INFO [stdout] (ServerService Thread Pool -- 11)
"domain-uuid" => "216d2e99-dba5-4c89-8020-b0c16bd553c5"
[Server:server-one] 10:43:50,465 INFO [stdout] (ServerService Thread Pool -- 11) }
{code}
Expected headers are present.
Note the CLI 'deploy' is far from the only time the 'composite' op is
used. Among other places, the high level CLI 'batch' command in a domain involves
use of 'composite'.