stanford-rc / sasutils Goto Github PK
View Code? Open in Web Editor NEWSerial Attached SCSI (SAS) Linux utilities and Python library
License: Apache License 2.0
Serial Attached SCSI (SAS) Linux utilities and Python library
License: Apache License 2.0
nose
is already deprecated and shoud not be used with python 3.x https://nose.readthedocs.io/en/latest/
+ /usr/bin/pytest -ra tests/gen_sysfs_testenv.py tests/sysfs.py
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.12, pytest-6.2.5, py-1.11.0, pluggy-1.0.0
rootdir: /home/tkloczko/rpmbuild/BUILD/sasutils-0.3.12
collected 8 items / 1 error / 7 selected
================================================================================== ERRORS ==================================================================================
_______________________________________________________________ ERROR collecting tests/gen_sysfs_testenv.py ________________________________________________________________
ImportError while importing test module '/home/tkloczko/rpmbuild/BUILD/sasutils-0.3.12/tests/gen_sysfs_testenv.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib64/python3.8/importlib/__init__.py:127: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests/gen_sysfs_testenv.py:23: in <module>
import nose
E ModuleNotFoundError: No module named 'nose'
========================================================================= short test summary info ==========================================================================
ERROR tests/gen_sysfs_testenv.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
============================================================================= 1 error in 0.09s =============================================================================
On migration to pytest
usefull could be https://github.com/schollii/nose2pytest/
The command sas_sd_snic_alias outputs the follow warning:
WARNING:root:sdc not an array device (/sys/block/sdc/device/block/sdc)
Not found: '0x50001ff2343d0400'
And the alias is not created.
My Linux is:
CentOS Linux release 7.3.1611 (Core)
Linux xxxx 3.10.0-514.el7.x86_64 #1 SMP xxxx x86_64 x86_64 x86_64 GNU/Linux
Hi,
The README states that ses_report requires a recent version of sg3_utils
, however it seems sg3_utils
(or sg3-utils
in Debian/APT) also is required for sas_devices
(error, see below), sas_counters
(blank output) and the verbose mode of sas_discover
(blank output);
root@gridlock:~/bin/sasutils# sas_discover -v
root@gridlock:~/bin/sasutils# sas_discover --verbose
root@gridlock:~/bin/sasutils# sas_counters
root@gridlock:~/bin/sasutils# sas_devices
Found 1 SAS hosts
Found 1 SAS expanders
Found 1 enclosure groups
Traceback (most recent call last):
File "/usr/bin/sas_devices", line 9, in <module>
load_entry_point('sasutils==0.3.2', 'console_scripts', 'sas_devices')()
File "/usr/lib/python3/dist-packages/sasutils/cli/sas_devices.py", line 303, in main
sas_devices_cli.print_end_devices(root)
File "/usr/lib/python3/dist-packages/sasutils/cli/sas_devices.py", line 211, in print_end_devices
snic = ses_get_snic_nickname(enc.scsi_generic.name)
File "/usr/lib/python3/dist-packages/sasutils/ses.py", line 39, in ses_get_snic_nickname
stderr=subprocess.PIPE).communicate()
File "/usr/lib/python3.4/subprocess.py", line 859, in __init__
restore_signals, start_new_session)
File "/usr/lib/python3.4/subprocess.py", line 1457, in _execute_child
raise child_exception_type(errno_num, err_msg)
FileNotFoundError: [Errno 2] No such file or directory: 'sg_ses'
After installing sg3_utils
, they all work as expected.
I'm setting up a new system identical (in theory) to three other systems on which this works fine. On the new setup I get this error from sas_devices:
# sas_devices
Found 3 SAS hosts
Found 9 SAS expanders
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/sasutils/sysfs.py", line 166, in get
self.values[key] = sysfs.get(self.paths[key], absolute=True)
KeyError: 'sas_address'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/bin/sas_devices", line 11, in <module>
load_entry_point('sasutils==0.3.10', 'console_scripts', 'sas_devices')()
File "/usr/lib/python3.6/site-packages/sasutils/cli/sas_devices.py", line 307, in main
sas_devices_cli.print_end_devices(root)
File "/usr/lib/python3.6/site-packages/sasutils/cli/sas_devices.py", line 147, in print_end_devices
enclosures[encldev.attrs.sas_address] = encldev
File "/usr/lib/python3.6/site-packages/sasutils/sysfs.py", line 176, in __getitem__
return self.get(key)
File "/usr/lib/python3.6/site-packages/sasutils/sysfs.py", line 172, in get
(self.__class__.__name__, key))
AttributeError: 'SysfsAttributes' object has no attribute 'sas_address'
Multipath is (mostly) working normally but since I usually use sas_devices
to troubleshoot that I'm having slow progress figuring out exactly what is causing this to fail.
Python: 3.10
OS: Fedora 35
Error:
[root@corsair ~]# sas_discover
Traceback (most recent call last):
File "/usr/bin/sas_discover", line 33, in <module>
sys.exit(load_entry_point('sasutils==0.3.11', 'console_scripts', 'sas_discover')())
File "/usr/bin/sas_discover", line 25, in importlib_load_entry_point
return next(matches).load()
File "/usr/lib64/python3.10/importlib/metadata/__init__.py", line 162, in load
module = import_module(match.group('module'))
File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 883, in exec_module
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "/usr/lib/python3.10/site-packages/sasutils/cli/sas_discover.py", line 25, in <module>
from sasutils.sas import SASHost
File "/usr/lib/python3.10/site-packages/sasutils/sas.py", line 18, in <module>
from sasutils.scsi import BlockDevice, SCSIDevice, SCSIHost
File "/usr/lib/python3.10/site-packages/sasutils/scsi.py", line 19, in <module>
from sasutils.sysfs import SysfsDevice, SysfsObject
File "/usr/lib/python3.10/site-packages/sasutils/sysfs.py", line 144, in <module>
class SysfsAttributes(collections.MutableMapping):
AttributeError: module 'collections' has no attribute 'MutableMapping'
Using or importing the MutableMapping from 'collections' instead of from 'collections.abc' is deprecated since Python 3.8
Ideally, by nickname with wildcard support:
$ sas_devices --nickname 'io2-jbod8*' --bay 33
Any attempt to read the bay_identifier
sysfs file returns EINVAL for some sas_end_devices, it seems. In this case, sas_counters.py
errors out with the following traceback because unlike other parts of the code base that touch the bay_identifier
attribute, ValueError
isn't caught here so far:
(...) File "/usr/lib/python2.7/site-packages/sasutils/cli/sas_counters.py", line 101, in portsortfunc sortv[2] = int(port_n.end_devices[0].sas_device.attrs ValueError: invalid literal for int() with base 10: '[Errno 22] Invalid argument'
# sas_devices
Found 2 SAS hosts
Found 3 SAS expanders
Traceback (most recent call last):
File "/usr/bin/sas_devices", line 9, in <module>
load_entry_point('sasutils==0.3.9', 'console_scripts', 'sas_devices')()
File "/usr/lib/python3.5/site-packages/sasutils/cli/sas_devices.py", line 302, in main
sas_devices_cli.print_end_devices(root)
File "/usr/lib/python3.5/site-packages/sasutils/cli/sas_devices.py", line 159, in print_end_devices
lu = vpd_decode_pg83_lu(pg83)
File "/usr/lib/python3.5/site-packages/sasutils/vpd.py", line 41, in vpd_decode_pg83_lu
d, = unpack_from('B', pagebuf, offset + 3)
struct.error: unpack_from requires a buffer of at least 1 bytes
Happens when I attach a specific device (SSD) to the topology.
We need man pages for the main tools. This is a recommendation from reviews of the RPM spec file.
Nice blog post: https://scottstuff.net/posts/2022/06/04/sas_counters_on_linux/
With current sasutils, we can't resolve which block device is attached to a given SAS phy indeed, but it is easy to implement. The proposed changes are:
Python API:
SASPhy
class to get the corresponding SASPort
object, if any. A SAS phy does not always have a SAS port assigned, but if so, it is directly accessible via sysfs.sas_counters:
That way, folks monitoring invalid dword rates or other phy counters might be able to more easily locate a problem with a specific device.
Before:
sasutils.sas_counters.fir-io1-s1.HBA_9500-16e.0x500062b20a502a80.SP-3224A-E12EBD.io1-jbof4.phys.0.invalid_dword_count 65 1674797006
After:
sasutils.sas_counters.fir-io1-s1.HBA_9500-16e.0x500062b20a502a80.SP-3224A-E12EBD.io1-jbof4.phys.0.sdcv.invalid_dword_count 65 1674797006
^^^^
If no block/sg device can be found for a specific phy, it will display no_port
, no_dev
or no_target
instead of the device name, depending on the situation.
The sas_devices command outputs the follow warnings:
Warning: no enclosure symlink set for sdco in /sys/class/sas_end_device/end_device-12:1:15/device/target12:0:20/12:0:20:0
Warning: sdco not an array device (/sys/class/sas_end_device/end_device-12:1:15/device/sas_device/end_device-12:1:15)
Warning: no enclosure symlink set for sdai in /sys/class/sas_end_device/end_device-1:1:30/device/target1:0:35/1:0:35:0
Warning: sdai not an array device (/sys/class/sas_end_device/end_device-1:1:30/device/sas_device/end_device-1:1:30)
My Linux is:
CentOS Linux release 7.3.1611 (Core)
Linux xxxx 3.10.0-514.el7.x86_64 #1 SMP xxxx x86_64 x86_64 x86_64 GNU/Linux
sas_counters
, sas_devices
, sas_discover
, ses_report
all fail with the error message Not found: '/sys/class/sas_host/host4/device/port-4:3/end_device-4:3/target4:0:3/4:0:3:0/scsi_generic/*[0-9]'
.
The /sys/class/sas_host/host4/device/port-4:3/end_device-4:3/target4:0:3/4:0:3:0/
directory does not contain a scsi_generic
directory.
This is my setup: I have a Dell PowerEdge R610 with an HBA in one of the PCIe slots. I then have a SAS SFF-8088 cable that connects to an EMC KTN-STL3 15 bay chassis with some SATA hard disks inside connected to interposers.
I also have a second HBA card connected to the internal backplane of the server with some SATA SSDs connected to it.
lspci
shows my HBA cards as Serial Attached SCSI controller: Broadcom / LSI SAS2008 PCI-Express Fusion-MPT SAS-2 [Falcon] (rev 03)
.
Is this configuration supported or do I need SAS hard disks for sasutils to work? Maybe my hardware is too weird?
I'm using sasutils installed via Nix (https://github.com/NixOS/nixpkgs/blob/41cc1d5d9584103be4108c1815c350e07c807036/pkgs/os-specific/linux/sasutils/default.nix) but that shouldn't matter. I'm running NixOS but I can also try this on Arch Linux as well if you want.
I'll happily provide any additional information you may need to help you diagnose the issue.
Problem:
# sas_discover -vv | grep host
Binary file (standard input) matches
$ sas_discover
Traceback (most recent call last):
File "/usr/bin/sas_discover", line 9, in <module>
load_entry_point('sasutils==0.3.8', 'console_scripts', 'sas_discover')()
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 387, in main
root = SDRootNode(name=root_name, baseobj=root_obj, disp=disp)
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 50, in __init__
self.resolve()
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 128, in resolve
self.add_child(SDHostNode, sas_host, last=last)
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 102, in add_child
self.adv_prompt(self.proffset, last)))
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 50, in __init__
self.resolve()
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 154, in resolve
self.add_child(SDExpanderNode, expander, nphys=nphys, last=last)
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 102, in add_child
self.adv_prompt(self.proffset, last)))
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 50, in __init__
self.resolve()
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 186, in resolve
SDHostNode.resolve(self)
File "/usr/lib/python3.4/site-packages/sasutils/cli/sas_discover.py", line 149, in resolve
ports = sorted(self.baseobj.ports, key=portsortfunc)
TypeError: unorderable types: tuple() < list()
After upgrading to 0.3.13, we get following exception when calling sas_devices -v
:
[root@host~]# sas_devices -v
Found 2 SAS hosts: host0,host18
SAS expander 0x500c0ff00b41953f x1 (expander-18:0)
SAS expander 0x500c0ff00b46e93f x1 (expander-0:0)
SAS expander 0x500c0ff2f03c571f x1 (expander-18:1)
SAS expander 0x500c0ff2f13efe1f x1 (expander-18:3)
SAS expander 0x500c0ff3f13e699f x1 (expander-0:3)
SAS expander 0x500c0ff3f13e6a9f x1 (expander-0:1)
SAS expander 0x500c0ff4f03c577f x1 (expander-18:2)
SAS expander 0x500c0ff4f13efe7f x1 (expander-18:4)
SAS expander 0x500c0ff5f13e69ff x1 (expander-0:4)
SAS expander 0x500c0ff5f13e6aff x1 (expander-0:2)
Found 10 SAS expanders
Warning: no enclosure symlink set for sde in /sys/class/sas_end_device/end_device-18:1:6/device/target18:0:33/18:0:33:0
Warning: no enclosure symlink set for sdah in /sys/class/sas_end_device/end_device-0:1:6/device/target0:0:33/0:0:33:0
Found 1 enclosure groups
Found 1 orphan devices
Enclosure group: [sg0:LENOVO D32845U12GESM, addr: 0x500c0ff00b46e93e][sg34:LENOVO D32845U12GESM, addr: 0x500c0ff00b41953e]
Traceback (most recent call last):
File "/bin/sas_devices", line 11, in <module>
load_entry_point('sasutils==0.3.13', 'console_scripts', 'sas_devices')()
File "/usr/lib/python3.6/site-packages/sasutils/cli/sas_devices.py", line 283, in main
sas_devices_cli.print_end_devices(root)
File "/usr/lib/python3.6/site-packages/sasutils/cli/sas_devices.py", line 233, in print_end_devices
encdevs = list(filter(enclosure_finder, devmap.items()))
File "/usr/lib/python3.6/site-packages/sasutils/cli/sas_devices.py", line 229, in enclosure_finder
if _encl in encset:
UnboundLocalError: local variable '_encl' referenced before assignment
Seems like that the _encl
variable is accessed here without being defined/initialized before: https://github.com/stanford-rc/sasutils/blob/master/sasutils/cli/sas_devices.py#L229
The workaround is to either indent the if _encl in encset:
block into the parent if block or initialize the _encl
variable.
Hi,
Trying to install this as a .deb-package, but yields an error trying to install the .deb-file.
root@gridlock:~# cd bin/
root@gridlock:~/bin# git clone https://github.com/stanford-rc/sasutils.git
Cloning into 'sasutils'...
remote: Counting objects: 473, done.
remote: Total 473 (delta 0), reused 0 (delta 0), pack-reused 473
Receiving objects: 100% (473/473), 91.73 KiB | 0 bytes/s, done.
Resolving deltas: 100% (328/328), done.
Checking connectivity... done.
root@gridlock:~/bin# cd sasutils/
root@gridlock:~/bin/sasutils# apt-get install python3-setuptools python3-stdeb
Then building it;
root@gridlock:~/bin/sasutils# ./mkdeb.sh
running bdist_deb
running sdist_dsc
running egg_info
creating sasutils.egg-info
writing sasutils.egg-info/PKG-INFO
writing dependency_links to sasutils.egg-info/dependency_links.txt
writing top-level names to sasutils.egg-info/top_level.txt
writing entry points to sasutils.egg-info/entry_points.txt
writing manifest file 'sasutils.egg-info/SOURCES.txt'
reading manifest file 'sasutils.egg-info/SOURCES.txt'
writing manifest file 'sasutils.egg-info/SOURCES.txt'
running sdist
running check
creating sasutils-0.3.2
creating sasutils-0.3.2/sasutils
creating sasutils-0.3.2/sasutils.egg-info
creating sasutils-0.3.2/sasutils/cli
making hard links in sasutils-0.3.2...
hard linking README.rst -> sasutils-0.3.2
hard linking setup.py -> sasutils-0.3.2
hard linking sasutils/__init__.py -> sasutils-0.3.2/sasutils
hard linking sasutils/sas.py -> sasutils-0.3.2/sasutils
hard linking sasutils/scsi.py -> sasutils-0.3.2/sasutils
hard linking sasutils/ses.py -> sasutils-0.3.2/sasutils
hard linking sasutils/smp.py -> sasutils-0.3.2/sasutils
hard linking sasutils/sysfs.py -> sasutils-0.3.2/sasutils
hard linking sasutils/vpd.py -> sasutils-0.3.2/sasutils
hard linking sasutils.egg-info/PKG-INFO -> sasutils-0.3.2/sasutils.egg-info
hard linking sasutils.egg-info/SOURCES.txt -> sasutils-0.3.2/sasutils.egg-info
hard linking sasutils.egg-info/dependency_links.txt -> sasutils-0.3.2/sasutils.egg-info
hard linking sasutils.egg-info/entry_points.txt -> sasutils-0.3.2/sasutils.egg-info
hard linking sasutils.egg-info/top_level.txt -> sasutils-0.3.2/sasutils.egg-info
hard linking sasutils/cli/__init__.py -> sasutils-0.3.2/sasutils/cli
hard linking sasutils/cli/sas_counters.py -> sasutils-0.3.2/sasutils/cli
hard linking sasutils/cli/sas_devices.py -> sasutils-0.3.2/sasutils/cli
hard linking sasutils/cli/sas_discover.py -> sasutils-0.3.2/sasutils/cli
hard linking sasutils/cli/sas_mpath_snic_alias.py -> sasutils-0.3.2/sasutils/cli
hard linking sasutils/cli/sas_sd_snic_alias.py -> sasutils-0.3.2/sasutils/cli
hard linking sasutils/cli/ses_report.py -> sasutils-0.3.2/sasutils/cli
Writing sasutils-0.3.2/setup.cfg
creating dist
Creating tar archive
removing 'sasutils-0.3.2' (and everything under it)
This version of stdeb requires python-all >= 2.6.6-3, but you do not have this package installed. Could not check compatibility.
CALLING dpkg-source -b sasutils-0.3.2 sasutils_0.3.2.orig.tar.gz (in dir deb_dist)
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building sasutils using existing ./sasutils_0.3.2.orig.tar.gz
dpkg-source: info: building sasutils in sasutils_0.3.2-1.debian.tar.xz
dpkg-source: info: building sasutils in sasutils_0.3.2-1.dsc
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package sasutils
dpkg-buildpackage: source version 0.3.2-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Stephane Thiell <[email protected]>
dpkg-source --before-build sasutils-0.3.2
fakeroot debian/rules clean
dh clean --with python3 --buildsystem=pybuild
dh_testdir -O--buildsystem=pybuild
dh_auto_clean -O--buildsystem=pybuild
I: pybuild base:170: python3.4 setup.py clean
running clean
removing '/root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.4' does not exist -- can't clean it
dh_clean -O--buildsystem=pybuild
dpkg-source -b sasutils-0.3.2
dpkg-source: info: using source format `3.0 (quilt)'
dpkg-source: info: building sasutils using existing ./sasutils_0.3.2.orig.tar.gz
dpkg-source: warning: ignoring deletion of directory sasutils.egg-info
dpkg-source: warning: ignoring deletion of file sasutils.egg-info/dependency_links.txt, use --include-removal to override
dpkg-source: warning: ignoring deletion of file sasutils.egg-info/top_level.txt, use --include-removal to override
dpkg-source: warning: ignoring deletion of file sasutils.egg-info/entry_points.txt, use --include-removal to override
dpkg-source: warning: ignoring deletion of file sasutils.egg-info/PKG-INFO, use --include-removal to override
dpkg-source: warning: ignoring deletion of file sasutils.egg-info/SOURCES.txt, use --include-removal to override
dpkg-source: info: building sasutils in sasutils_0.3.2-1.debian.tar.xz
dpkg-source: info: building sasutils in sasutils_0.3.2-1.dsc
dpkg-genchanges -S -sa >../sasutils_0.3.2-1_source.changes
dpkg-genchanges: including full source code in upload
dpkg-source --after-build sasutils-0.3.2
dpkg-buildpackage: full upload (original source is included)
dpkg-source: warning: extracting unsigned source package (sasutils_0.3.2-1.dsc)
dpkg-source: info: extracting sasutils in sasutils-0.3.2
dpkg-source: info: unpacking sasutils_0.3.2.orig.tar.gz
dpkg-source: info: unpacking sasutils_0.3.2-1.debian.tar.xz
dpkg-buildpackage: warning: using a gain-root-command while being root
dpkg-buildpackage: source package sasutils
dpkg-buildpackage: source version 0.3.2-1
dpkg-buildpackage: source distribution unstable
dpkg-buildpackage: source changed by Stephane Thiell <[email protected]>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build sasutils-0.3.2
fakeroot debian/rules clean
dh clean --with python3 --buildsystem=pybuild
dh_testdir -O--buildsystem=pybuild
dh_auto_clean -O--buildsystem=pybuild
I: pybuild base:170: python3.4 setup.py clean
running clean
removing '/root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build' (and everything under it)
'build/bdist.linux-x86_64' does not exist -- can't clean it
'build/scripts-3.4' does not exist -- can't clean it
dh_clean -O--buildsystem=pybuild
debian/rules build
dh build --with python3 --buildsystem=pybuild
dh_testdir -O--buildsystem=pybuild
dh_auto_configure -O--buildsystem=pybuild
I: pybuild base:170: python3.4 setup.py config
running config
dh_auto_build -O--buildsystem=pybuild
I: pybuild base:170: /usr/bin/python3 setup.py build
running build
running build_py
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
copying sasutils/sas.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
copying sasutils/scsi.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
copying sasutils/sysfs.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
copying sasutils/ses.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
copying sasutils/smp.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
copying sasutils/vpd.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
copying sasutils/__init__.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
copying sasutils/cli/sas_counters.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
copying sasutils/cli/ses_report.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
copying sasutils/cli/sas_devices.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
copying sasutils/cli/sas_mpath_snic_alias.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
copying sasutils/cli/__init__.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
copying sasutils/cli/sas_sd_snic_alias.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
copying sasutils/cli/sas_discover.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli
dh_auto_test -O--buildsystem=pybuild
I: pybuild base:170: cd /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build; python3.4 -m unittest discover -v
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
fakeroot debian/rules binary
dh binary --with python3 --buildsystem=pybuild
dh_testroot -O--buildsystem=pybuild
dh_prep -O--buildsystem=pybuild
dh_auto_install -O--buildsystem=pybuild
I: pybuild base:170: /usr/bin/python3 setup.py install --root /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils
running install
running build
running build_py
running install_lib
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/sysfs.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/__init__.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/ses.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/vpd.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/smp.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/scsi.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/sas.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils
creating /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli/sas_sd_snic_alias.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli/sas_devices.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli/sas_counters.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli/sas_mpath_snic_alias.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli/ses_report.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli/__init__.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
copying /root/bin/sasutils/deb_dist/sasutils-0.3.2/.pybuild/pythonX.Y_3.4/build/sasutils/cli/sas_discover.py -> /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/sysfs.py to sysfs.cpython-34.pyc
File "/usr/lib/python3.4/dist-packages/sasutils/sysfs.py", line 131
except IOError, exc:
^
SyntaxError: invalid syntax
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/__init__.py to __init__.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/ses.py to ses.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/vpd.py to vpd.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/smp.py to smp.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/scsi.py to scsi.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/sas.py to sas.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli/sas_sd_snic_alias.py to sas_sd_snic_alias.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli/sas_devices.py to sas_devices.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli/sas_counters.py to sas_counters.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli/sas_mpath_snic_alias.py to sas_mpath_snic_alias.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli/ses_report.py to ses_report.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli/__init__.py to __init__.cpython-34.pyc
byte-compiling /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils/cli/sas_discover.py to sas_discover.cpython-34.pyc
running install_egg_info
running egg_info
creating sasutils.egg-info
writing dependency_links to sasutils.egg-info/dependency_links.txt
writing entry points to sasutils.egg-info/entry_points.txt
writing sasutils.egg-info/PKG-INFO
writing top-level names to sasutils.egg-info/top_level.txt
writing manifest file 'sasutils.egg-info/SOURCES.txt'
reading manifest file 'sasutils.egg-info/SOURCES.txt'
writing manifest file 'sasutils.egg-info/SOURCES.txt'
Copying sasutils.egg-info to /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/lib/python3.4/dist-packages/sasutils-0.3.2.egg-info
running install_scripts
Installing sas_mpath_snic_alias script to /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/bin
Installing sas_sd_snic_alias script to /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/bin
Installing sas_counters script to /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/bin
Installing sas_devices script to /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/bin
Installing sas_discover script to /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/bin
Installing ses_report script to /root/bin/sasutils/deb_dist/sasutils-0.3.2/debian/python3-sasutils/usr/bin
dh_installdocs -O--buildsystem=pybuild
dh_installchangelogs -O--buildsystem=pybuild
dh_python3 -O--buildsystem=pybuild
dh_perl -O--buildsystem=pybuild
dh_link -O--buildsystem=pybuild
dh_compress -O--buildsystem=pybuild
dh_fixperms -O--buildsystem=pybuild
dh_installdeb -O--buildsystem=pybuild
dh_gencontrol -O--buildsystem=pybuild
dh_md5sums -O--buildsystem=pybuild
dh_builddeb -O--buildsystem=pybuild
dpkg-deb: building package `python3-sasutils' in `../python3-sasutils_0.3.2-1_all.deb'.
dpkg-genchanges -b >../sasutils_0.3.2-1_amd64.changes
dpkg-genchanges: binary-only upload (no source code included)
dpkg-source --after-build sasutils-0.3.2
dpkg-buildpackage: binary-only upload (no source included)
Then installing...
root@gridlock:~/bin/sasutils# dpkg -i deb_dist/python3-sasutils_0.3.2-1_all.deb
Selecting previously unselected package python3-sasutils.
(Reading database ... 119148 files and directories currently installed.)
Preparing to unpack .../python3-sasutils_0.3.2-1_all.deb ...
Unpacking python3-sasutils (0.3.2-1) ...
Setting up python3-sasutils (0.3.2-1) ...
File "/usr/lib/python3/dist-packages/sasutils/sysfs.py", line 131
except IOError, exc:
^
SyntaxError: invalid syntax
dpkg: error processing package python3-sasutils (--install):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
python3-sasutils
Installed python-related packages;
root@gridlock:~/bin/sasutils# dpkg --list|grep python
ii dh-python 1.20141111-2 all Debian helper tools for packaging Python libraries and applications
ii libpython-stdlib:amd64 2.7.9-1 amd64 interactive high-level object-oriented language (default python version)
ii libpython2.7:amd64 2.7.9-2+deb8u1 amd64 Shared Python runtime library (version 2.7)
ii libpython2.7-minimal:amd64 2.7.9-2+deb8u1 amd64 Minimal subset of the Python language (version 2.7)
ii libpython2.7-stdlib:amd64 2.7.9-2+deb8u1 amd64 Interactive high-level object-oriented language (standard library, version 2.7)
ii libpython3-stdlib:amd64 3.4.2-2 amd64 interactive high-level object-oriented language (default python3 version)
ii libpython3.4-minimal:amd64 3.4.2-1 amd64 Minimal subset of the Python language (version 3.4)
ii libpython3.4-stdlib:amd64 3.4.2-1 amd64 Interactive high-level object-oriented language (standard library, version 3.4)
ii python 2.7.9-1 amd64 interactive high-level object-oriented language (default version)
ii python-apt 0.9.3.12 amd64 Python interface to libapt-pkg
ii python-apt-common 0.9.3.12 all Python interface to libapt-pkg (locales)
ii python-ceph 0.80.7-2+deb8u2 amd64 Python libraries for the Ceph distributed filesystem
ii python-chardet 2.3.0-1 all universal character encoding detector for Python2
ii python-debian 0.1.27 all Python modules to work with Debian-related data formats
ii python-debianbts 1.12 all Python interface to Debian's Bug Tracking System
ii python-defusedxml 0.4.1-2 all XML bomb protection for Python stdlib modules (for Python 2)
ii python-docutils 0.12+dfsg-1 all text processing system for reStructuredText (implemented in Python 2)
ii python-flask 0.10.1-2 all micro web framework based on Werkzeug, Jinja2 and good intentions
ii python-ipaddr 2.1.11-2 all Python module for working with IP addresses, both IPv4 and IPv6
ii python-itsdangerous 0.24+dfsg1-1 all Various helpers to pass trusted data to untrusted environment - python 2.x
ii python-jinja2 2.7.3-1 all small but fast and easy to use stand-alone template engine
ii python-markupsafe 0.23-1+b1 amd64 HTML/XHTML/XML string library for Python
ii python-minimal 2.7.9-1 amd64 minimal subset of the Python language (default version)
ii python-pkg-resources 5.5.1-1 all Package Discovery and Resource Access using pkg_resources
ii python-protobuf 2.6.1-1 amd64 Python bindings for protocol buffers
ii python-pyinotify 0.9.4-1 all simple Linux inotify Python bindings
ii python-reportbug 6.6.3 all Python modules for interacting with bug tracking systems
ii python-requests 2.4.3-6 all elegant and simple HTTP library for Python2, built for human beings
ii python-roman 2.0.0-1 all module for generating/analyzing Roman numerals for Python 2
ii python-six 1.8.0-1 all Python 2 and 3 compatibility library (Python 2 interface)
ii python-soappy 0.12.22-1 all SOAP Support for Python
ii python-support 1.0.15 all automated rebuilding support for Python modules
ii python-talloc 2.1.2-0+deb8u1 amd64 hierarchical pool based memory allocator - Python bindings
ii python-urllib3 1.9.1-3 all HTTP library with thread-safe connection pooling for Python
ii python-werkzeug 0.9.6+dfsg-1+deb8u1 all collection of utilities for WSGI applications
ii python-wstools 0.4.3-2 all WSDL parsing tools Python module
ii python2.7 2.7.9-2+deb8u1 amd64 Interactive high-level object-oriented language (version 2.7)
ii python2.7-minimal 2.7.9-2+deb8u1 amd64 Minimal subset of the Python language (version 2.7)
ii python3 3.4.2-2 amd64 interactive high-level object-oriented language (default python3 version)
ii python3-all 3.4.2-2 amd64 package depending on all supported Python 3 runtime versions
ii python3-chardet 2.3.0-1 all universal character encoding detector for Python3
ii python3-minimal 3.4.2-2 amd64 minimal subset of the Python language (default python3 version)
ii python3-pkg-resources 5.5.1-1 all Package Discovery and Resource Access using pkg_resources
ii python3-requests 2.4.3-6 all elegant and simple HTTP library for Python3, built for human beings
iF python3-sasutils 0.3.2-1 all Serial Attached SCSI (SAS) Linux utilities
ii python3-setuptools 5.5.1-1 all Python3 Distutils Enhancements
ii python3-six 1.8.0-1 all Python 2 and 3 compatibility library (Python 3 interface)
ii python3-stdeb 0.8.2-4 all Python to Debian source package conversion plugins for distutils
ii python3-urllib3 1.9.1-3 all HTTP library with thread-safe connection pooling for Python3
ii python3.4 3.4.2-1 amd64 Interactive high-level object-oriented language (version 3.4)
ii python3.4-minimal 3.4.2-1 amd64 Minimal subset of the Python language (version 3.4)
Over at https://github.com/doug-gilbert/sg3_utils I recently updated sg_ses to support JSON output. The default is still human readable output and associated with the JSON additions some of the human readable output has been tweaked. Over 2000 lines were added, and around 900 removed, so its a big change. You may like to test that the newer sg_ses does not trip up ses_report .
I would like some feedback on the JSON additions before releasing sg3_utils version 1.48 .
sas_devices should display sg devices in the enclosure group header line.
I downloaded and successfully built/installed the deb packages and most tools work, however ses_report has an UTF-8 error:
# ses_report -c
Traceback (most recent call last):
File "/usr/bin/ses_report", line 11, in <module>
load_entry_point('sasutils==0.3.10', 'console_scripts', 'ses_report')()
File "/usr/lib/python3/dist-packages/sasutils/cli/ses_report.py", line 120, in main
ses_report()
File "/usr/lib/python3/dist-packages/sasutils/cli/ses_report.py", line 96, in ses_report
for edinfo in ses_get_ed_metrics(sg_dev.name):
File "/usr/lib/python3/dist-packages/sasutils/ses.py", line 87, in ses_get_ed_metrics
for element_type, descriptor, line in _ses_get_ed_line(sg_name):
File "/usr/lib/python3/dist-packages/sasutils/ses.py", line 69, in _ses_get_ed_line
for line in stdout.decode("utf-8").splitlines():
UnicodeDecodeError: 'utf-8' codec can't decode byte 0x80 in position 48894: invalid start byte
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.