Jboss EAP CLI - Clone operation can't run inside a batch

Solution Verified - Updated -

Environment

  • Red Hat JBoss Enterprise Application Platform (JBoss EAP)
    • 7,8

Issue

  1. We try to run CLI batch on EAP 7.4.18 Domain installation which clones the load-balancer profile and runs associated commands as below:
embed-host-controller --domain-config=domain.xml
batch
/profile=load-balancer:clone(to-profile=CPv2TLSProxy)
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy":add(default-interface="public")
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy"/remote-destination-outbound-socket-binding=host05:add(host=10.x.x.x,port="80")
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy"/socket-binding="https":add(port="${jboss.https.port:8443}")
/profile=CPv2TLSProxy/subsystem=undertow/server=default-server/host=default-host/filter-ref=load-balancer:remove
/profile=CPv2TLSProxy/subsystem=undertow/configuration=filter/mod-cluster=load-balancer:remove
/profile=CPv2TLSProxy/subsystem=undertow/configuration=handler/reverse-proxy=ReverseProxy:add(connection-idle-timeout=60,session-cookie-names=JSESSIONID)
/profile=CPv2TLSProxy/subsystem=undertow/configuration=handler/reverse-proxy=ReverseProxy/host=host05:add(instance-id=node1,outbound-socket-binding=host05,path=/portal,scheme=http)
/profile=CPv2TLSProxy/subsystem=undertow/server=default-server/host=default-host/location=\/portal/:add(handler=ReverseProxy)
/server-group=CPv2TLSProxy:add(profile=CPv2TLSProxy, socket-binding-group=reverse-proxy-sockets-CPv2TLSProxy)
run-batch
stop-embedded-host-controller
  1. This batch gives below error:
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:" => {"Operation step-1" => "WFLYCTL0216: Management resource '[
    (\"profile\" => \"CPv2TLSProxy\"),
    (\"subsystem\" => \"undertow\"),
    (\"configuration\" => \"filter\"),
    (\"mod-cluster\" => \"load-balancer\")
]' not found"}}
  1. However as a workaround when we run the batch after cloning the load-balancer profile, the batch runs fine.
embed-host-controller --domain-config=domain.xml
/profile=load-balancer:clone(to-profile=CPv2TLSProxy)
batch
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy":add(default-interface="public")
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy"/remote-destination-outbound-socket-binding=host05:add(host=10.x.x.x,port="80")
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy"/socket-binding="https":add(port="${jboss.https.port:8443}")
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy"/socket-binding="http":add(port="${jboss.http.port:8080}")
/socket-binding-group="reverse-proxy-sockets-CPv2TLSProxy"/socket-binding="mcmp-management":add(port="${jboss.mcmp.port:8090}")
/profile=CPv2TLSProxy/subsystem=undertow/server=default-server/host=default-host/filter-ref=load-balancer:remove
/profile=CPv2TLSProxy/subsystem=undertow/configuration=filter/mod-cluster=load-balancer:remove
/profile=CPv2TLSProxy/subsystem=undertow/configuration=handler/reverse-proxy=ReverseProxy:add(connection-idle-timeout=60,session-cookie-names=JSESSIONID)
/profile=CPv2TLSProxy/subsystem=undertow/configuration=handler/reverse-proxy=ReverseProxy/host=host05:add(instance-id=node1,outbound-socket-binding=host05,path=/portal,scheme=http)
/profile=CPv2TLSProxy/subsystem=undertow/server=default-server/host=default-host/location=\/portal/:add(handler=ReverseProxy)
/server-group=CPv2TLSProxy:add(profile=CPv2TLSProxy, socket-binding-group=reverse-proxy-sockets-CPv2TLSProxy)
run-batch
stop-embedded-host-controller

Resolution

  • We are checking this with the Engineering team Jira JBEAP-29268 and EAPSUP-1743 have been raised for the same.

Diagnostic Steps

  • We get below error during the batch execution:
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:" => {"Operation step-1" => "WFLYCTL0216: Management resource '[
    (\"profile\" => \"CPv2TLSProxy\"),
    (\"subsystem\" => \"undertow\"),
    (\"configuration\" => \"filter\"),
    (\"mod-cluster\" => \"load-balancer\")
]' not found"}}

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments