[ 
https://issues.apache.org/jira/browse/HDDS-839?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16687784#comment-16687784
 ] 

Elek, Marton commented on HDDS-839:
-----------------------------------

Patch is uploaded. To test it:

1. Apply the patch to the docker-hadoop-runner branch.
2. cd scripts

3. Test the waiting

In one terminal:

{code}
WAITFOR=localhost:1234 ./starter.sh ls
{code}

In an other terminal:

{code}
nc -l -p 1234
{code}

Script should continue only after the nc server is started

4. the normal case (without waiting)

{code]
./starter.sh ls
{code}

You can see the output immediately 

5. Timeout
{code}
WAITFOR_TIMEOUT=10 WAITFOR=localhost:1234 ./starter.sh ls
{code}

You can see an error message (and 1 exit code) after ~10 seconds (unless you 
start a server on port 1234)

> Wait for other services in the started script of hadoop-runner base docker 
> image
> --------------------------------------------------------------------------------
>
>                 Key: HDDS-839
>                 URL: https://issues.apache.org/jira/browse/HDDS-839
>             Project: Hadoop Distributed Data Store
>          Issue Type: Sub-task
>            Reporter: Elek, Marton
>            Assignee: Elek, Marton
>            Priority: Major
>
> As described in the parent issue, we need a simple method to handle service 
> dependencies in kubernetes clusters (usually as a workaround when some 
> clients can't re-try with renewed dns information).
> But it also could be useful to minimize the wait time in the docker-compose 
> clusters.
> The easiest implementation is modifying the started script of the 
> apache/hadoop-runner base image and add a bash loop which checks the 
> availability of the TCP port (with netcat). 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to