mailx -a & -A behaviour is not consistent on different Linux flavours #19

Open
opened 2022-02-14 15:47:23 +01:00 by patrick · 1 comment
Owner

Example issue:

root@frodo:/etc/cron.d# /opt/hc/bin/check_health.sh --hc=check_linux_named_status --run --log-healthy --notify=mail --mail-to=weotf-support.be@siemens.com 
INFO: *** start of check_health.sh [--hc=check_linux_named_status --run --log-healthy --notify=mail --mail-to=weotf-support.be@siemens.com] ***
INFO: logging takes places in /var/opt/hc/check_health.sh.log
INFO: spawning child process with time-out of 60 secs for HC call [PID=28772]
INFO: logging/showing passed health checks
INFO: executed HC: check_linux_named_status [RC=0]
INFO: check_linux_named_status [STC=0]: named is running
INFO: check_linux_named_status [STC=1]: named configuration and/or zone files have syntax error(s) {named-checkconf -z} [FAIL_ID=20220214070300]
mailx: Invalid header: /var/opt/hc/events/2022-02/20220214070300/check_linux_named_status.stdout.log
mailx: Invalid header: /var/opt/hc/events/2022-02/20220214070300/check_linux_named_status.stderr.log
INFO: e-mail alert sent/queued to weotf-support.be@siemens.com: check_linux_named_status failed, FAIL_ID=20220214070300
INFO: performing cleanup ...
INFO: /var/tmp/.check_health.sh.lock lock directory removed
INFO: *** finish of check_health.sh [--hc=check_linux_named_status --run --log-healthy --notify=mail --mail-to=weotf-support.be@siemens.com] ***

On Debian mailx -a is supposed to be mailx -A when attaching files.

Example issue: ``` root@frodo:/etc/cron.d# /opt/hc/bin/check_health.sh --hc=check_linux_named_status --run --log-healthy --notify=mail --mail-to=weotf-support.be@siemens.com INFO: *** start of check_health.sh [--hc=check_linux_named_status --run --log-healthy --notify=mail --mail-to=weotf-support.be@siemens.com] *** INFO: logging takes places in /var/opt/hc/check_health.sh.log INFO: spawning child process with time-out of 60 secs for HC call [PID=28772] INFO: logging/showing passed health checks INFO: executed HC: check_linux_named_status [RC=0] INFO: check_linux_named_status [STC=0]: named is running INFO: check_linux_named_status [STC=1]: named configuration and/or zone files have syntax error(s) {named-checkconf -z} [FAIL_ID=20220214070300] mailx: Invalid header: /var/opt/hc/events/2022-02/20220214070300/check_linux_named_status.stdout.log mailx: Invalid header: /var/opt/hc/events/2022-02/20220214070300/check_linux_named_status.stderr.log INFO: e-mail alert sent/queued to weotf-support.be@siemens.com: check_linux_named_status failed, FAIL_ID=20220214070300 INFO: performing cleanup ... INFO: /var/tmp/.check_health.sh.lock lock directory removed INFO: *** finish of check_health.sh [--hc=check_linux_named_status --run --log-healthy --notify=mail --mail-to=weotf-support.be@siemens.com] *** ``` On Debian `mailx -a` is supposed to be `mailx -A` when attaching files.
patrick added the
bug
linux
debian+ubuntu
labels 2022-02-14 15:47:24 +01:00
patrick self-assigned this 2022-02-14 15:47:24 +01:00
Author
Owner

Fixed in f2e52dc4ff

Fixed in f2e52dc4ff
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kudos/check_health#19
No description provided.