You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2020/10/01 16:29:40 UTC

[GitHub] [druid] valdemar-giosg opened a new pull request #10458: Fix the config initialization on container restart

valdemar-giosg opened a new pull request #10458:
URL: https://github.com/apache/druid/pull/10458


   <!-- Thanks for trying to help us make Apache Druid be the best it can be! Please fill out as much of the following information as is possible (where relevant, and remove it when irrelevant) to help make the intention and scope of this PR clear in order to ease review. -->
   
   <!-- Replace XXXX with the id of the issue fixed in this PR. Remove this section if there is no corresponding issue. Don't reference the issue in the title of this pull-request. -->
   
   <!-- If you are a committer, follow the PR action item checklist for committers:
   https://github.com/apache/druid/blob/master/dev/committer-instructions.md#pr-and-issue-action-item-checklist-for-committers. -->
   
   ### Description
   
   The following PR fixes the bug outlined below:
   
   On the initial docker container run, the config is copied to the /tmp dir as follows:
   
   ```
   mkdir -p /tmp/conf/
   cp -r /opt/druid/conf/druid /tmp/conf/druid
   ```
   
   Which effectively creates the directory `/tmp/conf` and copies __the directory__ `druid` to it.
   Therefore, we end up with the structure as follows:
   
   ```
   /tmp/conf/druid/
   --------------------> [druid configs]
   ```
   
   Which is the wanted behaviour.
   
   However, after executing `docker restart druid-container` or restarting the container in any other way, the `cp` program copies __the directory__ `druid` to __the directory__ /tmp/conf/__druid__, which leads to the structure `/tmp/conf/druid/druid`, i.e.
   
   ```
   /tmp/conf/druid/
   --------------------> [druid configs]
   --------------------> druid/[druid configs]
   ```
   
   This makes it impossible to modify the mounted configuration without completely removing the file system of the container (recreating it).
   
   #### Fixed the bug
   
   Added the test for the existing target config directory in `/tmp` and its removal.
   
   <hr>
   
   This PR has:
   - [ ] been self-reviewed.
      - [ ] using the [concurrency checklist](https://github.com/apache/druid/blob/master/dev/code-review/concurrency.md) (Remove this item if the PR doesn't have any relation to concurrency.)
   - [ ] added documentation for new or modified features or behaviors.
   - [ ] added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
   - [ ] added or updated version, license, or notice information in [licenses.yaml](https://github.com/apache/druid/blob/master/licenses.yaml)
   - [ ] added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
   - [ ] added unit tests or modified existing tests to cover new code paths, ensuring the threshold for [code coverage](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md) is met.
   - [ ] added integration tests.
   - [ ] been tested in a test Druid cluster.
   
   <!-- Check the items by putting "x" in the brackets for the done things. Not all of these items apply to every PR. Remove the items which are not done or not relevant to the PR. None of the items from the checklist above are strictly necessary, but it would be very helpful if you at least self-review the PR. -->
   
   <hr>
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jihoonson closed pull request #10458: Fix the config initialization on container restart

Posted by GitBox <gi...@apache.org>.
jihoonson closed pull request #10458:
URL: https://github.com/apache/druid/pull/10458


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jihoonson commented on pull request #10458: Fix the config initialization on container restart

Posted by GitBox <gi...@apache.org>.
jihoonson commented on pull request #10458:
URL: https://github.com/apache/druid/pull/10458#issuecomment-738275612


   The failed Travis CI seems an old one which was replaced by the new one based on GitHub action. The new CI passed, so I'm merging this PR.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jihoonson merged pull request #10458: Fix the config initialization on container restart

Posted by GitBox <gi...@apache.org>.
jihoonson merged pull request #10458:
URL: https://github.com/apache/druid/pull/10458


   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org


[GitHub] [druid] jihoonson commented on pull request #10458: Fix the config initialization on container restart

Posted by GitBox <gi...@apache.org>.
jihoonson commented on pull request #10458:
URL: https://github.com/apache/druid/pull/10458#issuecomment-737414846


   @valdemar-giosg sorry for late review. Travis CI failures seem transient, but I cannot re-trigger them for some reason. I suspect it's because it ran 2 months ago. I'm closing and re-opening this PR to re-trigger Travis.


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org