You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@zookeeper.apache.org by "cbueche (via GitHub)" <gi...@apache.org> on 2023/02/13 15:47:56 UTC
[GitHub] [zookeeper] cbueche opened a new pull request, #1984: support for Python 3 in check_zookeeper.py
cbueche opened a new pull request, #1984:
URL: https://github.com/apache/zookeeper/pull/1984
In recent Zookeeper versions, the `mntr` command sends a large amount of data. Zookeeper 3.4.14 answered with about 500 bytes. Zookeeper 3.7.1 answers with 22 Kb. The old `check_zookeeper.py` script stopped receiving after 2'048 byte. I adapted the script to accept everything returned by the command and to support Python 3.x.
--
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@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zookeeper] cbueche commented on a diff in pull request #1984: support for Python 3 in check_zookeeper.py
Posted by "cbueche (via GitHub)" <gi...@apache.org>.
cbueche commented on code in PR #1984:
URL: https://github.com/apache/zookeeper/pull/1984#discussion_r1130903413
##########
zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py:
##########
@@ -261,62 +256,21 @@ def _parse_stat(self, data):
result['zk_znode_count'] = int(m.group(1))
continue
- m = re.match('Watch count: (\d+)', line)
Review Comment:
I can't. Probably an error when doing the other changes, I can't explain why I didn't see the "massive" deletion. If you want me to redo a PR, let me know, and against which commit id.
--
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@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zookeeper] tisonkun commented on a diff in pull request #1984: support for Python 3 in check_zookeeper.py
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #1984:
URL: https://github.com/apache/zookeeper/pull/1984#discussion_r1128826503
##########
zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py:
##########
@@ -261,62 +256,21 @@ def _parse_stat(self, data):
result['zk_znode_count'] = int(m.group(1))
continue
- m = re.match('Watch count: (\d+)', line)
Review Comment:
I can approve the part of
* used 2to3 to make it work with Python 3.x
* loop to get all data in _send_cmd()
However, in the edge master branch, these matches are still [there](https://github.com/apache/zookeeper/blob/14b936201b719ab5cf6346d1ed7dfc4ff382cbb7/zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py#L226-L303). So could you explain why you remove these lines?
--
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@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zookeeper] cbueche commented on a diff in pull request #1984: support for Python 3 in check_zookeeper.py
Posted by "cbueche (via GitHub)" <gi...@apache.org>.
cbueche commented on code in PR #1984:
URL: https://github.com/apache/zookeeper/pull/1984#discussion_r1126550639
##########
zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py:
##########
@@ -261,62 +256,21 @@ def _parse_stat(self, data):
result['zk_znode_count'] = int(m.group(1))
continue
- m = re.match('Watch count: (\d+)', line)
Review Comment:
My patch was against `master` and this code wasn't present in that branch.
--
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@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zookeeper] sonatype-lift[bot] commented on a diff in pull request #1984: support for Python 3 in check_zookeeper.py
Posted by "sonatype-lift[bot] (via GitHub)" <gi...@apache.org>.
sonatype-lift[bot] commented on code in PR #1984:
URL: https://github.com/apache/zookeeper/pull/1984#discussion_r1104687129
##########
zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py:
##########
@@ -29,7 +29,7 @@
import re
import subprocess
Review Comment:
<picture><img alt="7% of developers fix this issue" src="https://lift.sonatype.com/api/commentimage/fixrate/7/display.svg"></picture>
<b>*blacklist:</b>* Consider possible security implications associated with the subprocess module.
---
<details><summary>âšī¸ Expand to see all <b>@sonatype-lift</b> commands</summary>
You can reply with the following commands. For example, reply with ***@sonatype-lift ignoreall*** to leave out all findings.
| **Command** | **Usage** |
| ------------- | ------------- |
| `@sonatype-lift ignore` | Leave out the above finding from this PR |
| `@sonatype-lift ignoreall` | Leave out all the existing findings from this PR |
| `@sonatype-lift exclude <file\|issue\|path\|tool>` | Exclude specified `file\|issue\|path\|tool` from Lift findings by updating your config.toml file |
**Note:** When talking to LiftBot, you need to **refresh** the page to see its response.
<sub>[Click here](https://github.com/apps/sonatype-lift/installations/new) to add LiftBot to another repo.</sub></details>
---
<b>Help us improve LIFT! (<i>Sonatype LiftBot external survey</i>)</b>
Was this a good recommendation for you? <sub><small>Answering this survey will not impact your Lift settings.</small></sub>
[â[đ Not relevant](https://www.sonatype.com/lift-comment-rating?comment=388860332&lift_comment_rating=1)â] - [â[đ Won't fix](https://www.sonatype.com/lift-comment-rating?comment=388860332&lift_comment_rating=2)â] - [â[đ Not critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=388860332&lift_comment_rating=3)â] - [â[đ Critical, will fix](https://www.sonatype.com/lift-comment-rating?comment=388860332&lift_comment_rating=4)â] - [â[đ Critical, fixing now](https://www.sonatype.com/lift-comment-rating?comment=388860332&lift_comment_rating=5)â]
--
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@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zookeeper] tisonkun commented on a diff in pull request #1984: support for Python 3 in check_zookeeper.py
Posted by "tisonkun (via GitHub)" <gi...@apache.org>.
tisonkun commented on code in PR #1984:
URL: https://github.com/apache/zookeeper/pull/1984#discussion_r1126516455
##########
zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py:
##########
@@ -261,62 +256,21 @@ def _parse_stat(self, data):
result['zk_znode_count'] = int(m.group(1))
continue
- m = re.match('Watch count: (\d+)', line)
Review Comment:
@cbueche can you elaborate a bit on why do you remove these lines?
--
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@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [zookeeper] cbueche commented on a diff in pull request #1984: support for Python 3 in check_zookeeper.py
Posted by "cbueche (via GitHub)" <gi...@apache.org>.
cbueche commented on code in PR #1984:
URL: https://github.com/apache/zookeeper/pull/1984#discussion_r1126554104
##########
zookeeper-contrib/zookeeper-contrib-monitoring/check_zookeeper.py:
##########
@@ -261,62 +256,21 @@ def _parse_stat(self, data):
result['zk_znode_count'] = int(m.group(1))
continue
- m = re.match('Watch count: (\d+)', line)
Review Comment:
so apologies I should have checked this. Basically there are two changes in my PR:
- used 2to3 to make it work with Python 3.x
- loop to get all data in _send_cmd()
--
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@zookeeper.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org