Red Hat Bugzilla – Bug 1365251
[RFE] SOS Reports Should Include /etc/os-net-config
Last modified: 2018-04-10 14:01:23 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
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?
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.
(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?
(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 ;-)
(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!
RHEL7.3 has been released. Re-scheduling for potential inclusion in 7.4.
See also: https://bugzilla.redhat.com/show_bug.cgi?id=1250346 tripleo plugin(s) might collect that info as well.
(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
(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?
> 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.
(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.
Fixed via sos 3.5 rebase.
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