Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1365251 - [RFE] SOS Reports Should Include /etc/os-net-config
[RFE] SOS Reports Should Include /etc/os-net-config
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos (Show other bugs)
7.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Pavel Moravec
Jakub Heger
https://github.com/sosreport/sos/pull...
: FutureFeature
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-08-08 13:19 EDT by Dan Sneddon
Modified: 2018-04-10 14:01 EDT (History)
10 users (show)

See Also:
Fixed In Version: sos-3.5-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 14:00:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHEA-2018:0963 None None None 2018-04-10 14:01 EDT

  None (edit)
Description Dan Sneddon 2016-08-08 13:19:41 EDT
Description of problem:
Engineering frequently look at SOS reports when troubleshooting OpenStack Platform problems. Unfortunately, a directory containing templates for the network config are not included in the report.

Version-Release number of selected component (if applicable):
RHEL 7.3

Steps to Reproduce:
1. Generate SOS report

Actual results:
/etc/os-net-config directory is not included

Expected results:
/etc/os-net-config directory should be included in the report (if present)


Additional info:
os-net-config is a utility which is used by TripleO and the RHEL OSP installer to generate network configurations on remote hosts. During initial deployment, after PXE booting the deployment image the file /etc/os-net-config/config.json is written on the host, then os-net-config is run locally on the host. os-net-config configures the ifcfg and related files in /etc/sysconfig/network-scripts and activates the interfaces.

Without being able to view the original template in /etc/os-net-config from the SOS report, we often have to go back to the customer and request the additional config.json file from that directory. Adding that to the SOS report would be very helpful.

https://github.com/openstack/os-net-config
Comment 2 Pavel Moravec 2016-08-08 16:35:31 EDT
Thanks for raising the bug, though I have few questions to clarify.

How to identify we should collect the directory? Assuming sos is executed on arbitrary RHEL, Fedora, Ubuntu, Atomic, .. machine, is there some common denominator (like package presence) to identify the host is managed by Openstack? (if you are familiar with sos plugins - what plugin should capture the directory? or a new one? what enables it then?)

Can't the directory contain some sensitive information like a password, keyring or whatever else we should obfuscate before putting into the tarball?
Comment 3 Dan Sneddon 2016-08-08 16:44:54 EDT
The presence of the os-net-config RPM determines the presence of the /etc/os-net-config directory.

os-net-config.noarch              0.2.4-4.el7ost        @rhelosp-9.0-director-puddle

It is available in the OpenStack repositories, whether those are RDO or OSP.
Comment 4 Pavel Moravec 2016-08-09 06:14:56 EDT
(In reply to Dan Sneddon from comment #3)
> The presence of the os-net-config RPM determines the presence of the
> /etc/os-net-config directory.
> 
> os-net-config.noarch              0.2.4-4.el7ost       
> @rhelosp-9.0-director-puddle
> 
> It is available in the OpenStack repositories, whether those are RDO or OSP.

So I guess if and only if this package is installed on a machine, sosreport should collect /etc/os-net-config .

No command output is worth to be collected, just the directory content, right?

Could you please answer also if the directory can't contain any secret we should obfuscate?
Comment 5 Pavel Moravec 2016-11-04 10:18:01 EDT
(In reply to Pavel Moravec from comment #4)
> (In reply to Dan Sneddon from comment #3)
> > The presence of the os-net-config RPM determines the presence of the
> > /etc/os-net-config directory.
> > 
> > os-net-config.noarch              0.2.4-4.el7ost       
> > @rhelosp-9.0-director-puddle
> > 
> > It is available in the OpenStack repositories, whether those are RDO or OSP.
> 
> So I guess if and only if this package is installed on a machine, sosreport
> should collect /etc/os-net-config .
> 
> No command output is worth to be collected, just the directory content,
> right?
> 
> Could you please answer also if the directory can't contain any secret we
> should obfuscate?

Hi Dan,
kind reminder of the needinfo ;-)
Comment 6 Dan Sneddon 2016-11-04 15:58:28 EDT
(In reply to Pavel Moravec from comment #4)
> (In reply to Dan Sneddon from comment #3)
> > The presence of the os-net-config RPM determines the presence of the
> > /etc/os-net-config directory.
> > 
> > os-net-config.noarch              0.2.4-4.el7ost       
> > @rhelosp-9.0-director-puddle
> > 
> > It is available in the OpenStack repositories, whether those are RDO or OSP.
> 
> So I guess if and only if this package is installed on a machine, sosreport
> should collect /etc/os-net-config .
> 
> No command output is worth to be collected, just the directory content,
> right?
> 
> Could you please answer also if the directory can't contain any secret we
> should obfuscate?

No, there is no secret information there, only the config file (in JSON or YAML format), and possibly a mapping file (mapping.yaml). You are correct that we should collect that info if and only if the os-net-config RPM is installed. Thanks!
Comment 7 Pavel Moravec 2016-11-11 02:53:40 EST
RHEL7.3 has been released. Re-scheduling for potential inclusion in 7.4.
Comment 8 Pavel Moravec 2016-12-14 16:21:39 EST
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1250346 tripleo plugin(s) might collect that info as well.
Comment 9 Pavel Moravec 2017-02-18 11:06:07 EST
(In reply to Dan Sneddon from comment #6)
> You are correct
> that we should collect that info if and only if the os-net-config RPM is
> installed. Thanks!

Per https://bugzilla.redhat.com/show_bug.cgi?id=1250346#c15 , and since the os-net-config package is installed only on (some) OSP nodes, I would suggest not creating a dedicated sos plugin but rather collect the data in current plugins.

What types of OSP nodes have this package installed (and shall collect the config)? Here is a list of openstack_* plugins in sos to compare:

ceilometer
cinder
glance
heat
horizon
instack
ironic
keystone
neutron
nova
sahara
swift
trove
Comment 10 Pavel Moravec 2017-08-30 07:22:59 EDT
(In reply to Pavel Moravec from comment #9)
> (In reply to Dan Sneddon from comment #6)
> > You are correct
> > that we should collect that info if and only if the os-net-config RPM is
> > installed. Thanks!
> 
> Per https://bugzilla.redhat.com/show_bug.cgi?id=1250346#c15 , and since the
> os-net-config package is installed only on (some) OSP nodes, I would suggest
> not creating a dedicated sos plugin but rather collect the data in current
> plugins.
> 
> What types of OSP nodes have this package installed (and shall collect the
> config)? Here is a list of openstack_* plugins in sos to compare:
> 
> ceilometer
> cinder
> glance
> heat
> horizon
> instack
> ironic
> keystone
> neutron
> nova
> sahara
> swift
> trove

Maybe Lee knows?
Comment 11 Bryn M. Reeves 2017-08-30 07:28:43 EDT
> What types of OSP nodes have this package installed (and shall collect the
> config)? Here is a list of openstack_* plugins in sos to compare:

Doesn't really matter, surely?

We can just add a new plugin for the os-net-config component (since it's its own package and upstream project). If the package is present we collect for it.
Comment 12 Lee Yarwood 2017-08-30 07:45:22 EDT
(In reply to Bryn M. Reeves from comment #11)
> > What types of OSP nodes have this package installed (and shall collect the
> > config)? Here is a list of openstack_* plugins in sos to compare:
> 
> Doesn't really matter, surely?
> 
> We can just add a new plugin for the os-net-config component (since it's its
> own package and upstream project). If the package is present we collect for
> it.

Agreed, I don't see any harm in having a small separate plugin for os-net-config.
Comment 13 Pavel Moravec 2017-11-02 11:16:10 EDT
Fixed via sos 3.5 rebase.
Comment 20 errata-xmlrpc 2018-04-10 14:00:19 EDT
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://access.redhat.com/errata/RHEA-2018:0963

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