Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'SysfsAttributes' object has no attribute 'sas_address' #18

Closed
griznog opened this issue Jun 11, 2021 · 2 comments
Closed

Comments

@griznog
Copy link

griznog commented Jun 11, 2021

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.

@repeatdefender
Copy link

repeatdefender commented Nov 8, 2022

Edit: Seems this was due to a device lacking a sas address.
Found with sg_scan: LSI VirtualSES

I have also experienced this issue:

# sas_devices -v
Found 1 SAS hosts: host1
...
Found 16 SAS expanders
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/dist-packages/sasutils/sysfs.py", line 169, 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/local/bin/sas_devices", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.8/dist-packages/sasutils/cli/sas_devices.py", line 311, in main
    sas_devices_cli.print_end_devices(root)
  File "/usr/local/lib/python3.8/dist-packages/sasutils/cli/sas_devices.py", line 147, in print_end_devices
    enclosures[encldev.attrs.sas_address] = encldev
  File "/usr/local/lib/python3.8/dist-packages/sasutils/sysfs.py", line 179, in __getitem__
    return self.get(key)
  File "/usr/local/lib/python3.8/dist-packages/sasutils/sysfs.py", line 174, in get
    raise AttributeError("%r object has no attribute %r" %
AttributeError: 'SysfsAttributes' object has no attribute 'sas_address'

@thiell thiell closed this as completed in 1569b8b Nov 15, 2022
@thiell
Copy link
Member

thiell commented Nov 15, 2022

Thanks for the report! Could you please try this new release and let me know if your issue is fixed?
https://github.com/stanford-rc/sasutils/releases/tag/v0.3.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants