You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@zookeeper.apache.org by "Tom White (JIRA)" <ji...@apache.org> on 2009/02/06 13:41:59 UTC

[jira] Created: (ZOOKEEPER-302) Quote values in JMX ObjectNames

Quote values in JMX ObjectNames 
--------------------------------

                 Key: ZOOKEEPER-302
                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
             Project: Zookeeper
          Issue Type: Bug
    Affects Versions: 3.1.0
            Reporter: Tom White
         Attachments: zookeeper-302.patch

Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.

This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Tom White commented on ZOOKEEPER-302:
-------------------------------------

+1

The patch works for me.

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Patrick Hunt updated ZOOKEEPER-302:
-----------------------------------

    Attachment: ZOOKEEPER-302.patch

modified tom's patch a bit:

1) only quote if the addr is an ipv6 addr
2) I don't think getclientport needs to be quoted (ie values) -- otw thinks like the time/date stamp would also fail (removed this from my patch)
3) removed the printstacktrace calls in mbeanregistry - replaced with proper error handling/logging.


> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Mahadev konar updated ZOOKEEPER-302:
------------------------------------

      Resolution: Fixed
    Hadoop Flags: [Reviewed]
          Status: Resolved  (was: Patch Available)

I just committed this. Thanks tom and pat.

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>            Assignee: Patrick Hunt
>             Fix For: 3.1.0
>
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Tom White updated ZOOKEEPER-302:
--------------------------------

    Status: Patch Available  (was: Open)

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Patrick Hunt commented on ZOOKEEPER-302:
----------------------------------------

oops - the latest patch is ZOOKEEPER-302.patch (all caps version) be sure to review that one not the orig (all lower)


> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Patrick Hunt commented on ZOOKEEPER-302:
----------------------------------------

thanks stu - just good to hear I didn't break anything. ;-)


> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Stu Hood commented on ZOOKEEPER-302:
------------------------------------

The patch looks alright to me.

It passes our unit tests, but we start the server programmatically and we don't use JMX, so I don't know how much my vote counts.

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Mahadev konar commented on ZOOKEEPER-302:
-----------------------------------------

+1  for the patch .... passes the tests... 

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Tom White updated ZOOKEEPER-302:
--------------------------------

    Attachment: zookeeper-302.patch

Patch to quote relevant ObjectName values.

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Patrick Hunt commented on ZOOKEEPER-302:
----------------------------------------

the extra log/rethrow is just there because sun messed up on malformedobjectnameexceptin - they don't include the name that was malformed, which makes debugging hard.

So -- I log then rethrow, the calling code will actually log the exception and then handle in some way - this log is just for context when reviewing the log.

I could have wrapped the exception with another, but I didn't want to do that for this patch... I think we really need to take a hard look at this mbeanregistry stuff anyway, it will probably go away in the end...


> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Benjamin Reed commented on ZOOKEEPER-302:
-----------------------------------------

+1 looks good. i have one small suggestion: in the early part of the patch you log some problem when you catch an exception, would it be good to log the exception?

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Patrick Hunt updated ZOOKEEPER-302:
-----------------------------------

    Fix Version/s: 3.1.0
         Assignee: Patrick Hunt

> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>            Assignee: Patrick Hunt
>             Fix For: 3.1.0
>
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ZOOKEEPER-302) Quote values in JMX ObjectNames

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

Hudson commented on ZOOKEEPER-302:
----------------------------------

Integrated in ZooKeeper-trunk #222 (See [http://hudson.zones.apache.org/hudson/job/ZooKeeper-trunk/222/])
    . Quote values in JMX objectnames. (tom and pat via mahadev)


> Quote values in JMX ObjectNames 
> --------------------------------
>
>                 Key: ZOOKEEPER-302
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-302
>             Project: Zookeeper
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Tom White
>            Assignee: Patrick Hunt
>             Fix For: 3.1.0
>
>         Attachments: ZOOKEEPER-302.patch, zookeeper-302.patch
>
>
> Some characters are not allowed in ObjectName values and need quoting, see http://java.sun.com/javase/6/docs/api/javax/management/ObjectName.html.
> This came up with IPv6 addresses which contain a colon character.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.