You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Andrew Ferguson (JIRA)" <ji...@apache.org> on 2012/08/23 19:53:42 UTC

[jira] [Created] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Andrew Ferguson created ZOOKEEPER-1540:
------------------------------------------

             Summary: ZOOKEEPER-1411 breaks backwards compatibility
                 Key: ZOOKEEPER-1540
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
             Project: ZooKeeper
          Issue Type: Bug
            Reporter: Andrew Ferguson


There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.

One line fix to follow shortly.

thanks!
Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Andrew Ferguson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Ferguson updated ZOOKEEPER-1540:
---------------------------------------

    Attachment: ZOOKEEPER-1540.patch

hi Alexander,

thanks for the test case! I've included it in this updated patch.

Andrew
                
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Andrew Ferguson
>         Attachments: ZOOKEEPER-1540.patch, ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Benjamin Reed (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13444096#comment-13444096 ] 

Benjamin Reed commented on ZOOKEEPER-1540:
------------------------------------------

+1 looks good. i'll commit if there aren't any objections
                
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Andrew Ferguson
>         Attachments: ZOOKEEPER-1540.patch, ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440535#comment-13440535 ] 

Hadoop QA commented on ZOOKEEPER-1540:
--------------------------------------

-1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12542163/ZOOKEEPER-1540.patch
  against trunk revision 1373156.

    +1 @author.  The patch does not contain any @author tags.

    -1 tests included.  The patch doesn't appear to include any new or modified tests.
                        Please justify why no new tests are needed for this patch.
                        Also please list what manual steps were performed to verify this patch.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1168//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1168//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1168//console

This message is automatically generated.
                
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Andrew Ferguson
>         Attachments: ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-1540:
-------------------------------------

    Fix Version/s: 3.5.0
    
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>            Reporter: Andrew Ferguson
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1540.patch, ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Alexander Shraer (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440612#comment-13440612 ] 

Alexander Shraer commented on ZOOKEEPER-1540:
---------------------------------------------

thanks for catching this, Andrew. The fix looks good to me. There is a test added in 1411 that was supposed to make sure that 1411 doesn't break backward compatibility 

src/java/test/org/apache/zookeeper/server/util/DynamicConfigBCTest.java

I suggest that after config.parse(confFile.toString()) in this file we add
            
            Assert.assertTrue(config.getClientPortAddress() != null 
            		&& config.getClientPortAddress().getPort() == CLIENT_PORT_QP1);

this fails without your fix and passes with it.

A related potential backward compatibility issue in 1411 is what to do when the user has an old-style config file like you describe and then a reconfiguration happens. In that case I create a dynamic config file automatically and will remove all relevant definitions from the cfg file (server, group, weight, clientPort and clientAddress). I'm not sure what's the right thing to do, but perhaps we shouldn't remove the clientPort and clientAddress from the cfg just in case they're not specified in the new format. This is also in QuorumPeerConfig.
                
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Andrew Ferguson
>         Attachments: ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Hadoop QA (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13440694#comment-13440694 ] 

Hadoop QA commented on ZOOKEEPER-1540:
--------------------------------------

+1 overall.  Here are the results of testing the latest attachment 
  http://issues.apache.org/jira/secure/attachment/12542187/ZOOKEEPER-1540.patch
  against trunk revision 1373156.

    +1 @author.  The patch does not contain any @author tags.

    +1 tests included.  The patch appears to include 3 new or modified tests.

    +1 javadoc.  The javadoc tool did not generate any warning messages.

    +1 javac.  The applied patch does not increase the total number of javac compiler warnings.

    +1 findbugs.  The patch does not introduce any new Findbugs (version 1.3.9) warnings.

    +1 release audit.  The applied patch does not increase the total number of release audit warnings.

    +1 core tests.  The patch passed core unit tests.

    +1 contrib tests.  The patch passed contrib unit tests.

Test results: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1169//testReport/
Findbugs warnings: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1169//artifact/trunk/build/test/findbugs/newPatchFindbugsWarnings.html
Console output: https://builds.apache.org/job/PreCommit-ZOOKEEPER-Build/1169//console

This message is automatically generated.
                
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Andrew Ferguson
>         Attachments: ZOOKEEPER-1540.patch, ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Andrew Ferguson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrew Ferguson updated ZOOKEEPER-1540:
---------------------------------------

    Attachment: ZOOKEEPER-1540.patch

this bug occurs if you have a separate configuration file for each ZooKeeper server (as in previous releases) and have clientPort specified as part of the file, rather than as part of the "server.N=host:port:port:type;host:port" format introduced by ZOOKEEPER-1411 (I hope I'm reading that patch correctly).

not sure how to write a test case for this -- if one's needed, perhaps someone can suggest how? thank you.
                
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>            Reporter: Andrew Ferguson
>         Attachments: ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Mahadev konar (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mahadev konar updated ZOOKEEPER-1540:
-------------------------------------

    Affects Version/s: 3.5.0
    
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>            Reporter: Andrew Ferguson
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1540.patch, ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

[jira] [Commented] (ZOOKEEPER-1540) ZOOKEEPER-1411 breaks backwards compatibility

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ZOOKEEPER-1540?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13462647#comment-13462647 ] 

Hudson commented on ZOOKEEPER-1540:
-----------------------------------

Integrated in ZooKeeper-trunk #1690 (See [https://builds.apache.org/job/ZooKeeper-trunk/1690/])
    ZOOKEEPER-1540. ZOOKEEPER-1411 breaks backwards compatibility (Andrew Ferguson via breed) (Revision 1389711)

     Result = SUCCESS
breed : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1389711
Files : 
* /zookeeper/trunk/src/java/main/org/apache/zookeeper/server/quorum/QuorumPeerConfig.java
* /zookeeper/trunk/src/java/test/org/apache/zookeeper/server/util/DynamicConfigBCTest.java

                
> ZOOKEEPER-1411 breaks backwards compatibility
> ---------------------------------------------
>
>                 Key: ZOOKEEPER-1540
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-1540
>             Project: ZooKeeper
>          Issue Type: Bug
>    Affects Versions: 3.5.0
>            Reporter: Andrew Ferguson
>             Fix For: 3.5.0
>
>         Attachments: ZOOKEEPER-1540.patch, ZOOKEEPER-1540.patch
>
>
> There is a one-line bug in ZOOKEEPER-1411 which breaks backwards compatibility for sites which are using separate configuration files for each server. The bug is with the handling of the clientPort option.
> One line fix to follow shortly.
> thanks!
> Andrew

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira