#2479 Issue closed
: zero exit code and ERROR at same time¶
Labels: support / question
, fixed / solved / done
geksi opened issue at 2020-08-14 15:02:¶
Relax-and-Recover (ReaR) Issue Template¶
Fill in the following items before submitting a new issue
(quick response is not guaranteed with free support):
-
ReaR version ("/usr/sbin/rear -V"):
2.4 -
OS version ("cat /etc/os-release" or "lsb_release -a" or "cat /etc/rear/os.conf"):
RHEL 7.8 -
Hardware (PC or PowerNV BareMetal or ARM) or virtual machine (KVM guest or PoverVM LPAR):
VMware -
System architecture (x86 compatible or PPC64/PPC64LE or what exact ARM device):
x86 -
Description of the issue (ideally so that others can reproduce it):
Not sure, if it is a bug...
rear mkrescue generates multiple errors (s. below) and writes "rear mkrescue finished with zero exit code" to the
/var/log/messages
at the same time.
On the other hand, according to the monitoring guidelines the logfile
should be monitored for "ERROR" strings:
https://github.com/rear/rear/blob/master/doc/user-guide/05-integration.adoc
This causes the "rear mkrescue" to be marked as "failed" in monitoring tool even though a rescue image was created.
modinfo: ERROR: Module nls_cp437 not found.
modinfo: ERROR: Module af_packet not found.
modinfo: ERROR: Module unix not found.
modinfo: ERROR: Module usbcore not found.
modinfo: ERROR: Module usbhid not found.
modinfo: ERROR: Module ide_cd not found.
modinfo: ERROR: Module uhci_hcd not found.
modinfo: ERROR: Module ehci_hcd not found.
modinfo: ERROR: Module xhci_hcd not found.
modinfo: ERROR: Module ohci_hcd not found.
modinfo: ERROR: Module zlib-inflate not found.
modinfo: ERROR: Module zlib-deflate not found.
- Workaround, if any:
MODULES=( 'all_modules' )
But for it more space is needed in $TMPDIR (must be extended from 3 GB to 4 GB) to avoid "no space left on device"
gdha commented at 2020-08-17 09:24:¶
@geksi The 'modinfo' ERRORS are no fatal errors if you do not use these kernel modules (most likely). I agree the messages are misleading and perhaps we better use a different kind of message - any suggestion?
Also, be aware, that you can define another TMPDIR location in the
/etc/rear/local.conf
file:
export TMPDIR=/to/filesystem/with/plenty/of/space
@jsmeix Your input is more then welcome - no rush for now as you are on a holiday break.
jsmeix commented at 2020-08-18 11:13:¶
Only FYI before I actually do my "stay away from the Internet vacation":
I think modinfo: ERROR: Module ... not found.
messages are not from
ReaR
but stderr (or stdout) messages from modinfo
that appear in ReaR's
log
because stderr and stdout are always redirected into the log
cf. "What to do with stdin, stdout, and stderr" in
https://github.com/rear/rear/wiki/Coding-Style
As long as ReaR's exit code is zero there is no error from ReaR.
In case of "rear checklayout" ReaR's exit code could be even 1
when all was OK with ReaR
cf.
https://github.com/rear/rear/blob/master/usr/sbin/rear#L583
I think this issue is essentially same as
https://github.com/rear/rear/issues/2473
Both issues are example cases of our general issue
https://github.com/rear/rear/issues/2416
jsmeix commented at 2020-08-18 11:36:¶
@geksi
I think your specific modinfo: ERROR: Module ... not found
issue
might be perhaps already fixed in current ReaR upstream master code
via
https://github.com/rear/rear/pull/2469
(see also
https://github.com/rear/rear/issues/2414)
cf. "Testing current ReaR upstream GitHub master code" in
https://en.opensuse.org/SDB:Disaster_Recovery
jsmeix commented at 2020-08-18 12:13:¶
Regarding https://github.com/rear/rear/blob/master/doc/user-guide/05-integration.adoc
We also monitor the /var/log/rear/rear-system.log file
for ERROR: and BUG BUG BUG strings, so that in case
of problems the operator is notified immediately.
The Error() function does
PrintError "ERROR: $*"
...
Log "ERROR: $*"
LogToSyslog "ERROR: $*"
cf.
https://github.com/rear/rear/blob/master/usr/share/rear/lib/_input-output-functions.sh#L551
and subsequent lines
but the BugError() function does no longer show "BUG BUG BUG" but only
"BUG"
Error "
====================
BUG in $caller_source:
'$@'
cf.
https://github.com/rear/rear/blob/master/usr/share/rear/lib/_input-output-functions.sh#L695
so I adapted and enhanced doc/user-guide/05-integration.adoc right now
via
https://github.com/rear/rear/commit/a956a15af6b59f04344647be1f7b5c6217d1eca8
gdha commented at 2020-08-28 14:19:¶
@geksi is your question sufficient answered?
geksi commented at 2020-08-31 11:38:¶
Yes, thank you!
[Export of Github issue for rear/rear.]