Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 2192995 - The mdadm service script fails due to 'open()' bit-rot
Summary: The mdadm service script fails due to 'open()' bit-rot
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: logwatch
Version: 38
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Frank Crawford
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-05-03 21:31 UTC by Brian Naasz
Modified: 2023-05-16 03:06 UTC (History)
2 users (show)

Fixed In Version: logwatch-7.8-2.fc38 logwatch-7.8-2.fc37 logwatch-7.8-2.fc36
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-16 01:20:54 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Brian Naasz 2023-05-03 21:31:51 UTC
mdadm service script fails silently due to the old way it calls the system's mdadm binary.  A simple change to the open call fixes this.

Reproducible: Always

Steps to Reproduce:
1. mdadm_enable_scan=1 LOGWATCH_DETAIL_LEVEL=9 perl /usr/share/logwatch/scripts/services/mdadm
2.
3.
Actual Results:  
script produces nothing and a 0 return code.

Expected Results:  
/dev/md/storage.glyffa.net:127 : clean 
	  Raid Level : raid6
	Good Devices : /dev/sdi1 /dev/sdh1 /dev/sdj1 /dev/sdg1
	      Spares : 1


Fix is:
-    open($mdadm, "<", "mdadm --detail --scan 2>/dev/null|")) {
+    open($mdadm, "-|", "mdadm --detail --scan")) {

Comment 1 Frank Crawford 2023-05-04 11:22:01 UTC
Okay, but I do need to look at backward compatibility.

Expect a few weeks before it gets out.

Comment 2 Fedora Update System 2023-05-07 08:16:26 UTC
FEDORA-2023-b5f2054930 has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2023-b5f2054930

Comment 3 Fedora Update System 2023-05-07 08:24:45 UTC
FEDORA-2023-78c92aea89 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2023-78c92aea89

Comment 4 Fedora Update System 2023-05-07 08:34:21 UTC
FEDORA-2023-e946893802 has been submitted as an update to Fedora 38. https://bodhi.fedoraproject.org/updates/FEDORA-2023-e946893802

Comment 5 Fedora Update System 2023-05-08 01:46:10 UTC
FEDORA-2023-78c92aea89 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-78c92aea89`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-78c92aea89

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 6 Fedora Update System 2023-05-08 02:04:01 UTC
FEDORA-2023-b5f2054930 has been pushed to the Fedora 36 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-b5f2054930`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-b5f2054930

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 7 Fedora Update System 2023-05-08 02:18:04 UTC
FEDORA-2023-e946893802 has been pushed to the Fedora 38 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2023-e946893802`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2023-e946893802

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 8 Fedora Update System 2023-05-16 01:20:54 UTC
FEDORA-2023-e946893802 has been pushed to the Fedora 38 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 9 Fedora Update System 2023-05-16 01:28:15 UTC
FEDORA-2023-78c92aea89 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 10 Fedora Update System 2023-05-16 03:06:05 UTC
FEDORA-2023-b5f2054930 has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.


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