Bug 1281802

Summary: [networking] NetworkManager version mismatch causes ValueError
Product: Red Hat Enterprise Linux 7 Reporter: Lee Yarwood <lyarwood>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Miroslav HradĂ­lek <mhradile>
Severity: low Docs Contact:
Priority: low    
Version: 7.2CC: agk, aiyengar, bmr, dkutalek, forestia, gavin, isenfeld, mhradile, pdwyer, plambri, sbradley, steve.traylen
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
URL: https://github.com/sosreport/sos/issues/710
Whiteboard:
Fixed In Version: sos-3.3-0.el7 Doc Type: Bug Fix
Doc Text:
Prior to this update, the networking plug-in for the sos utility raised an error about unexpected exception when version of running NetworkManager did not correspond to nmcli command version. With this update, this corner case is properly handled in code, and no further exception is raised.
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 04:55:42 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1203710, 1298112, 1313485    
Attachments:
Description Flags
sos.log
none
networking-plugin-errors.txt none

Description Lee Yarwood 2015-11-13 12:52:21 UTC
Description of problem:

RHEL 7.1 minimal install yum update'd to 7.2 encounters the following error due to a mismatch in nmcli and NetworkManager versions printing a warning :

sos_logs/sos.log

2015-11-13 07:31:34,470 INFO: [plugin:networking] collecting output of 'nmcli con show conf 'Warning: nmcli (1.0.6) and NetworkManager (1.0.0) versions don't match. Use --nocheck to suppress the warning.''
2015-11-13 07:31:34,472 ERROR: caught exception in plugin method "networking.collect()"
2015-11-13 07:31:34,472 ERROR: writing traceback to sos_logs/networking-plugin-errors.txt

sos_logs/networking-plugin-errors.txt
 
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/sos/sosreport.py", line 1242, in collect
    plug.collect()
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 716, in collect
    self._collect_cmd_output()
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 695, in _collect_cmd_output
    stderr=stderr, chroot=chroot, runat=runat)
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 633, in get_cmd_output_now
    chroot=chroot, runat=runat)
  File "/usr/lib/python2.7/site-packages/sos/plugins/__init__.py", line 525, in get_command_output
    chroot=root, chdir=runat)
  File "/usr/lib/python2.7/site-packages/sos/utilities.py", line 149, in sos_get_command_output
    args = shlex.split(command)
  File "/usr/lib64/python2.7/shlex.py", line 279, in split
    return list(lex)
  File "/usr/lib64/python2.7/shlex.py", line 269, in next
    token = self.get_token()
  File "/usr/lib64/python2.7/shlex.py", line 96, in get_token
    raw = self.read_token()
  File "/usr/lib64/python2.7/shlex.py", line 172, in read_token
    raise ValueError, "No closing quotation"
ValueError: No closing quotation

Version-Release number of selected component (if applicable):
sos-3.2-36.el7ost.1 AKA sos-3.2-35.el7 + RHEL OSP patches.

How reproducible:
Always if versions don't match.

Steps to Reproduce:
1. Cause a version mismatch between nmcli and NetworkManager.
2. Attempt to collect `sosreport -o networking`

Actual results:
The networking plugin fails.

Expected results:
The networking plugin suppresses the warning.

Additional info:

Comment 1 Lee Yarwood 2015-11-13 12:53:11 UTC
Created attachment 1093630 [details]
sos.log

Comment 2 Lee Yarwood 2015-11-13 12:53:47 UTC
Created attachment 1093631 [details]
networking-plugin-errors.txt

Comment 9 Pavel Moravec 2015-12-30 15:30:21 UTC
Lee, Nitin, could you check if you hit https://bugzilla.redhat.com/show_bug.cgi?id=1291785 / esp. reproducer https://bugzilla.redhat.com/show_bug.cgi?id=1291785#c3 ?

Anyway, to make sos more robust, I filed upstream https://github.com/sosreport/sos/issues/710 .

Comment 11 Pavel Moravec 2016-02-21 08:26:35 UTC
upstream commit:

51fa0e3a53b6da46cf66dee20850b0eac31cf05f

Comment 12 Mike McCune 2016-03-28 23:20:28 UTC
This bug was accidentally moved from POST to MODIFIED via an error in automation, please see mmccune with any questions

Comment 18 errata-xmlrpc 2016-11-04 04:55:42 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/RHBA-2016-2380.html