Repository navigation
Tags
Tags
fix: stop spamming error logs for disks without block dev queue stats
not all devices have them. fixes errors such as this:
```
[root@testbox-arch /]# journalctl -ex -u mango.service --no-pager | grep -i 'no such'
Jul 28 18:52:50 testbox-arch mango[79]: {"time":"2024-07-28T18:52:50.862645518Z","level":"ERROR","msg":"Failed to get queue stats for block device","hostname":{"system":"testbox-arch","inventory":"testbox-arch"},"worker":"manager","manager":{"inventory":"/opt/mango/inventory","hostname":"testbox-arch","enrolled":true,"runID":"01J3XB0DSDX99FXHCJ79JM2HGE"},"metadata_collector":"storage","err":"open /sys/block/zram0/queue/nr_requests: no such file or directory","device":"zram0"}
Jul 28 18:52:52 testbox-arch mango[79]: {"time":"2024-07-28T18:52:52.922005911Z","level":"ERROR","msg":"Failed to get queue stats for block device","hostname":{"system":"testbox-arch","inventory":"testbox-arch"},"worker":"manager","manager":{"inventory":"/opt/mango/inventory","hostname":"testbox-arch","enrolled":true,"runID":"01J3XB0FSQ6BPT9FP6ZXMJ78GT"},"metadata_collector":"storage","err":"open /sys/block/zram0/queue/nr_requests: no such file or directory","device":"zram0"}
Jul 28 18:52:54 testbox-arch mango[79]: {"time":"2024-07-28T18:52:54.975231863Z","level":"ERROR","msg":"Failed to get queue stats for block device","hostname":{"system":"testbox-arch","inventory":"testbox-arch"},"worker":"manager","manager":{"inventory":"/opt/mango/inventory","hostname":"testbox-arch","enrolled":true,"runID":"01J3XB0HSWH4Y8BTAWD04T4875"},"metadata_collector":"storage","err":"open /sys/block/zram0/queue/rq_affinity: no such file or directory","device":"zram0"}
Jul 28 18:52:57 testbox-arch mango[79]: {"time":"2024-07-28T18:52:57.018631108Z","level":"ERROR","msg":"Failed to get queue stats for block device","hostname":{"system":"testbox-arch","inventory":"testbox-arch"},"worker":"manager","manager":{"inventory":"/opt/mango/inventory","hostname":"testbox-arch","enrolled":true,"runID":"01J3XB0KSQKTX1EK7MVDXT5VRB"},"metadata_collector":"storage","err":"open /sys/block/zram0/queue/rq_affinity: no such file or directory","device":"zram0"}
```
feat(manager): add support for host/group/role template files This expands the support for inventory defined template (`templates/*.tpl`) files to also expose inventory templates that have been defined in the group, role, and host components to the module during templating
fix(build): fix env var usage in packaged systemd unit file From docs (https://www.freedesktop.org/software/systemd/man/latest/systemd.service.html#Command%20lines): > Basic environment variable substitution is supported. Use "${FOO}" as part of a word, or as a word of its own, on the command line, in which case it will be erased and replaced by the exact value of the environment variable (if any) including all whitespace it contains, always resulting in exactly a single argument. Use "$FOO" as a separate word on the command line, in which case it will be replaced by the value of the environment variable split at whitespace, resulting in zero or more arguments. For this type of expansion, quotes are respected when splitting into words, and afterwards removed. Using curly brackets was causing this to be interpeted by mango as a single massive command line arg. We want splitting here.
fix(manager): don't shadow module test script exit code This was redeclaring the `testRC` var defined in the outer scope. The `err` var already exists in this scope from the prior calls, so both of these vars can be updated to just assignment, no declaration needed (and thus no shadowing). This preserves the test script's exit code, rather than always returning 0 because it was in the wrong scope.
PreviousNext