You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2021/09/01 05:38:46 UTC

[GitHub] [couchdb-docker] jnordberg opened a new issue #204: Container exits with no log messages if configuration file is provided

jnordberg opened a new issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204


   ## Expected Behavior
   
   The container should start using the config files provided.
   
   ## Current Behavior
   
   The container exits with code 1 and no log messages.
   
   ## Possible Solution
   
   Make configs in /etc/local.d/* readable before running couchdb in the docker entrypoint
   
   ## Steps to Reproduce (for bugs)
   
   stack.yml
   
   ```yml
   services:
     couch1:
       image: couchdb:3.1
       configs:
         - source: admins
           target: /opt/couchdb/etc/local.d/10-admins.ini
   configs:
     admins:
       file: ./admins.ini
   ```
   
   admins.ini
   
   ```ini
   [admins]
   admin = -pbkdf2-2006b7b27f5f3624c54e37f5126f3db2bd515a0f,ac2121044edb47438573c80764ba7dc5,10000
   ```
   
   ## Context
   
   This bug prevents me from launching a cluster of couchdb instances in my docker swarm without setting the password as plaintext in the environment variables.
   
   Workaround can be found here: https://github.com/apache/couchdb-docker/issues/73#issuecomment-766179802
   
   ## Your Environment
   
   Docker 20.10.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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] wohali commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-909929471


   Ensuring files have the right access is an ongoing challenge for CouchDB, because it expects to be able to **write** to the last config file in the chain.
   
   If Docker Swarm can't mount a file in a way that couchdb running inside the container can write to the file, using non-root permissions, this is a WONTFIX.
   
   Am I misunderstanding the issue?


-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] wohali commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-909929471






-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] sridharlreddy commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
sridharlreddy commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-1041370627


   Hi @wohali,
   
   I also tried the same to update the configuration by putting a new file in /opt/couchdb/etc/local.d/ through configmap from k8s. Container was crashing without any error message at all and could not figure what is the reason for container to fail. 
   I checked the helm chart on how it is handled there, it copies the file to target path via init container and that works.
   
   From your [comment](https://github.com/apache/couchdb-docker/issues/204#issuecomment-909929471) only last file loaded in config has to be writable by non-root. Is the last file decided based on alphabetical order? In that case mounting a file less ```10-xxxx``` will solve the issue?
   
   Can we add some errors to indicate the reason in this case?


-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] wohali commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-909932844


   The docker container is mature at this point, and used in many environments other than Swarm, so changing the functionality that dramatically is a non-starter.
   
   The whole point of the file being external (in our recommended approach, where you externalize the entire `etc/local.d` directory) is so that it is persisted after the container exits, too. This is important in non-Swarm scenarios. Copying it in loses that advantage.


-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] sridharlreddy edited a comment on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
sridharlreddy edited a comment on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-1041370627


   Hi @wohali,
   
   I also tried the same to update the configuration by putting a new file in /opt/couchdb/etc/local.d/ through configmap from k8s. Container was crashing without any error message at all and could not figure what is the reason for container to fail. 
   I checked the helm chart on how it is handled there, it copies the file to target path via init container and that works.
   
   From your [comment](https://github.com/apache/couchdb-docker/issues/204#issuecomment-909929471) only last file loaded in config has to be writable by non-root. Is the last file decided based on alphabetical order? In that case mounting a file less than the name ```10-xxxx``` will solve the issue?
   
   Can we add some errors to indicate the reason in this case?


-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] jnordberg commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
jnordberg commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-909931481


   How about if the docker entrypoint script copies the config files given in e.g. `/opt/couchdb/etc/copy.d/*` to `/opt/couchdb/etc/local.d/`? That would allow swarm users to provide config files without workarounds


-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] jnordberg commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
jnordberg commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-909931481






-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] wohali commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
wohali commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-909971680


   We'll take it under consideration, but I would not expect a change soon.


-- 
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: notifications-unsubscribe@couchdb.apache.org

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



[GitHub] [couchdb-docker] jnordberg commented on issue #204: Container exits with no log messages if configuration file is provided

Posted by GitBox <gi...@apache.org>.
jnordberg commented on issue #204:
URL: https://github.com/apache/couchdb-docker/issues/204#issuecomment-909935928


   Adding what I suggested won't change functionality for anyone not explicitly mounting config files into `etc/copy.d`.


-- 
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: notifications-unsubscribe@couchdb.apache.org

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