Bug 1984095 - [RHOSP16.1] Smart plugin doesn't work for CAP_SYS_RAWIO capability missing.
Summary: [RHOSP16.1] Smart plugin doesn't work for CAP_SYS_RAWIO capability missing.
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: openstack-tripleo-heat-templates
Version: 16.1 (Train)
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: z8
: 16.1 (Train on RHEL 8.2)
Assignee: Matthias Runge
QA Contact: Leonid Natapov
URL:
Whiteboard:
: 1984544 (view as bug list)
Depends On:
Blocks: 1984544 1984555 1984556
TreeView+ depends on / blocked
 
Reported: 2021-07-20 16:41 UTC by Luigi Tamagnone
Modified: 2022-03-24 11:00 UTC (History)
10 users (show)

Fixed In Version: openstack-tripleo-heat-templates-11.3.2-1.20211007073513.29a02c1.el8ost
Doc Type: Release Note
Doc Text:
With this update the `CollectdContainerAdditionalCapAdd` variable is added to the deployment tool. This variable is a comma separated list of additional collectd container capabilities.
Clone Of:
: 1984544 1984555 (view as bug list)
Environment:
Last Closed: 2022-03-24 11:00:12 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-6330 0 None None None 2021-11-15 13:06:18 UTC
Red Hat Product Errata RHBA-2022:0986 0 None None None 2022-03-24 11:00:37 UTC

Description Luigi Tamagnone 2021-07-20 16:41:39 UTC
Description of problem:
Smart plugin could be configured via TripleO but doesn't work because CAP_SYS_RAWIO capability missing.


Version-Release number of selected component (if applicable):
Red Hat Openstack Platform 16.1 (RHOSP16.1)

How reproducible:
1. Configure YAML to have collecd with smart plugin
~~~
parameter_defaults:
    ExtraConfig:
      ceilometer::agent::polling::polling_interval: 5
      collectd::plugin::smart::disks: ['sda', 'sdb', 'sdc', 'sdd', 'sde']
      collectd::plugin::smart::ignoreselected: true
    EventPipelinePublishers:
      - gnocchi://?archive_policy=high
      - panko://
    CeilometerQdrPublishEvents: true
    CeilometerEnablePanko: true
    CollectdEnableLibpodstats: false
    PankoEventTTL: 604800
    MetricsQdrConnectors:
    - host: default-interconnect-5671-service-telemetry.apps.openshift-dev.ugent.be
      port: 443
      role: edge
      sslProfile: sslProfile
      verifyHostname: false
    CollectdExtraPlugins:
      - cgroups
      - smart
~~~

2. Deploy Openstack


Actual results:
The smart plugin is configured but through error for missing capability[1]

Expected results:
The smart plugin is configured

Additional info:
[1] 
collectd.log:
[2021-07-14 13:35:08] smart plugin: Running collectd as root, but the CAP_SYS_RAWIO capability is missing. The plugin's read function will probably fail. Is your init system dropping capabilities?
[2021-07-14 13:35:08] smart plugin: unable to open /dev/sda.

Comment 5 Leif Madsen 2021-07-22 16:07:15 UTC
*** Bug 1984544 has been marked as a duplicate of this bug. ***

Comment 6 Matthias Runge 2021-10-06 16:24:55 UTC
https://review.opendev.org/c/openstack/tripleo-heat-templates/+/809138

is merged in train now.

Comment 12 Matthias Runge 2022-02-23 06:52:02 UTC

To test this:

parameter_defaults:
    CollectdContainerAdditionalCapAdd: "CAP_SYS_RAWIO"

Comment 13 Leonid Natapov 2022-03-15 17:51:44 UTC
smart plugin successfully loaded
[2022-03-15 17:49:20] plugin_load: plugin "smart" successfully loaded.

Comment 18 errata-xmlrpc 2022-03-24 11:00:12 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 (Red Hat OpenStack Platform 16.1.8 bug fix and enhancement 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/RHBA-2022:0986


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