Bug 1443866
Summary: | dstat --gpfs fails with various errors | |||
---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Renaud Métrich <rmetrich> | |
Component: | dstat | Assignee: | David Kaspar // Dee'Kej <deekej> | |
Status: | CLOSED CURRENTRELEASE | QA Contact: | qe-baseos-daemons | |
Severity: | high | Docs Contact: | ||
Priority: | high | |||
Version: | 6.9 | CC: | cisley, cww, fkrska, igkioka, kdudka, psklenar, rmetrich, toneata | |
Target Milestone: | rc | Keywords: | Patch, Reopened, ZStream | |
Target Release: | --- | |||
Hardware: | Unspecified | |||
OS: | Linux | |||
Whiteboard: | ||||
Fixed In Version: | dstat-0.7.0-4.el6 | Doc Type: | Bug Fix | |
Doc Text: |
Previously, the dstat utility displayed no data when the dstat --gpfs option was used. The bug has been fixed and dstat now displays data correctly when used with General Parallel File System (GPFS).
|
Story Points: | --- | |
Clone Of: | ||||
: | 1482440 1486551 (view as bug list) | Environment: | ||
Last Closed: | 2018-06-21 08:44:22 UTC | Type: | Bug | |
Regression: | --- | Mount Type: | --- | |
Documentation: | --- | CRM: | ||
Verified Versions: | Category: | --- | ||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
Cloudforms Team: | --- | Target Upstream Version: | ||
Embargoed: | ||||
Bug Depends On: | ||||
Bug Blocks: | 1482440, 1486551 |
Description
Renaud Métrich
2017-04-20 07:26:57 UTC
(In reply to Renaud Métrich from comment #0) > Once patching the tool (see below in additional infos), the tool still > fails, but later: > > # dstat --gpfs > Module dstat_gpfs failed to load. (global name 'select' is not defined) This is caused by 'import select' being local to dpopen(). The above error can be fixed by putting 'import select' to the global scope. I am not saying that it will make --gpfs work properly though... In any case, we should include this fix into the eventual testing build, too. So, this is the result of BZ #989779 actually *NOT* being fixed in the RHEL-6.9 release. As Kamil already said, the fix there is not correct. Thanks to Kamil we have found a reproducer that we can use for this: $ mkdir -p /usr/lpp/mmfs/bin/ $ cat > /usr/lpp/mmfs/bin/mmpmon <<_EOF #!/bin/sh echo "test-run" _EOF $ chmod +x /usr/lpp/mmfs/bin/mmpmon $ dstat --gpfs If we run this on RHEL-6.9, with dstat-0.7.0-3.el6.noarch package, we will see the error: >> Module dstat_gpfs failed to load. ([Errno 2] No such file or directory) Then we patch the dstat with fix provided by Renaud: # diff -u /usr/bin/dstat.orig /usr/bin/dstat --- /usr/bin/dstat.orig 2017-04-18 16:44:21.249000018 +0200 +++ /usr/bin/dstat 2017-04-18 16:44:47.605998366 +0200 @@ -1693,10 +1693,10 @@ def dpopen(cmd): "Open a pipe for reuse, if already opened, return pipes" global pipes - import select, subprocess + import select, subprocess, shlex if 'pipes' not in globals().keys(): pipes = {} if cmd not in pipes.keys(): - p = subprocess.Popen(cmd, bufsize=0, + p = subprocess.Popen(shlex.split(cmd), bufsize=0, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, After that we will see the second error mentioned in comment #0: >> Module dstat_gpfs failed to load. (global name 'select' is not defined) By moving the 'import select' on the global level, we will be able to run the 'dstat --gpfs' without it raising any error. |