Bug 1156256 - rhevh 7.0: Throw traceback error info when using "sosreport" command
Summary: rhevh 7.0: Throw traceback error info when using "sosreport" command
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node
Version: 3.5.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 3.5.0
Assignee: Anatoly Litovsky
QA Contact: Virtualization Bugs
URL:
Whiteboard: node
Depends On:
Blocks: rhevh-7.0
TreeView+ depends on / blocked
 
Reported: 2014-10-24 02:51 UTC by haiyang,dong
Modified: 2016-02-10 20:09 UTC (History)
13 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-11 21:05:01 UTC
oVirt Team: Node
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2015:0160 0 normal SHIPPED_LIVE ovirt-node bug fix and enhancement update 2015-02-12 01:34:52 UTC
oVirt gerrit 34906 0 master MERGED Moving the sos compilation after py fix Never

Description haiyang,dong 2014-10-24 02:51:58 UTC
Description of problem:
using "sosreport" command to collect diagnostic and configuration information from rhevh 7.0
failed with thrown traceback error info like follow:
[root@dhcp-66-73-195 admin]# sosreport 
Traceback (most recent call last):
  File "/sbin/sosreport", line 23, in <module>
    main(sys.argv[1:])
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1174, in main
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 538, in __init__
  File "/usr/lib/python2.7/site-packages/sos/policies/__init__.py", line 196, in get_tmp_dir
NameError: global name 'tempfile' is not defined


Version-Release number of selected component (if applicable):
rhev-hypervisor7-7.0-20141006.0.el7ev
ovirt-node-3.1.0-0.20.20141006gitc421e04.el7.noarch.rpm
sos-3.0-23.el7.noarch

How reproducible:
100% 
 
Steps to Reproduce:

Actual result:

Expect result:


Additional info:

Comment 1 Anatoly Litovsky 2014-11-06 20:54:34 UTC
Here is the problem .
This is the code that serach the correct policy
def _find_plugins_in_dir(self, path):
        if os.path.exists(path):
            py_files = list(find("*.py", path))
            pnames = self._get_plugins_from_list(py_files)
            if pnames:
                return pnames
            else:
                return []

It searches for .py modules
We have only .pyc modules.

Whats our policy ? 
return .py / fix code of sos / move the bug to sos people .

Comment 2 Anatoly Litovsky 2014-11-06 20:56:51 UTC
I see the patch in our code that adds pyc , checking if its still working in build

Comment 3 Anatoly Litovsky 2014-11-10 06:11:00 UTC
found the answer

Comment 7 haiyang,dong 2014-12-18 01:55:56 UTC
Test version:
rhev-hypervisor7-7.0-20141212.0.iso
ovirt-node-3.1.0-0.34.20141210git0c9c493.el7.noarch
sos-3.0-23.el7_0.4.noarch

Test Steps:
1.using "sosreport" command to collect diagnostic and configuration information from rhevh 7.0
[root@dhcp-9-55 admin]# sosreport 

sosreport (version 3.0)

This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp and may be provided to a Red Hat support representative.

Any information provided to Red Hat will be treated in accordance with
the published support policies at:

  https://access.redhat.com/support/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.

Press ENTER to continue, or CTRL-C to quit.

Please enter your first initial and last name [dhcp-9-55.nay.redhat.com]: 
Please enter the case number that you are generating this report for: 

glusterfs: no process found
glusterfsd: no process found
 Running plugins. Please wait ...

  Running 56/67: system...        system     
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 974, in collect
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 603, in collect
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 338, in do_copy_file_or_dir
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 294, in copy_dir
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 338, in do_copy_file_or_dir
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 294, in copy_dir
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 338, in do_copy_file_or_dir
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 293, in copy_dir
OSError: [Errno 19] No such device: '/proc/sys/fs/binfmt_misc'

  Running 67/67: yum...              
Creating compressed archive...

Your sosreport has been generated and saved in:
  /var/tmp/sosreport-dhcp-9-55.nay.redhat.com-20141218014645.tar.xz

The checksum is: 45a44bdea3b9c2465139bc5c2e36859d

Please send this file to your support representative.


Test results:
No NameError: global name 'tempfile' is not defined error info was thrown ,also
using "sosreport" command to collect diagnostic and configuration information from rhevh 7.0 successfully.

For error issue info "OSError: [Errno 19] No such device: '/proc/sys/fs/binfmt_misc'" was print during collecting diagnostic and configuration information by using "sosreport" command. I have report a new bug 1174133 to track it.

So this bug has been fixed, changed the status into "VERIFIED".

Comment 9 errata-xmlrpc 2015-02-11 21:05:01 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHEA-2015-0160.html


Note You need to log in before you can comment on or make changes to this bug.