[ 
https://issues.apache.org/jira/browse/KNOX-1814?focusedWorklogId=211244&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-211244
 ]

ASF GitHub Bot logged work on KNOX-1814:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 11/Mar/19 19:46
            Start Date: 11/Mar/19 19:46
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on issue #68: KNOX-1814 - Moving 
conf/data folder checking to Java layer from bash
URL: https://github.com/apache/knox/pull/68#issuecomment-471690200
 
 
   > > I agree, but this is how the bash script checks if the service started 
(as of now).
   > 
   > @smolnar82 are you sure about this? I can double check in a bit, but it 
seems like if the check is in the bash script, the script would fail BEFORE 
java is even started. This would mean that there is no success message printed?
   
   Yes, I'm.
   If the folder check is moved to Java layer then the `appStart` function will 
execute the Java process and will check for the PID file being created; once it 
finds it considers the startup process finished with success. It may happen 
that the Java process did not reach the validation at this time (so that it has 
not thrown the corresponding exception yet) -> the PID file won't be removed.
   An easy to implement solution could be to give a bit more time - let's say 2 
seconds - to the Java process before the first time PID check (by this time the 
validation would fail and the Java process would return with 1).
   Ideally, the check should not rely only on the PID file being created; some 
sort of heartbeat would be helpful or implementing a basic state machine in the 
Gateway server (STOPPED, INITIALIZING, STARTED, STOPPING)...but this is out of 
the scope of this task.
   Any objection?
 
----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 211244)
    Time Spent: 2h 40m  (was: 2.5h)

> Move directory check to Java layer
> ----------------------------------
>
>                 Key: KNOX-1814
>                 URL: https://issues.apache.org/jira/browse/KNOX-1814
>             Project: Apache Knox
>          Issue Type: Improvement
>          Components: Server
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 1.3.0
>
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> Currently, the following folder checks exist in {{gateway.sh}}:
>  * {{conf}} directory exists and can be read?
>  * {{data}}, {{log}}, {{pid}} directories exist and can be written?
> Only the {{conf}} and {{data}} folders are used by the Java code ({{log}} and 
> {{pid}} only used in the bash script). Those directories are configurable 
> using GATEWAY_HOME in the Java layer, therefore those checks should either be 
> removed or fixed, so they take those variables into account.
>  



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

Reply via email to