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 1640141 - sosreport can't find /var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini
Summary: sosreport can't find /var/lib/config-data/puppet-generated/neutron/etc/neutro...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sos
Version: 7.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: rc
: 7.6
Assignee: Pavel Moravec
QA Contact: Miroslav Hradílek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-10-17 12:22 UTC by Noam Manos
Modified: 2019-08-06 13:15 UTC (History)
9 users (show)

Fixed In Version: sos-3.7-1.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 13:15:33 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github sosreport sos pull 1471 0 None closed [plugins] Decrease log verbosity when do_file_sub failed on missing file 2020-11-24 19:24:43 UTC
Red Hat Product Errata RHEA-2019:2295 0 None None None 2019-08-06 13:15:53 UTC

Description Noam Manos 2018-10-17 12:22:29 UTC
Description of problem:
sosreport in controller can't find /var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini - when running: sosreport --batch -o openstack_neutron

Version-Release number of selected component (if applicable):
OSP 14  2018-10-10.1

How reproducible:
Always

[heat-admin@controller-0 tmp]$ sudo sosreport --debug --batch -o openstack_neutron

sosreport (version 3.5)

This command will collect diagnostic and configuration information from
this Red Hat Enterprise Linux system and installed applications.

An archive containing the collected information will be generated in
/var/tmp/sos.q0u_MG and may be provided to a Red Hat support
representative.

Any information provided to Red Hat will be treated in accordance with
the published support policies at:

  https://access.redhat.com/support/

The generated archive may contain data considered sensitive and its
content should be reviewed by the originating organization before being
passed to any third party.

No changes will be made to system configuration.


 Setting up archive ...
 Setting up plugins ...
Not all environment variables set. Source the environment file for the user intended to connect to the OpenStack environment.
 Running plugins. Please wait ...

  Running 1/1: openstack_neutron...        

[plugin:openstack_neutron] regex substitution failed for '/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini' with: '[Errno 2] No such file or directory: '/var/tmp/sos.q0u_MG/sosreport-controller-0-20181017125905/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini''
Creating compressed archive...

Your sosreport has been generated and saved in:
  /var/tmp/sosreport-controller-0-20181017125905.tar.xz

The checksum is: 78b1c98c32a27a2072abfc78d0728edc

Please send this file to your support representative.

[heat-admin@controller-0 tmp]$ 

Steps to Reproduce:
1. Login to controller
2. sudo sosreport --debug --batch -o openstack_neutron

Actual results:
[plugin:openstack_neutron] regex substitution failed for '/var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini' with: '[Errno 2] No such file or directory

Expected results:
sosreport to collect openstack_neutron with no error

Additional info:

Comment 1 Martin Schuppert 2018-10-22 10:06:51 UTC
The issue is that we have a broken link outside the container:
[root@controller-0 ~]# ll /var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini 
lrwxrwxrwx. 1 root root 37 Oct 22 08:49 /var/lib/config-data/puppet-generated/neutron/etc/neutron/plugin.ini -> /etc/neutron/plugins/ml2/ml2_conf.ini

[root@controller-0 ~]# ll /etc/neutron/plugins/ml2/ml2_conf.ini
ls: cannot access /etc/neutron/plugins/ml2/ml2_conf.ini: No such file or directory

As this is mapped into the neutron container its ok inside:
[root@controller-0 ~]# docker exec -it -u root neutron_api ls -la /etc/neutron/plugin.ini
lrwxrwxrwx. 1 root root 37 Oct 22 09:00 /etc/neutron/plugin.ini -> /etc/neutron/plugins/ml2/ml2_conf.ini

Comment 3 Pavel Moravec 2018-10-24 11:04:00 UTC
> Expected results:
> sosreport to collect openstack_neutron with no error

So in case symlink target (here towards /etc/neutron/plugins/ml2/ml2_conf.ini outside the container) is missing, sosreport should raise a warning instead of an error? So it is just about log verbosity?

Definitely sosreport cant collect files it does not have access to. So until the "docker exec -it .." command is executed, sosreport wont collect (or further scrub secret info in) the file. And sosreport should warn in some way something unexpectedly failed.

Do you suggest change in:
- no log on stdout/stderr
- sos_logs will contain a warning (not print to stdout) instead of error (that is print to stdout)
- BUT the change will apply only for "[Errno 2] No such file or directory" error type - since we must warn the user running sosreport (customer) in case we collect some file but some password obfuscation failed - so they might be leaking some secret info by providing the sosreport archive

Does this change make sense?

Comment 4 Pavel Moravec 2018-10-24 11:09:53 UTC
(note to myself: reproducer for me:

1) on a system without grafana installed:

mkdir /etc/grafana
ln -s /etc/grafana/grafana.ini-missing /etc/grafana/grafana.ini
sosreport -o grafana --batch --build

(and the problem happens on self.do_path_regex_sub called for (broken) _symlinks_ only)

)

Comment 5 Noam Manos 2018-10-24 15:36:04 UTC
(In reply to Pavel Moravec from comment #3)
> > Expected results:
> > sosreport to collect openstack_neutron with no error
> 
> So in case symlink target (here towards
> /etc/neutron/plugins/ml2/ml2_conf.ini outside the container) is missing,
> sosreport should raise a warning instead of an error? So it is just about
> log verbosity?
> 
> Definitely sosreport cant collect files it does not have access to. So until
> the "docker exec -it .." command is executed, sosreport wont collect (or
> further scrub secret info in) the file. And sosreport should warn in some
> way something unexpectedly failed.
> 
> Do you suggest change in:
> - no log on stdout/stderr
> - sos_logs will contain a warning (not print to stdout) instead of error
> (that is print to stdout)
> - BUT the change will apply only for "[Errno 2] No such file or directory"
> error type - since we must warn the user running sosreport (customer) in
> case we collect some file but some password obfuscation failed - so they
> might be leaking some secret info by providing the sosreport archive
> 
> Does this change make sense?


Warning is good if it's not revealing other problem. I believe that the fix than should be in the broken link, unless it's OK to have this broken link:

 [root@controller-0 ~]# ll /etc/neutron/plugins/ml2/ml2_conf.ini ls: cannot access /etc/neutron/plugins/ml2/ml2_conf.ini: No such file or directory

Comment 6 Martin Schuppert 2018-10-24 15:40:22 UTC
(In reply to Noam Manos from comment #5)
> (In reply to Pavel Moravec from comment #3)
> > > Expected results:
> > > sosreport to collect openstack_neutron with no error
> > 
> > So in case symlink target (here towards
> > /etc/neutron/plugins/ml2/ml2_conf.ini outside the container) is missing,
> > sosreport should raise a warning instead of an error? So it is just about
> > log verbosity?
> > 
> > Definitely sosreport cant collect files it does not have access to. So until
> > the "docker exec -it .." command is executed, sosreport wont collect (or
> > further scrub secret info in) the file. And sosreport should warn in some
> > way something unexpectedly failed.
> > 
> > Do you suggest change in:
> > - no log on stdout/stderr
> > - sos_logs will contain a warning (not print to stdout) instead of error
> > (that is print to stdout)
> > - BUT the change will apply only for "[Errno 2] No such file or directory"
> > error type - since we must warn the user running sosreport (customer) in
> > case we collect some file but some password obfuscation failed - so they
> > might be leaking some secret info by providing the sosreport archive
> > 
> > Does this change make sense?
> 
> 
> Warning is good if it's not revealing other problem. I believe that the fix
> than should be in the broken link, unless it's OK to have this broken link:
> 
>  [root@controller-0 ~]# ll /etc/neutron/plugins/ml2/ml2_conf.ini ls: cannot
> access /etc/neutron/plugins/ml2/ml2_conf.ini: No such file or directory

I'd also vote for log it as warning. It's ok to have the broken link as it is a
good link inside the container as this is the config volume mapped into the container.

Comment 7 Pavel Moravec 2018-11-05 09:33:38 UTC
Technically, it must be info verbosity and to warning (as I learned now) - also warning is printed to stdout the same way.

Anyway, the change is reasonable either way, PR raised.

Comment 8 Pavel Moravec 2019-03-18 21:20:03 UTC
POSTed to upstream

Comment 12 errata-xmlrpc 2019-08-06 13:15:33 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-2019:2295


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