-
Bug
-
Resolution: Done
-
Major
-
3.0.10.Final, 7.0.0.Final
-
None
When adding mixed domain tests for EAP 7.1.0 I could not get the MixedDomainDeployment710TestCase.testExplodedDeployment() test to work. Comparing with the core domain ExplodedDeploymentTestCase.testInstallAndExplodeDeploymentOnDCFromScratch(), they both do the following:
1) Create an empty deployment 2) Add some content to the deployment using input streams 3) Add the deployment to a server group
However, they differ in that ExplodedDeploymentTestCase does this as individual steps, while MixedDomainDeployment710TestCase does this in a composite. I have a branch at https://github.com/kabir/wildfly-core/tree/WFCORE-3479 which expands ExplodedDeploymentTestCase to demonstrate the problem.
Going back to MixedDomainDeploymentTestCase, the testExplodedDeployment() test pushes the following composite to the DC:
{ "operation" => "composite", "address" => [], "steps" => [ { "operation" => "add", "address" => [("deployment" => "test.war")], "content" => [{"empty" => true}] }, { "operation" => "add-content", "address" => [("deployment" => "test.war")], "content" => [ { "target-path" => "index.html", "input-stream-index" => 0 }, { "target-path" => "index2.html", "input-stream-index" => 1 } ] }, { "operation" => "add", "address" => [ ("server-group" => "other-server-group"), ("deployment" => "test.war") ], "enabled" => true }, { "operation" => "add", "address" => [ ("server-group" => "main-server-group"), ("deployment" => "test.war") ], "enabled" => true } ], "operation-headers" => { "caller-type" => "user", "access-mechanism" => "NATIVE", "domain-uuid" => "b016e0a3-4175-4f40-b6b9-779fc0fd1745", "execute-for-coordinator" => true } }
What ends up being pushed to the slave is:
{ "operation" => "composite", "address" => [], "steps" => [ { "operation" => "add", "address" => [("deployment" => "test.war")], "content" => [{ "hash" => bytes { 0x8f, 0x7c, 0x8c, 0x80, 0x35, 0x88, 0x36, 0x16, 0x61, 0xfa, 0x0a, 0x10, 0x30, 0xf9, 0x13, 0x29, 0x04, 0x05, 0x9d, 0x82 }, "archive" => false }], "operation-headers" => { "caller-type" => "user", "access-mechanism" => "NATIVE", "domain-uuid" => "9f6d874e-24f8-41ec-a1d0-9c98509964fc" }, "runtime-name" => undefined }, { "operation" => "add-content", "address" => [("deployment" => "test.war")], "content" => [{ "hash" => bytes { 0x52, 0x3a, 0x0a, 0x7b, 0x3b, 0xae, 0x1c, 0x67, 0x22, 0x51, 0xf6, 0x34, 0xb5, 0x3b, 0xe7, 0xf9, 0x78, 0x59, 0x91, 0x63 }, "target-path" => "." }], "operation-headers" => { "caller-type" => "user", "access-mechanism" => "NATIVE", "domain-uuid" => "9f6d874e-24f8-41ec-a1d0-9c98509964fc" }, "path" => [ "index.html", "index2.html" ] }, { "operation" => "add", "address" => [ ("server-group" => "other-server-group"), ("deployment" => "test.war") ], "enabled" => true }, { "operation" => "add", "address" => [ ("server-group" => "main-server-group"), ("deployment" => "test.war") ], "enabled" => true } ], "operation-headers" => { "caller-type" => "user", "access-mechanism" => "NATIVE", "domain-uuid" => "9f6d874e-24f8-41ec-a1d0-9c98509964fc", "execute-for-coordinator" => true } }
The error reported by the DC is:
{ "outcome" => "failed", "result" => { "step-1" => { "outcome" => "failed", "rolled-back" => true }, "step-2" => { "outcome" => "failed", "rolled-back" => true }, "step-3" => { "outcome" => "failed", "rolled-back" => true }, "step-4" => { "outcome" => "failed", "rolled-back" => true } }, "failure-description" => {"WFLYDC0074: Operation failed or was rolled back on all servers. Server failures:" => {"server-group" => {"other-server-group" => {"host" => {"slave" => {"server-one" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0216: Management resource '[(\"deployment\" => \"test.war\")]' not found"}}}}}}}}, "rolled-back" => true, "server-groups" => {"other-server-group" => {"host" => {"slave" => {"server-one" => {"response" => { "outcome" => "failed", "result" => { "step-1" => { "outcome" => "failed", "failure-description" => "WFLYCTL0216: Management resource '[(\"deployment\" => \"test.war\")]' not found", "rolled-back" => true }, "step-2" => {"outcome" => undefined} }, "failure-description" => {"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-1" => "WFLYCTL0216: Management resource '[(\"deployment\" => \"test.war\")]' not found"}}, "rolled-back" => true }}}}}} }
Having debugged the slave process a bit, I believe the following is what is passed to the servers by the slave HC:
{ "operation" => "composite", "steps" => [ { "operation" => "add-content", "address" => [("deployment" => "test.war")], "content" => [{ "hash" => bytes { 0x52, 0x3a, 0x0a, 0x7b, 0x3b, 0xae, 0x1c, 0x67, 0x22, 0x51, 0xf6, 0x34, 0xb5, 0x3b, 0xe7, 0xf9, 0x78, 0x59, 0x91, 0x63 }, "target-path" => "." }], "operation-headers" => { "access-mechanism" => "NATIVE", "domain-uuid" => "2bd6c01d-a844-43fc-8d10-7d6e4c32e5b1" }, "path" => [ "index.html", "index2.html" ] }, { "operation" => "add", "address" => [("deployment" => "test.war")], "enabled" => true, "operation-headers" => { "access-mechanism" => "NATIVE", "domain-uuid" => "2bd6c01d-a844-43fc-8d10-7d6e4c32e5b1" }, "runtime-name" => "test.war", "content" => [{ "hash" => bytes { 0x52, 0x3a, 0x0a, 0x7b, 0x3b, 0xae, 0x1c, 0x67, 0x22, 0x51, 0xf6, 0x34, 0xb5, 0x3b, 0xe7, 0xf9, 0x78, 0x59, 0x91, 0x63 }, "archive" => false }] } ], "operation-headers" => { "access-mechanism" => "NATIVE", "domain-uuid" => "2bd6c01d-a844-43fc-8d10-7d6e4c32e5b1" }, "address" => [] }
Note that 'add-content' now comes BEFORE 'add', which would explain the "Management resource '[(\"deployment\" => \"test.war\")]' not found".
- blocks
-
WFLY-9634 Enable MixedDomainDeploymentTest.testExplodedDeployment() for EAP 7.1.0
- Pull Request Sent