Hide Forgot
Description of problem: Using the command $ lmi hwinfo fails with 'NoneType' object has no attribute 'ChassisPackageType' Other commands such as $ lmi hwinfo cpu work correctly. Version-Release number of selected component (if applicable): openlmi-hardware-0.4.1-fc20 openlmi-scripts-0.2.4a-3.fc20 openlmi-tools-0.9-5.fc20 How reproducible: Every time. Steps to Reproduce: 1. Install openlmi-scripts* 2. run lmi hwinfo 3. Actual results: 'NoneType' object has no attribute 'ChassisPackageType' Expected results: Display of hwinfo output Additional info: hwinfo subcommands work. running hwinfo against a remote RHEL 7 Beta system returns the same failure
Updated information: this is occurring on a bare metal system. Other people have indicated that the command works in virtual machines.
Update: in further testing, a remote RHEL 7 Beta system is working. Using hwinfo against an F20 system: hwinfo fails hwinfo cpu success hwinfo chassis success hwinfo memory success hwinfo system fail AHA! When logged in as a regular user, lmi hwinfo will prompt for username and password. It then succeeds. When logged in as root, the lmi hwinfo does not prompt for username and fails. The list of failures above occur when logged in as root.
Hi Russell, please, could you provide following information? * Does the command lmi hwinfo fails also with selinux turned off? * Please, attach file dmidecode.out from: # dmidecode --dump-bin dmidecode.out * Attach output from following command executed in lmishell (c is connection): > c.root.cimv2.LMI_Chassis.instances()[0].properties_dict() Thanks, peter
Working with the latest updates to F20, su to root, and SELinux in enforcing mode, I get: lmi> hwinfo ERROR: invocation failed for host "https://localhost": (1, u'CIM_ERR_FAILED: File "libComputerSystemProvider.so" was not found for provider module "ComputerSystemModule".') There was 1 error: host https://localhost CIM_ERR_FAILED: File "libComputerSystemProvider.so" was not found for provider module "ComputerSystemModule".: The same error occurs when SELinux is put into permissive mode. When logged in as a normal user I get: [rdoty@localhost ~]$ lmi lmi> hwinfo username: pegasus password: Hostname: localhost Chassis Type: Desktop Manufacturer: Gigabyte Technology Co., Ltd. Model: (GA-MA78GM-S2H) Serial Number: Not Specified Asset Tag: 0 CPU: AMD Phenom(tm) 9550 Quad-Core Processor Topology: 1 cpu(s), 1 core(s), 1 thread(s) Max Freq: 3000 MHz Arch: x86_64 Memory: 4 GB Slots: 2 used, 4 total lmi> Output of the properties dictionary is: > c.root.cimv2.LMI_Chassis.instances()[0].properties_dict() NocaseDict({u'HotSwappable': None, u'Model': '', u'HealthState': None, u'CanBeFRUed': None, u'StatusDescriptions': None, u'Weight': None, u'ServiceDescriptions': None, u'Generation': None, u'PoweredOn': None, u'SerialNumber': u'Not Specified', u'Tag': u'0', u'ServicePhilosophy': None, u'Height': None, u'CommunicationStatus': None, u'SecurityBreach': None, u'CableManagementStrategy': None, u'PartNumber': None, u'VendorCompatibilityStrings': None, u'SKU': '', u'OtherIdentifyingInfo': None, u'MultipleSystemSupport': None, u'Caption': u'System Chassis', u'NumberOfPowerCords': None, u'VendorEquipmentType': None, u'ChassisTypes': None, u'RemovalConditions': 2L, u'OtherInputCurrentType': None, u'Version': '', u'Removable': None, u'VisibleAlarm': None, u'Status': None, u'DetailedStatus': None, u'Description': u'This object represents physical chassis of the system.', u'UserTracking': None, u'ChassisPackageType': 3L, u'OperationalStatus': None, u'Replaceable': None, u'HeatGeneration': None, u'ManufactureDate': None, u'InputVoltage': None, u'IsLocked': None, u'InstallDate': None, u'CreationClassName': u'LMI_Chassis', u'AudibleAlarm': None, u'OtherPackageType': None, u'Manufacturer': u'Gigabyte Technology Co., Ltd.', u'TypeDescriptions': None, u'ElementName': u'Desktop', u'InputCurrentType': None, u'Name': u'Desktop', u'InstanceID': u'LMI:LMI_Chassis:0', u'PrimaryStatus': None, u'UUID': u'30303146-4430-3541-3044-3130FFFFFFFF', u'ProductName': u'GA-MA78GM-S2H', u'LockPresent': False, u'Depth': None, u'PackageType': 3L, u'OperatingStatus': None, u'CurrentRequiredOrProduced': None, u'RackMountable': None, u'BreachDescription': None, u'ChassisTypeDescription': None, u'Width': None})
Created attachment 853362 [details] Output of dmidecode
Connecting to a RHEL 7 beta system with SELinux in either enforcing or permissive mode: ]# lmi -nv -h 192.168.10.124 lmi> hwinfo username: pegasus password: INFO: Connected to 192.168.10.124 ERROR: invocation failed for host "https://192.168.10.124": 'NoneType' object has no attribute 'ChassisPackageType' There was 1 error: host https://192.168.10.124 (AttributeError) 'NoneType' object has no attribute 'ChassisPackageType' lmi> help hwinfo Display hardware information. Usage: hwinfo [all] hwinfo system hwinfo chassis hwinfo cpu hwinfo memory Commands: all Display all available information. system Display system hostname. chassis Display chassis information. cpu Display processor information. memory Display memory information. lmi> hwinfo chassis ERROR: invocation failed for host "https://192.168.10.124": 'NoneType' object has no attribute 'ChassisPackageType' There was 1 error: host https://192.168.10.124 (AttributeError) 'NoneType' object has no attribute 'ChassisPackageType' lmi> hwinfo system Hostname: localhost lmi> hwinfo cpu CPU: AMD Phenom(tm) II X3 715 Processor Topology: 1 cpu(s), 3 core(s), 3 thread(s) Max Freq: 0 MHz Arch: x86_64 lmi> hwinfo memory Memory: 7 GB Slots: N/A used, N/A total lmi> hwinfo chassis ERROR: invocation failed for host "https://192.168.10.124": 'NoneType' object has no attribute 'ChassisPackageType' There was 1 error: host https://192.168.10.124 (AttributeError) 'NoneType' object has no attribute 'ChassisPackageType' lmi> hwinfo cpu CPU: AMD Phenom(tm) II X3 715 Processor Topology: 1 cpu(s), 3 core(s), 3 thread(s) Max Freq: 0 MHz Arch: x86_64 lmi> hwinfo memory Memory: 7 GB Slots: N/A used, N/A total lmi>
Thanks Russell for the information. Could you also attach the following from the RHEL-7 machine? * File dmidecode.out from: # dmidecode --dump-bin dmidecode.out * Output from following command executed in lmishell (c is connection): > c.root.cimv2.LMI_Chassis.instances()[0].properties_dict() And, does it work when you run lmi as a regular user? E.g.: $ whoami somebody_not_root $ lmi -nv -h 192.168.10.124 .... Thanks, peter
Created attachment 855044 [details] Dmidecode fromRHEL 7.0 Beta system
Running hwinfo against a remote RHEL 7.0 Beta system using lmi -nv -h 192.168.10.124 fails with "(AttributeError) 'NoneType' object has no attribute 'ChassisPackageType'" both when running as a regular user and when running as root. Running the individual hwinfo subcommands, the failure occurs with hwinfo chassis.
Chassis details from LMIShell: > c.root.cimv2.LMI_Chassis.instances()[0].properties_dict() NocaseDict({u'HotSwappable': None, u'Model': u'System Version', u'HealthState': None, u'CanBeFRUed': None, u'StatusDescriptions': None, u'Weight': None, u'ServiceDescriptions': None, u'Generation': None, u'PoweredOn': None, u'SerialNumber': u'Chassis Serial Number', u'Tag': u'Asset-1234567890', u'ServicePhilosophy': None, u'Height': None, u'CommunicationStatus': None, u'SecurityBreach': None, u'CableManagementStrategy': None, u'PartNumber': None, u'VendorCompatibilityStrings': None, u'SKU': '', u'OtherIdentifyingInfo': None, u'MultipleSystemSupport': None, u'Caption': u'System Chassis', u'NumberOfPowerCords': 1L, u'VendorEquipmentType': None, u'ChassisTypes': None, u'RemovalConditions': 2L, u'OtherInputCurrentType': None, u'Version': u'Chassis Version', u'Removable': None, u'VisibleAlarm': None, u'Status': None, u'DetailedStatus': None, u'Description': u'This object represents physical chassis of the system.', u'UserTracking': None, u'ChassisPackageType': 3L, u'OperationalStatus': None, u'Replaceable': None, u'HeatGeneration': None, u'ManufactureDate': None, u'InputVoltage': None, u'IsLocked': None, u'InstallDate': None, u'CreationClassName': u'LMI_Chassis', u'AudibleAlarm': None, u'OtherPackageType': None, u'Manufacturer': u'Chassis Manufacture', u'TypeDescriptions': None, u'ElementName': u'Desktop', u'InputCurrentType': None, u'Name': u'Desktop', u'InstanceID': u'LMI:LMI_Chassis:Asset-1234567890', u'PrimaryStatus': None, u'UUID': u'A044D9B3-40EE-DF11-864C-BCAEC5186012', u'ProductName': u'System Product Name', u'LockPresent': False, u'Depth': None, u'PackageType': 3L, u'OperatingStatus': None, u'CurrentRequiredOrProduced': None, u'RackMountable': None, u'BreachDescription': None, u'ChassisTypeDescription': None, u'Width': None})
Looks like a SELinux issue. Default RHEL 7.0 Beta configuration: fails setenforce 0: works setenforce 1: fails
Installed updated SELinux policy: selinux-policy/3.12.1/120.el7/noarch/selinux-policy-3.12.1-120.el7.noarch.rpm selinux-policy/3.12.1/120.el7/noarch/selinux-policy-targeted-3.12.1-120.el7.noarch.rpm With these changes the lmi hwinfo command now works with SELinux in enforcing mode.
Output of hwinfo after installing the updated SELinux policies: lmi> hwinfo username: pegasus password: INFO: Connected to 192.168.10.124 Hostname: localhost Chassis Type: Desktop Manufacturer: Chassis Manufacture Model: System Version (System Product Name) Serial Number: Chassis Serial Number Asset Tag: Asset-1234567890 CPU: AMD Phenom(tm) II X3 715 Processor Topology: 1 cpu(s), 3 core(s), 1 thread(s) Max Freq: 2800 MHz Arch: x86_64 Memory: 8 GB Slots: 4 used, N/A total
Thanks Russell. Now, the only problem left is this one: lmi> hwinfo ERROR: invocation failed for host "https://localhost": (1, u'CIM_ERR_FAILED: File "libComputerSystemProvider.so" was not found for provider module "ComputerSystemModule".') There was 1 error: host https://localhost CIM_ERR_FAILED: File "libComputerSystemProvider.so" was not found for provider module "ComputerSystemModule".: I'm reassigning this bug to Michal.
Pure pywbem reproducer: # first login as non-root su # then change to root cat >reproducer.py <<EOF #!/usr/bin/env python import pywbem conn = pywbem.PegasusUDSConnection() inames = conn.EnumerateInstanceNames('PG_ComputerSystem', namespace='root/cimv2') print inames[0]['Name'] EOF python reproducer.py
pywbem-0.7.0-25.20131121svn626.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/pywbem-0.7.0-25.20131121svn626.fc20
Package pywbem-0.7.0-25.20131121svn626.fc20: * should fix your issue, * was pushed to the Fedora 20 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pywbem-0.7.0-25.20131121svn626.fc20' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2014-3067/pywbem-0.7.0-25.20131121svn626.fc20 then log in and leave karma (feedback).
pywbem-0.7.0-25.20131121svn626.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.