Bug 1443506

Summary: samba plugin fails to collect wbinfo
Product: Red Hat Enterprise Linux 7 Reporter: Miroslav Hradílek <mhradile>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED CURRENTRELEASE QA Contact: Miroslav Hradílek <mhradile>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: agk, bmr, gavin, plambri, sbradley
Target Milestone: rc   
Target Release: 7.4   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-10 20:23:15 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: 1438257    
Bug Blocks:    

Description Miroslav Hradílek 2017-04-19 11:51:23 UTC
Description of problem:
There was a bug 997101 requesting sosreport to collect domain restricted 'wbinfo' command output. But after rebase to 3.4, it no longer collects wbinfo at all.

Version-Release number of selected component (if applicable):
Unreleased! sos-3.4-1.el7.noarch

How reproducible:
100%

Steps to Reproduce:
1. sosreport -o samba --batch
2. tar -tf /var/tmp/sosreport-*.tar.xz

Actual results:
No wbinfo collected.

Expected results:
Command outputs of "wbinfo --domain='.' -g" and "wbinfo --domain='.' -u" should be collected.

Additional info:
The plugin samba.py contains the requiored lines but the command outputs don't make it to the archive for some reason.

-v -v -v output of sos suggests their collection though...
 Setting up archive ...
[archive:TarFileArchive] initialised empty FileCacheArchive at '/var/tmp/sos.P6Gv1U/sosreport-hp-dl165g7-03.lab.eng.brq.redhat.com-20170328212510'
[sos.sosreport:setup] executing 'sosreport -o samba -v --batch'
 Setting up plugins ...
[plugin:samba] added cmd output 'wbinfo --domain='.' -g'
[plugin:samba] added cmd output 'wbinfo --domain='.' -u'
[plugin:samba] added cmd output 'testparm -s'
 Running plugins. Please wait ...

  Running 1/1: samba...        
[plugin:samba] collecting path '/etc/samba/lmhosts'
[plugin:samba] collecting path '/etc/sysconfig/samba'
[plugin:samba] collecting path '/etc/samba/smb.conf'
[plugin:samba] collecting output of 'wbinfo --domain='.' -g'
[plugin:samba] collecting output of 'wbinfo --domain='.' -u'
[plugin:samba] collecting output of 'testparm -s'

Comment 3 Bryn M. Reeves 2017-04-19 12:28:49 UTC
Do you have the samba-winbind-clients package installed?

I think these commands were moved there from the main samba-clients RPM some time ago.

The output you have above does not look like '-vvv' - you are missing command tuple messages from the plugin, and any messages from archive/TarArchive - I suspect with more '-v' you would also see:

[plugin:samba] collecting output of 'wbinfo --domain='.' -u'
[plugin:samba] command 'wbinfo' not found in / - re-trying in host root
[plugin:samba] could not run 'wbinfo --domain='.' -u': command not found

(the 2nd message is a minor bug but nothing to worry about - we should not retry if we are not in a container, but the cost is effectively zero).

Comment 5 Pavel Moravec 2017-04-19 14:08:45 UTC
I think this is dup of bz1438257 / the fix is common to both BZs. Anyway since the symptoms are absolutely different, I leave this BZ open to re-check on a build fixing the bz1438257.

Comment 7 Pavel Moravec 2017-08-10 20:23:15 UTC
This bug shall be fixed in package:

sos-3.4-6.el7.noarch.rpm

available via errata:

https://access.redhat.com/errata/RHBA-2017:2331


Thus I am closing this bug report.