You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/11/22 12:30:07 UTC

[GitHub] [inlong] chestnut-c opened a new pull request, #6605: [INLONG-6604][DataProxy] Fix can not get the local IP in the docker c…

chestnut-c opened a new pull request, #6605:
URL: https://github.com/apache/inlong/pull/6605

   ### Prepare a Pull Request
   
   - Title Example: [INLONG-6604][Component] Title of the pull request
   
   [INLONG-6604][DataProxy] Fix can not get the local IP in the docker container
   
   - Fixes #6604
   
   ### Motivation
   
   Fix can not get the local IP in the docker container
   
   ### Modifications
   
   get the local IP in the docker container excluding the ip of the network segment starting with 30.
   
   ### Verifying this change
   
   get the local IP in the docker container excluding the ip of the network segment starting with 30.
   
   - [ ] This change is a trivial rework/code cleanup without any test coverage.
   
   - [ ] This change is already covered by existing tests, such as:
     *(please describe tests)*
   
   - [ ] This change added tests and can be verified as follows:
   
     *(example:)*
     - *Added integration tests for end-to-end deployment with large payloads (10MB)*
     - *Extended integration test for recovery after broker failure*
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (yes / no)
     - If yes, how is the feature documented? (not applicable / docs / JavaDocs / not documented)
     - If a feature is not applicable for documentation, explain why?
     - If a feature is not documented yet in this PR, please create a follow-up issue for adding the documentation
   


-- 
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@inlong.apache.org

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


[GitHub] [inlong] gosonzhang commented on a diff in pull request #6605: [INLONG-6604][DataProxy] Fix can not get the local IP in the docker container

Posted by GitBox <gi...@apache.org>.
gosonzhang commented on code in PR #6605:
URL: https://github.com/apache/inlong/pull/6605#discussion_r1030130885


##########
inlong-dataproxy/dataproxy-docker/Dockerfile:
##########
@@ -26,6 +26,8 @@ ADD ${DATAPROXY_TARBALL} /opt/inlong-dataproxy
 EXPOSE 46801 46802
 ENV MANAGER_OPENAPI_IP=127.0.0.1
 ENV MANAGER_OPENAPI_PORT=8083
+# specify the name of the network card in the container to obtain the local IP
+ENV ETH_NAME=eth1

Review Comment:
   If it is a multi-network card machine, how to deal with 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@inlong.apache.org

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


[GitHub] [inlong] gosonzhang commented on a diff in pull request #6605: [INLONG-6604][DataProxy] Fix can not get the local IP in the docker container

Posted by GitBox <gi...@apache.org>.
gosonzhang commented on code in PR #6605:
URL: https://github.com/apache/inlong/pull/6605#discussion_r1029976151


##########
inlong-dataproxy/dataproxy-docker/dataproxy-docker.sh:
##########
@@ -17,7 +17,7 @@
 #
 
 file_path=$(cd "$(dirname "$0")"/../;pwd)
-local_ip=$(ifconfig | grep inet | grep -v inet6 | grep -v "127.0.0.1" | awk '{print $2}' | grep -v "30.*")
+local_ip=$(ifconfig | grep inet | grep -v inet6 | grep -v "127.0.0.1" | awk '{print $2}' | grep -v "^30.*")
 # config

Review Comment:
   It is necessary to supplement the IP filling rules here for the convenience of subsequent people, because if an environment uses the address of 30.xxx.xxx.xxx, they will have similar errors



-- 
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@inlong.apache.org

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


[GitHub] [inlong] gosonzhang commented on a diff in pull request #6605: [INLONG-6604][DataProxy] Fix can not get the local IP in the docker container

Posted by GitBox <gi...@apache.org>.
gosonzhang commented on code in PR #6605:
URL: https://github.com/apache/inlong/pull/6605#discussion_r1030154528


##########
inlong-dataproxy/dataproxy-docker/Dockerfile:
##########
@@ -26,6 +26,8 @@ ADD ${DATAPROXY_TARBALL} /opt/inlong-dataproxy
 EXPOSE 46801 46802
 ENV MANAGER_OPENAPI_IP=127.0.0.1
 ENV MANAGER_OPENAPI_PORT=8083
+# specify the name of the network card in the container to obtain the local IP
+ENV ETH_NAME=eth1

Review Comment:
   Ok



-- 
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@inlong.apache.org

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


[GitHub] [inlong] dockerzhang merged pull request #6605: [INLONG-6604][DataProxy] Fix can not get the local IP in the docker container

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #6605:
URL: https://github.com/apache/inlong/pull/6605


-- 
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@inlong.apache.org

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


[GitHub] [inlong] chestnut-c commented on a diff in pull request #6605: [INLONG-6604][DataProxy] Fix can not get the local IP in the docker container

Posted by GitBox <gi...@apache.org>.
chestnut-c commented on code in PR #6605:
URL: https://github.com/apache/inlong/pull/6605#discussion_r1029980708


##########
inlong-dataproxy/dataproxy-docker/dataproxy-docker.sh:
##########
@@ -17,7 +17,7 @@
 #
 
 file_path=$(cd "$(dirname "$0")"/../;pwd)
-local_ip=$(ifconfig | grep inet | grep -v inet6 | grep -v "127.0.0.1" | awk '{print $2}' | grep -v "30.*")
+local_ip=$(ifconfig | grep inet | grep -v inet6 | grep -v "127.0.0.1" | awk '{print $2}' | grep -v "^30.*")
 # config

Review Comment:
   > It is necessary to supplement the IP filling rules here for the convenience of subsequent people, because if an environment uses the address of 30.xxx.xxx.xxx, they will have similar errors
   
   Ok, I'll add some necessary explanatory notes.



-- 
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@inlong.apache.org

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


[GitHub] [inlong] dockerzhang commented on a diff in pull request #6605: [INLONG-6604][DataProxy] Fix can not get the local IP in the docker container

Posted by GitBox <gi...@apache.org>.
dockerzhang commented on code in PR #6605:
URL: https://github.com/apache/inlong/pull/6605#discussion_r1030137108


##########
inlong-dataproxy/dataproxy-docker/Dockerfile:
##########
@@ -26,6 +26,8 @@ ADD ${DATAPROXY_TARBALL} /opt/inlong-dataproxy
 EXPOSE 46801 46802
 ENV MANAGER_OPENAPI_IP=127.0.0.1
 ENV MANAGER_OPENAPI_PORT=8083
+# specify the name of the network card in the container to obtain the local IP
+ENV ETH_NAME=eth1

Review Comment:
   Only one IP is available.



-- 
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@inlong.apache.org

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