Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]

2024-04-25 Thread via GitHub


zhfeng merged PR #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]

2024-04-25 Thread via GitHub


jamesnetherton commented on code in PR #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042#discussion_r1579385162


##
integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java:
##
@@ -58,7 +58,18 @@ public Map start() {
 lraPort = container.getMappedPort(LRA_PORT);
 }
 
+// If the test runs with a remote docker, it needs to know the IP 
of the machine where the test app runs
+if (System.getenv("DOCKER_HOST") != null) {
+hostname = System.getProperty("lra.appNode.ip");

Review Comment:
   Ok, lets leave it as-is then. Thanks for the explanation 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]

2024-04-25 Thread via GitHub


avano commented on code in PR #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042#discussion_r1579377078


##
integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java:
##
@@ -58,7 +58,18 @@ public Map start() {
 lraPort = container.getMappedPort(LRA_PORT);
 }
 
+// If the test runs with a remote docker, it needs to know the IP 
of the machine where the test app runs
+if (System.getenv("DOCKER_HOST") != null) {
+hostname = System.getProperty("lra.appNode.ip");

Review Comment:
   this is not the IP where a docker container runs (rhel sidecar), but the IP 
where the test application runs (windows). the LRA coordinator runs in the 
docker container on the remote machine and it needs to be able to invoke the 
endpoint from the test application
   
   while it is possible to get an IP automatically, it may not work in all envs 
correctly - for example in our openstack it needs to use an internal openstack 
ip, as the machines are not reachable using public ips, so I assumed passing 
the IP manually would be the safest option



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]

2024-04-25 Thread via GitHub


jamesnetherton commented on code in PR #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042#discussion_r1579360201


##
integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java:
##
@@ -58,7 +58,18 @@ public Map start() {
 lraPort = container.getMappedPort(LRA_PORT);
 }
 
+// If the test runs with a remote docker, it needs to know the IP 
of the machine where the test app runs
+if (System.getenv("DOCKER_HOST") != null) {
+hostname = System.getProperty("lra.appNode.ip");

Review Comment:
   Ah I totally missed that, thanks.
   
   So, instead of having to manually pass along a system property, would it be 
enough to use `DockerClientFactory.instance().dockerHostIpAddress()`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]

2024-04-25 Thread via GitHub


avano commented on code in PR #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042#discussion_r1579355445


##
integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java:
##
@@ -58,7 +58,18 @@ public Map start() {
 lraPort = container.getMappedPort(LRA_PORT);
 }
 
+// If the test runs with a remote docker, it needs to know the IP 
of the machine where the test app runs
+if (System.getenv("DOCKER_HOST") != null) {
+hostname = System.getProperty("lra.appNode.ip");

Review Comment:
   the `hostname` variable [is 
used](https://github.com/avano/camel-quarkus/blob/lra/integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java#L76)
 in the `camel.lra.local-participant-url` property



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]

2024-04-25 Thread via GitHub


jamesnetherton commented on code in PR #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042#discussion_r1579345116


##
integration-tests/lra/src/test/java/org/apache/camel/quarkus/component/lra/it/LraTestResource.java:
##
@@ -58,7 +58,18 @@ public Map start() {
 lraPort = container.getMappedPort(LRA_PORT);
 }
 
+// If the test runs with a remote docker, it needs to know the IP 
of the machine where the test app runs
+if (System.getenv("DOCKER_HOST") != null) {
+hostname = System.getProperty("lra.appNode.ip");

Review Comment:
   Just curious - what actually uses the `lra.appNode.ip` property? I don't 
seen any other references to it.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]

2024-04-25 Thread via GitHub


avano commented on PR #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042#issuecomment-2076940280

   @zhfeng fyi, fix for the LRA test failure on windows (with rhel sidecar)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org