Bug 2167431 - OSP17.1 | Collectd hugepages plugin complains about not being able to open file
Summary: OSP17.1 | Collectd hugepages plugin complains about not being able to open file
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: collectd
Version: 17.1 (Wallaby)
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: beta
: 17.1
Assignee: Yadnesh Kulkarni
QA Contact: Leonid Natapov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-06 15:55 UTC by Leonid Natapov
Modified: 2023-08-16 01:14 UTC (History)
7 users (show)

Fixed In Version: collectd-5.12.0-10.el9ost
Doc Type: Bug Fix
Doc Text:
Before this update, the collectd hugepages plugin would report a failure message when attempting to access a new file in Red Hat Enterprise Linux (RHEL) 9 called `demote`. Now, collectd avoids reading this file and the failure message is suppressed.
Clone Of:
Environment:
Last Closed: 2023-08-16 01:13:41 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github collectd collectd pull 4091 0 None Merged Hugepages plugin skips reading write-only file 2023-03-02 14:08:30 UTC
Red Hat Issue Tracker OSP-22093 0 None None None 2023-02-06 15:55:35 UTC
Red Hat Product Errata RHEA-2023:4577 0 None None None 2023-08-16 01:14:03 UTC

Description Leonid Natapov 2023-02-06 15:55:14 UTC
OSP17.1 | Collectd hugepages plugin complains about not being able to open file

OSP17.1 on RHEL9

collectd.log file shows:
------------------------
[2023-02-06 13:54:19] plugin_load: plugin "hugepages" successfully loaded.

[2023-02-06 13:54:54] hugepages: cannot open /sys/kernel/mm/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:54:54] hugepages: cannot open /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:54:59] hugepages: cannot open /sys/kernel/mm/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:54:59] hugepages: cannot open /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:55:04] hugepages: cannot open /sys/kernel/mm/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:55:04] hugepages: cannot open /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:55:09] hugepages: cannot open /sys/kernel/mm/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:55:09] hugepages: cannot open /sys/devices/system/node/node0/hugepages/hugepages-1048576kB/demote
[2023-02-06 13:55:14] hugepages: cannot open /sys/kernel/mm/hugepages/hugepages-1048576kB/demote
------------------------

Same issue was reported here:
https://github.com/collectd/collectd/issues/3993

Comment 1 Leonid Natapov 2023-02-07 15:00:45 UTC
OSP16.2 RHEL 8.4  /sys/kernel/mm/hugepages/
-------


[root@ctrl-0-16-2 hugepages-1048576kB]# ls -al
total 0
drwxr-xr-x. 2 root root    0 Jan 25 04:23 .
drwxr-xr-x. 4 root root    0 Jan 25 04:23 ..
-r--r--r--. 1 root root 4096 Jan 25 04:23 free_hugepages
-rw-r--r--. 1 root root 4096 Jan 30 17:43 nr_hugepages
-rw-r--r--. 1 root root 4096 Jan 30 17:43 nr_hugepages_mempolicy
-rw-r--r--. 1 root root 4096 Jan 31 21:24 nr_overcommit_hugepages
-r--r--r--. 1 root root 4096 Jan 30 17:43 resv_hugepages
-r--r--r--. 1 root root 4096 Jan 30 17:43 surplus_hugepages


OSP17.1 RHEL 9.2. /sys/kernel/mm/hugepages/
----------------
[root@controller-0 hugepages-1048576kB]# ls -al
total 0
drwxr-xr-x. 2 root root    0 Feb  6 13:54 .
drwxr-xr-x. 4 root root    0 Feb  6 12:51 ..
--w-------. 1 root root 4096 Feb  6 13:54 demote
-rw-r--r--. 1 root root 4096 Feb  6 13:54 demote_size
-r--r--r--. 1 root root 4096 Feb  6 13:54 free_hugepages
-rw-r--r--. 1 root root 4096 Feb  6 13:54 nr_hugepages
-rw-r--r--. 1 root root 4096 Feb  6 13:54 nr_hugepages_mempolicy
-rw-r--r--. 1 root root 4096 Feb  6 13:54 nr_overcommit_hugepages
-r--r--r--. 1 root root 4096 Feb  6 13:54 resv_hugepages
-r--r--r--. 1 root root 4096 Feb  6 13:54 surplus_hugepages

Comment 4 Yadnesh Kulkarni 2023-02-21 09:04:07 UTC
According to [1] the write-only permission on "demote" file is expected. 
~~~
demote
is used to demote a number of huge pages. A user with root privileges can write to this file. It may not be possible to demote the requested number of huge pages. To determine how many pages were actually demoted, compare the value of nr_hugepages before and after writing to the demote interface. demote is a write only interface.
~~~

[1] https://docs.kernel.org/admin-guide/mm/hugetlbpage.html

Comment 11 Leonid Natapov 2023-05-29 14:54:56 UTC
collectd-5.12.0-10.el9ost.x86_64

Fixed. No hugepages logs in collectd.log file anymore.

Comment 21 errata-xmlrpc 2023-08-16 01:13:41 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 (Release of components for Red Hat OpenStack Platform 17.1 (Wallaby)), 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-2023:4577


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