You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by jaydoane <gi...@git.apache.org> on 2015/11/06 02:48:24 UTC

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

GitHub user jaydoane opened a pull request:

    https://github.com/apache/couchdb/pull/365

    Change the eunit template cluster_port to 0

    so it will listen on a random, unused port during testing
    
    This makes is possible to "make eunit" when a dev cluster is running on the same machine without a port collision
    
    COUCHDB-2871

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jaydoane/couchdb 2871-eunit-cluster-port

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/365.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 #365
    
----
commit 4a305a0d6e1bcce02c851d9d2fa9d311fac76173
Author: Jay Doane <ja...@gmail.com>
Date:   2015-11-06T01:46:59Z

    Change the eunit template cluster_port to 0 so it will listen on random, unused port during testing
    
    This makes is possible to "make eunit" when a dev cluster is running on the same machine without a port collision
    
    COUCHDB-2871

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/365#discussion_r44098387
  
    --- Diff: setup_eunit.template ---
    @@ -1,6 +1,6 @@
     {variables, [
         {package_author_name, "The Apache Software Foundation"},
    -    {cluster_port, 5984},
    +    {cluster_port, 0},
    --- End diff --
    
    Those config tests needs to be fixed - that's  simple. Otherwise you make half-fixed problem here: eunit tests still may fail because some other app may use 5986 port eventually. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

Posted by jaydoane <gi...@git.apache.org>.
Github user jaydoane commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/365#discussion_r44097813
  
    --- Diff: setup_eunit.template ---
    @@ -1,6 +1,6 @@
     {variables, [
         {package_author_name, "The Apache Software Foundation"},
    -    {cluster_port, 5984},
    +    {cluster_port, 0},
    --- End diff --
    
    As mentioned before, the backend port can't change unless some config_tests are fixed, which may be currently beyond the scope I'm trying to achieve. Also, since the dev cluster remaps the individual backend ports to e.g.
    {{"httpd","port"},"15986"}
    and they are not load balanced, it's ok to just change the cluster port, (which otherwise would collide with haproxy's listen port).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on a diff in the pull request:

    https://github.com/apache/couchdb/pull/365#discussion_r44096401
  
    --- Diff: setup_eunit.template ---
    @@ -1,6 +1,6 @@
     {variables, [
         {package_author_name, "The Apache Software Foundation"},
    -    {cluster_port, 5984},
    +    {cluster_port, 0},
    --- End diff --
    
    Why you didn't change backend port as well? If you have port assign conflict, you solved it for chttpd, but your httpd service will crash causing further issues with his interaction.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/365#issuecomment-154261877
  
    I'm a bit confused by this need, because this means that we have to places to define chttpd/httpd bind port and one of them may not work as expected. In case of eunit tests it's the INI config one.
    
    I think we should drop these ports in template at all and use only those that defined in INI file to not generate any confusion about. If this will break some things - they have to be fixed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

Posted by kxepal <gi...@git.apache.org>.
Github user kxepal commented on the pull request:

    https://github.com/apache/couchdb/pull/365#issuecomment-154270698
  
    I did some investigation into this.
    These cluster_port/backend_port are used to generate default.ini config file. Not sure why they are not there from the start, but that's separate topic.
    
    For eunit tests we (must) have the following  config chain: default.ini, eunit.ini, local.ini. The eunit.ini overrides default.ini ports with 0 ones making them random. 
    
    So your problem is not here, but in some test that not uses these random ports, but tries to work with 5984. You need to find that and fix. This patch fixes that in wrong way.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

Posted by jaydoane <gi...@git.apache.org>.
Github user jaydoane closed the pull request at:

    https://github.com/apache/couchdb/pull/365


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb pull request: Change the eunit template cluster_port to 0

Posted by jaydoane <gi...@git.apache.org>.
Github user jaydoane commented on the pull request:

    https://github.com/apache/couchdb/pull/365#issuecomment-154329406
  
    Much to my embarrassment, this turns out to be a non-issue for couchdb. It's only an issue for running the unit tests downstream under cloudant. Mea culpa.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---