Closed andrew-niaid closed 11 months ago
Looks like Python 3 completely dropped os.popen*()
? Either way it probably should never hit that code, as it does appear subprocess.Popen()
is still valid. Perhaps that import is a typo and that's the problem? If you fix the typo does that solve the issue?
Sounds like either way we need to update the exception catching to error out?
Yes, this appears to work. At least for the mysql, mysql5, and innodb plugins. The other plugins that use the same subprocess call are the gpfs and gpfs-ops plugins. They give an error with python3 (but not with python2).
# python3 /usr/bin/dool --gpfs --gpfs-ops
Module dool_gpfs failed to load. (a bytes-like object is required, not 'str')
Module dool_gpfs_ops failed to load. (a bytes-like object is required, not 'str')
None of the stats you selected are available.
# python2 /usr/bin/dool --gpfs --gpfs-ops
┄┄gpfs┄i/o┄┬┄┄┄┄┄┄┄┄gpfs┄file┄operations┄┄┄┄┄┄┄
read write│ open clos read writ rdir inod
0 0.98B│ 0 0 0 0 0 0
0 256M│ 0 0 0 512 0 0
0 256M│ 0 0 0 511 0 4
0 256M│ 1 1 0 512 0 0
...
This should be fixed now.
On Rocky 9.2 with the default python (3.9.16), dool produces the error:
module 'os' has no attribute 'popen3'
when trying to use options that require spawning a subprocess such as --mysql-io.It looks like the
import asubprocess
in the try block fails becauseasubprocess
isn't valid, so it then tries theos.popen3()
in the exception, but that's not valid on python 3.9.Should
import asubprocess
really beimport subprocess
?https://github.com/scottchiefbaker/dool/blob/332b82832b1a4394238c4ffc922308527bf1fbba/dool#L1773-L1779