[GitHub] wohali commented on issue #1602: Remove runtime configurability of core system components
wohali commented on issue #1602: Remove runtime configurability of core system components URL: https://github.com/apache/couchdb/pull/1602#issuecomment-421404856 So far, the `couchdb.cmd` file looks good, but I haven't run a full test yet. Waiting until the test suite is cleaned up. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] wohali commented on issue #106: Inconsistency for required clustersettings. NODENAME and erlang cookie
wohali commented on issue #106: Inconsistency for required clustersettings. NODENAME and erlang cookie URL: https://github.com/apache/couchdb-docker/issues/106#issuecomment-421382807 @ufobat By all means! Please mark it as "Closes #106" if you please. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] janl commented on issue #1602: Remove runtime configurability of core system components
janl commented on issue #1602: Remove runtime configurability of core system components URL: https://github.com/apache/couchdb/pull/1602#issuecomment-421339669 I’m working through the test fails, but this is worth reviewing already. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] nono opened a new issue #1603: Bad total_rows for /{db}/_design_docs
nono opened a new issue #1603: Bad total_rows for /{db}/_design_docs URL: https://github.com/apache/couchdb/issues/1603 ## Expected Behavior http://docs.couchdb.org/en/stable/api/database/bulk-api.html#db-design-docs says that the response for `GET /{db}/_design_docs` is a JSON object with: - **total_rows** (number) – Number of design documents in the database. Note that this is not the number of rows returned in the actual query. - and some other fields ## Current Behavior The `total_rows` is the number of documents in the database, not restricted to design documents. ## Steps to Reproduce (for bugs) Here is an example: ```sh $ curl -q 'http://localhost:5984/cozy35ba44d2d1749e6f21646edce51e7190%2Fio-cozy-files/_all_docs' {"total_rows":34,"offset":0,"rows":[ {"id":"010fd12eacb0f5d72b9a1c0d38015e3b","key":"010fd12eacb0f5d72b9a1c0d38015e3b","value":{"rev":"1-0a71f9fe3dcbd6e43bf2b290215b5864"}}, {"id":"010fd12eacb0f5d72b9a1c0d38016b23","key":"010fd12eacb0f5d72b9a1c0d38016b23","value":{"rev":"2-9a5851637d1a8cced1aec22b0e989272"}}, {"id":"010fd12eacb0f5d72b9a1c0d38018b94","key":"010fd12eacb0f5d72b9a1c0d38018b94","value":{"rev":"2-aeb093ae479719486307fe9477624dff"}}, {"id":"010fd12eacb0f5d72b9a1c0d3801a18f","key":"010fd12eacb0f5d72b9a1c0d3801a18f","value":{"rev":"2-b3956998775125ffa9f583c2ee5ff682"}}, {"id":"498b33c1b8fca8ba30b817980800b852","key":"498b33c1b8fca8ba30b817980800b852","value":{"rev":"1-f46df288c2f8b4b476adee32d0d3"}}, {"id":"498b33c1b8fca8ba30b817980800bf61","key":"498b33c1b8fca8ba30b817980800bf61","value":{"rev":"2-c68ed5ee485b3c9b5558eb85b68cdcec"}}, {"id":"498b33c1b8fca8ba30b817980800e139","key":"498b33c1b8fca8ba30b817980800e139","value":{"rev":"2-5d3404520d0ed9c718ef09b55fe3642e"}}, {"id":"498b33c1b8fca8ba30b817980800f294","key":"498b33c1b8fca8ba30b817980800f294","value":{"rev":"2-127effdc723b36fae42f9a2c776180ff"}}, {"id":"4afc12c8362680bfb65db569b9003e7f","key":"4afc12c8362680bfb65db569b9003e7f","value":{"rev":"2-4e01b06becf7119549df048876f7c833"}}, {"id":"4afc12c8362680bfb65db569b9004b9b","key":"4afc12c8362680bfb65db569b9004b9b","value":{"rev":"2-9172d7814a4a71fa622c9557cec84f19"}}, {"id":"4afc12c8362680bfb65db569b90389fd","key":"4afc12c8362680bfb65db569b90389fd","value":{"rev":"2-47b806df0d6c653df85d40ae83f966fb"}}, {"id":"4afc12c8362680bfb65db569b9039844","key":"4afc12c8362680bfb65db569b9039844","value":{"rev":"2-7199e4a7e4c95b066177a52058514045"}}, {"id":"4afc12c8362680bfb65db569b90445ee","key":"4afc12c8362680bfb65db569b90445ee","value":{"rev":"2-571a0058203e85599a1872aa70e4801e"}}, {"id":"4afc12c8362680bfb65db569b904a78e","key":"4afc12c8362680bfb65db569b904a78e","value":{"rev":"2-8b88fdeba760c225e190ed0a27559866"}}, {"id":"4afc12c8362680bfb65db569b9050b45","key":"4afc12c8362680bfb65db569b9050b45","value":{"rev":"2-f1c7c09df31dfbc1ab5015ead01f7ecb"}}, {"id":"4afc12c8362680bfb65db569b905a4da","key":"4afc12c8362680bfb65db569b905a4da","value":{"rev":"2-70e166cb7930b413ed346cd4aaaf3975"}}, {"id":"4afc12c8362680bfb65db569b906f2af","key":"4afc12c8362680bfb65db569b906f2af","value":{"rev":"2-f6107f7425f4810fd644fde5584f2907"}}, {"id":"4afc12c8362680bfb65db569b9073752","key":"4afc12c8362680bfb65db569b9073752","value":{"rev":"2-0bed715806c13119c256f67dcfa430f5"}}, {"id":"4afc12c8362680bfb65db569b907c6f5","key":"4afc12c8362680bfb65db569b907c6f5","value":{"rev":"2-24d8f302ae19a4b5f5b4b04538706941"}}, {"id":"4afc12c8362680bfb65db569b9098d9d","key":"4afc12c8362680bfb65db569b9098d9d","value":{"rev":"2-c2ab60862ba386b18b62f6d989118efb"}}, {"id":"9fa32b4c97f1fd69079b1c40f500106c","key":"9fa32b4c97f1fd69079b1c40f500106c","value":{"rev":"1-61fb1ecd150301495df38f84c4cbd222"}}, {"id":"9fa32b4c97f1fd69079b1c40f500203a","key":"9fa32b4c97f1fd69079b1c40f500203a","value":{"rev":"1-67570fbc92a0c489218e3b4eb45cad09"}}, {"id":"9fa32b4c97f1fd69079b1c40f5002273","key":"9fa32b4c97f1fd69079b1c40f5002273","value":{"rev":"1-a000e62c45d610da6eb366da575029e4"}}, {"id":"9fa32b4c97f1fd69079b1c40f5002b7c","key":"9fa32b4c97f1fd69079b1c40f5002b7c","value":{"rev":"1-fef5d055364fad7d188b80505c30ab26"}}, {"id":"_design/by-parent-type-name","key":"_design/by-parent-type-name","value":{"rev":"1-9ad74947b52a0c6e220c09807ea43fe6"}}, {"id":"_design/dir-by-path","key":"_design/dir-by-path","value":{"rev":"1-b45592638e0ca397ccb82cb9f0303c36"}}, {"id":"_design/dir-children","key":"_design/dir-children","value":{"rev":"1-031e47856210360b44db86669ee83cd1"}}, {"id":"_design/disk-usage","key":"_design/disk-usage","value":{"rev":"1-b598119ae3a61c73c62c8e7571a21f07"}}, {"id":"_design/referenced-by","key":"_design/referenced-by","value":{"rev":"1-1b96707c7208821e56dd39e1d4e90f11"}}, {"id":"_design/referenced-by-sorted-by-datetime","key":"_design/referenced-by-sorted-by-datetime","value":{"rev":"1-bf2dc1d3a977b26729f40bbe31241dcb"}},
[GitHub] janl commented on issue #1602: Remove runtime configurability of core system components
janl commented on issue #1602: Remove runtime configurability of core system components URL: https://github.com/apache/couchdb/pull/1602#issuecomment-421311043 Depends on: https://github.com/apache/couchdb/pull/1602 Docs PR: https://github.com/apache/couchdb-documentation/pull/328 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] janl opened a new pull request #328: feat: update docs for new query server config
janl opened a new pull request #328: feat: update docs for new query server config URL: https://github.com/apache/couchdb-documentation/pull/328 See https://github.com/apache/couchdb/pull/1602 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] couchdb-config pull request #20: fix tests for #1602
GitHub user janl opened a pull request: https://github.com/apache/couchdb-config/pull/20 fix tests for #1602 Needed by https://github.com/apache/couchdb/pull/1602 You can merge this pull request into a Git repository by running: $ git pull https://github.com/apache/couchdb-config fix/conf Alternatively you can review and apply these changes as the patch at: https://github.com/apache/couchdb-config/pull/20.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #20 commit b9cb81e78f60d3f40ce0f162082908268af4071b Author: Jan Lehnardt Date: 2018-09-14T10:09:48Z fix tests for #1602 ---
[GitHub] janl opened a new pull request #1602: Remove runtime configurability of core system components
janl opened a new pull request #1602: Remove runtime configurability of core system components URL: https://github.com/apache/couchdb/pull/1602 ## Overview In the 1.x era of CouchDB, many parts of the core systems were managed via the config system. This is mostly due to in the early days, no good standard patterns for what Erlang apps looked like were obvious. This has changed now. In addition, being able to change core parts of the database, including what code modules to load when and where, and which OS binaries to run when and where, opened us up to [a]( http://docs.couchdb.org/en/stable/cve/2017-12635.html) [set]( http://docs.couchdb.org/en/stable/cve/2017-12636.html) of [security]( http://docs.couchdb.org/en/stable/cve/2018-11769.html) [vulnerabilities]( http://docs.couchdb.org/en/stable/cve/2018-8007.html), that we want to close once and for all with this PR by no longer allowing runtime configuration of core system parts. Specifically: - `daemons` - `[httpd] default_handler` -`httpd_global_handlers` -`httpd_db_handlers` -`httpd_design_handlers` - `vhost_global_handlers` - `redirect_vhost_handler` - `os_daemons` - `query_servers` - `native_query_servers` This patch retains the ability to configure an existing CouchDB installation to, say, add a third party query server, but it’ll require console access to the server and restarting CouchDB from said console. * * * ## Details CouchDB ships with two default query_servers (javascript and coffeescript) as well as one default native_query_server (query aka mango). These used to be configured in default.ini in these sections: ``` [query_servers] javascript = {{prefix}}/bin/couchjs {{prefix}}/share/server/main.js coffeescript = {{prefix}}/bin/couchjs {{prefix}}/share/server/main-coffee.js ; enable mango query engine [native_query_servers] query = {mango_native_proc, start_link, []} ; erlang query server ; erlang = {couch_native_process, start_link, []} ``` This allowed end-users post-install and even runtime-changes to which query servers are enabled and where their binaries live. This patch changes things, so only a post-install, but not at-runtime changes are possible from now on. This still allows people to configure their CouchDB to run a third- party query server like the somewhat popular Python query server, but it changes the way the setup is done. Query Servers The javascript and coffeescript query servers continue to be enabled by default. Setup differences have been moved from default.ini to the couchdb and couchdb.cmd start scripts respectively. Additional query servers can now be configured using environment variables: ``` export COUCHDB_QUERY_SERVER_PYTHON="/path/to/python/query/server.py with args" couchdb ``` Where the last segment in the environment variable matches the usual lowercase(!) query language in the design doc `language` field. Multiple query servers can be configured by using more environment variables. Native Query Servers The mango query server continues to be enabled by default. The erlang query server continues to be disabled by default. This patch adds a `[native_query_servers] enable_erlang_query_server = BOOL` setting (defaults to `"false"`) to enable the erlang query server. If the legacy configuration for enabling the query server is detected, that is counted as a `true` setting as well, so existing configurations continue to work just fine. Windows Since the setting of the `./configure` time `PREFIX` happens during `make release`, I had to adapt the `couchdb` and `couchdb.cmd` scripts to have the correct env vars set and the `PREFIX` replaced there. I did this to the best of my abilities and research, but this needs review from the Windows team (Hi Joan! :). OS Daemons Although deprecated in 2.2.0, we’re keeping support for this until 3.x, but the configuration changes analogous to query servers. Previously, configuration looked like this: ``` [os_daemons] name = /path/to/daemon with args ``` With this patch, setup looks like this: ``` COUCHDB_OS_DAEMON_NAME="/path/to/daemon with args" couchdb ``` Multiple OS Daemons can be started with multiple env vars. The final segment in the env var becomes the daemon identifier inside CouchDB as lowercase(!). ## Testing recommendations `make check` as well as following the instructions above for configuring third party query servers and/or `os_daemons` as well as enabling the erlang query server. ## Checklist - [x] Code is written and works correctly; - [x] Changes are covered by tests; - [x] Documentation reflects the changes;
[GitHub] ufobat commented on issue #106: Inconsistency for required clustersettings. NODENAME and erlang cookie
ufobat commented on issue #106: Inconsistency for required clustersettings. NODENAME and erlang cookie URL: https://github.com/apache/couchdb-docker/issues/106#issuecomment-421243981 Thank you. I can confirm that adding the erlang cookie setting to `ERL_FLAGS` worked as expected. I would like to make a RP against the `README.md` to make a cluster setup with the docker image easier to newbies like me. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services