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 1124497 - /etc/rc.d/init.d/netconsole doesn't check for /proc/modules
Summary: /etc/rc.d/init.d/netconsole doesn't check for /proc/modules
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: initscripts
Version: 7.2
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-29 15:50 UTC by felix.krohn
Modified: 2016-11-25 13:06 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-18 08:46:45 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
adds a check for /proc/modules before the lsmod invocation in status() (558 bytes, patch)
2014-07-29 17:16 UTC, felix.krohn
no flags Details | Diff

Description felix.krohn 2014-07-29 15:50:51 UTC
Description of problem:
When a (non-RHEL) non-modular kernel is booted, "service --status-all" yields an error:

# service --status-all
libkmod: kmod_module_new_from_loaded: could not open /proc/modules: No such file or directory
Error: could not get list of modules: No such file or directory
netconsole module not loaded
Configured devices:
lo eth0
Currently active devices:
lo eth0


Source of the problem is in /etc/rc.d/init.d/netconsole, line 110, function status(): lsmod is executed without checking if /proc/modules exists beforehand.

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


How reproducible:
100%

Steps to Reproduce:
1. boot a non-modular kernel
2. # service --status-all
3.

Actual results:
Error

Expected results:
no Error

Additional info:

Comment 2 felix.krohn 2014-07-29 17:16:09 UTC
Created attachment 922237 [details]
adds a check for /proc/modules before the lsmod invocation in status()

minimal patch

Comment 3 Lukáš Nykrýn 2014-07-30 06:48:44 UTC
At beginning I must note that we do not support non-RHEL kernels.

And also there should be something like
+        else
+                echo $"/proc/modules does not exists"
+                RETVAL=3

because otherwise you will get false return value.


But the main reason why I want to close this as notabug is that it yields that there is an error because there is one.


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