ack-sel command is formatted incorrectly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
hw-health-charm |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
The ack-sel action has a formatting error that causes it to quietly fail.
When using the action, a typical output looks like:
```
$ juju run-action hw-health/669 ack-sel --wait
unit-hw-health-669:
UnitId: hw-health/669
id: "141747"
results:
message: Only SEL entries newer than 2021-06-28 will be considered
status: completed
timing:
completed: 2021-06-28 21:38:17 +0000 UTC
enqueued: 2021-06-28 21:38:17 +0000 UTC
started: 2021-06-28 21:38:17 +0000 UTC
```
Which seems to indicate success. However, Thruk catches that this action exits with code 1:
```
UNKNOWN: invalid sensor type '--date-
-> Execution of /usr/sbin/ipmi-sel failed with return code 1.
-> /usr/sbin/ipmi-sel was executed with the following parameters:
sudo /usr/sbin/ipmi-sel --output-
```
Manually running the above command works. Looking at it, the formatting is correct and there is no reason for --date-range to be mistaken as part of --exclude-
However, when looking at /etc/cron.
```
/etc/cron.d$ cat hwhealth_ipmi
3,8,13,
```
Here we can see that a space between --exclude-
I've replicated this behavior on a second hw-health unit running on a different host.
Related branches
- Tom Haddon (community): Abstain
- Edin S (community): Approve
- 🤖 prod-jenkaas-bootstack: Approve (continuous-integration)
- BootStack Reviewers: Pending requested
-
Diff: 1211 lines (+1154/-3)4 files modifiedMakefile (+3/-1)
check_ipmi_sensor_v3 (+1/-1)
dev/null (+0/-1)
src/files/ipmi/check_ipmi_sensor (+1150/-0)
Changed in charm-hw-health: | |
status: | Fix Committed → Fix Released |
milestone: | none → 21.07 |
add_date_ range_to_ cron_args( ) in class Ipmi (tools.py) seems to join the args with "," rather than spaces.
Would be good to reproduce the error with a unit test, then fix it. Seems that the actual cron text is different to the list of args.