Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1365251

Summary: [RFE] SOS Reports Should Include /etc/os-net-config
Product: Red Hat Enterprise Linux 7 Reporter: Dan Sneddon <dsneddon>
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED ERRATA QA Contact: Jakub Heger <jheger>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.4CC: agk, bmr, dsneddon, gavin, jheger, lyarwood, mhradile, mschuppe, plambri, sbradley
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/sosreport/sos/pull/1088
Whiteboard:
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 18:00:19 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:

Description Dan Sneddon 2016-08-08 17:19:41 UTC
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 20:35:31 UTC
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 20:44:54 UTC
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 10:14:56 UTC
(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 14:18:01 UTC
(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 19:58:28 UTC
(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 07:53:40 UTC
RHEL7.3 has been released. Re-scheduling for potential inclusion in 7.4.

Comment 8 Pavel Moravec 2016-12-14 21:21:39 UTC
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 16:06:07 UTC
(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 11:22:59 UTC
(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 11:28:43 UTC
> 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 11:45:22 UTC
(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 15:16:10 UTC
Fixed via sos 3.5 rebase.

Comment 20 errata-xmlrpc 2018-04-10 18:00:19 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://access.redhat.com/errata/RHEA-2018:0963