You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "avano (via GitHub)" <gi...@apache.org> on 2024/04/25 11:13:17 UTC
[PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
avano opened a new pull request, #6042:
URL: https://github.com/apache/camel-quarkus/pull/6042
please also backport to 3.8
--
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
Posted by "avano (via GitHub)" <gi...@apache.org>.
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<String, String> 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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
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<String, String> 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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
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<String, String> 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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
Posted by "avano (via GitHub)" <gi...@apache.org>.
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<String, String> 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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
Posted by "zhfeng (via GitHub)" <gi...@apache.org>.
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
Posted by "avano (via GitHub)" <gi...@apache.org>.
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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [LRA] Fix test when running with DOCKER_HOST [camel-quarkus]
Posted by "jamesnetherton (via GitHub)" <gi...@apache.org>.
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<String, String> 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-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org