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 1850534

Summary: Cinder logs not collected within OSP 16 env
Product: Red Hat Enterprise Linux 8 Reporter: jhardee
Component: sosAssignee: Pavel Moravec <pmoravec>
Status: CLOSED DUPLICATE QA Contact: Upgrades and Supportability <upgrades-and-supportability>
Severity: medium Docs Contact:
Priority: medium    
Version: 8.2CC: agk, agreentr, bmr, jschluet, khoes, plambri, sbradley
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.2   
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: 2020-09-22 19:52:55 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 jhardee 2020-06-24 13:01:34 UTC
Description of problem: 

Customer would like Cinder and Barbican logs to be included when running 'sosreport'.  They did mention that running 'sosreport --all-logs' the Cinder logs are attached but not Barbican.


Version-Release number of selected component (if applicable):
Openstack 16


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:

Running command 'sosreport' doesn't attach the Cinder and Barbican logs.


Expected results:

Running command 'sosreport' to include Cinder and Barbican logs.


Additional info:

Comment 1 Lee Yarwood 2020-07-08 10:28:17 UTC
Moving to the RHEL sos component as OSP no longer ships our own build.

(In reply to jhardee from comment #0)
> Description of problem: 
> 
> Customer would like Cinder and Barbican logs to be included when running
> 'sosreport'.  They did mention that running 'sosreport --all-logs' the
> Cinder logs are attached but not Barbican.

This is two separate issues.

- The openstack_Cinder plugin not being enabled on OSP 16 envs by default and requiring --all-logs.
- There being no support for collecting Barbican logs with sosreport.

For the latter you might want to create a fresh RFE.

> Version-Release number of selected component (if applicable):
> Openstack 16

Can you please include the version of sosreport being used.

> How reproducible:

> Steps to Reproduce:
> 1.
> 2.
> 3.

^ Always complete the template. Where is the customer running sosreports? I'm assuming the controllers but as which user etc?

> Actual results:
> 
> Running command 'sosreport' doesn't attach the Cinder and Barbican logs.
> 
> Expected results:
> 
> Running command 'sosreport' to include Cinder and Barbican logs.
> 
> Additional info:

Comment 2 Pavel Moravec 2020-07-10 09:00:38 UTC
More precise specification needed:

- since sosreport runs on a vast range of systems, we must identify when such logs should be captured by default. What would trigger automatic collection of the logfiles? Some package installed, some file present, some command executable, some kernel module loaded, or some service exists?

- what particular filepattern(s) we speak about? One file, also logrotated ones, one whole directory? Deal with me like I know nothing about OSP..

- what sizes of the file patterns to capture by default? Sos default is 25MB

- collect the files _only_ when --all-logs provided? Or (typical usage) collect them everytime wrt. given logsize limit, and when --all-logs is provided, collect whole directory or with no sizelimit

- could the logfiles contain some secret info (password, token, SSL key,..) we need to obfuscate? If so, provide ideally a regexp like 

replace   r"(\s*proxy_password\s=) (.*)"   by   r"\1 ********"

Comment 6 Allan Greentree 2020-08-12 23:36:29 UTC
From OpenStack support perspective, would like to see /var/log/containers/barbican logs included in "sosreport --all-logs" if openstack-barbican package is installed:

[stack@undercloud-0 ~]$ sudo yum info openstack-barbican

Last metadata expiration check: 0:00:11 ago on Wed 12 Aug 2020 07:27:41 PM EDT.
Available Packages
Name         : openstack-barbican
Version      : 9.0.1
Release      : 0.20200226142546.07be198.el8ost
Architecture : noarch
Size         : 13 k
Source       : openstack-barbican-9.0.1-0.20200226142546.07be198.el8ost.src.rpm
Repository   : openstack-16-for-rhel-8-x86_64-rpms
Summary      : OpenStack Barbican Key Manager
URL          : https://github.com/openstack/barbican
License      : ASL 2.0
Description  : Openstack Barbican provides a ReST API for securely storing,
             : provisioning and managing secrets. It is aimed at being
             : useful for all environments, including large ephemeral Clouds.
             : Clients can generate various types of secrets like symmetric
             : and asymmetric keys, passphrases and binary data.  This package
             : installs both the API and worker packages.

Each of the core OpenStack services installed on a system have their container logs captured in sosreports already, for example nova:

[heat-admin@compute-0 ~]$ sudo yum info openstack-nova-compute
Loaded plugins: product-id, search-disabled-repos, subscription-manager
This system is not registered with an entitlement server. You can use subscription-manager to register.
Installed Packages
Name        : openstack-nova-compute
...

[heat-admin@compute-0 ~]$ ls /var/log/containers/nova
nova-compute.log        nova-compute.log.12.gz  nova-compute.log.3.gz  nova-compute.log.7.gz
nova-compute.log.1      nova-compute.log.13.gz  nova-compute.log.4.gz  nova-compute.log.8.gz
nova-compute.log.10.gz  nova-compute.log.14.gz  nova-compute.log.5.gz  nova-compute.log.9.gz
nova-compute.log.11.gz  nova-compute.log.2.gz   nova-compute.log.6.gz  nova-manage.log

Comment 7 Pavel Moravec 2020-08-18 11:44:52 UTC
> - The openstack_Cinder plugin not being enabled on OSP 16 envs by default and requiring --all-logs.

I realised I forgot to ask "when openstack_cinder plugin should be also enabled, to be enabled by default on OSP 16?" How to identify I am on OSP 16 system with cinder ? Why

    packages = ('openstack-selinux',)

does not enable the plugin?



> - There being no support for collecting Barbican logs with sosreport.

Does plugin like:

/usr/lib/python2.7/site-packages/sos/plugins/openstack_barbican.py :



from sos.report.plugins import Plugin, RedHatPlugin


class OpenStackBarbican(Plugin):

    short_desc = 'OpenStack Barbican'
    plugin_name = "openstack_barbican"
    profiles = ('openstack', 'openstack_undercloud')

    def setup(self):
        self.add_copy_spec("/var/log/containers/barbican/")


class RedHatBarbican(OpenStackBarbican, RedHatPlugin):

    packages = ('openstack-barbican',)

    def setup(self):
        super(RedHatBarbican, self).setup()


match the requirements? 

(I dont understand the notes about --all-logs : --all-logs is sosreport common option, not specific to one plugin; one plugin cant enable the option; or do you want sosreport when detecting on OSP 16, it should enable --all-logs by default? Via using presets? Currently, OSP uses preset https://github.com/sosreport/sos/blob/master/sos/policies/redhat.py#L204-L207 )

Or do you mean that the two plugins (cinder and barbican) should behave like --all-logs is enabled ? I.e. collect whole directories and not only *.log files from them?

Comment 10 Pavel Moravec 2020-09-22 19:52:55 UTC
OK, it seems there is a broader feedback on "barbican logs under --all-logs only", so closing this BZ as dup of 1874295 that talks about the same aspects.

*** This bug has been marked as a duplicate of bug 1874295 ***

Comment 11 Pavel Moravec 2020-09-22 20:02:58 UTC

*** This bug has been marked as a duplicate of bug 1875604 ***