Repository navigation
DMI inventory now skips sysfs files that cf-agent cannot read - #3240
Conversation
|
@cf-bottom Jenkins please :) |
|
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/15030/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-15030/ |
|
@cf-bottom Jenkins please :) |
|
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/15038/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-15038/ |
craigcomstock
left a comment
There was a problem hiding this comment.
maybe also mention why 3.22 in the commit comment.
a4b5851 to
f85fc2a
Compare
Some files in `/sys/devices/virtual/dmi/id/`, such as `product_serial`, are only readable by root. `fileexists()` lets `readfile()` run anyway, causing unprivileged agents to log a permission denied error. Instead we use `isreadable()` to guard the read. However, `isreadable()` is only available in CFEngine >= 3.22. Changelog: Title Signed-off-by: Lars Erik Wik <lars.erik.wik@northern.tech>
f85fc2a to
640062b
Compare
|
@cf-bottom Jenkins please :) |
|
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/15057/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-15057/ |
craigcomstock
left a comment
There was a problem hiding this comment.
get it green! looks good!
|
@cf-bottom Jenkins please :) |
|
Alright, I triggered a build: Jenkins: https://ci.cfengine.com/job/pr-pipeline/15092/ Packages: http://buildcache.cfengine.com/packages/testing-pr/jenkins-pr-pipeline-15092/ |
|
Backport to 3.24.x failed, manual backport needed: https://github.com/cfengine/masterfiles/actions/runs/43260187303 |
|
Backport to 3.27.x failed, manual backport needed: https://github.com/cfengine/masterfiles/actions/runs/43260187303 |
/sys/devices/virtual/dmi/id/, such asproduct_serial, are only readable by root. Thefileexists()guard letreadfile()run anyway, so unprivileged agents loggedCfReadFile: Error while reading file '/sys/devices/virtual/dmi/id/product_serial' (Permission denied).product_serial(e.g. the enterprisemasterfiles_acceptance_testsjob).isreadable(), like/sys/hypervisor/uuidfurther up. Older agents keepfileexists().🤖 Generated with Claude Code