Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TPM Sysfs jobs all refer to a seemingly nonexistent resources scrip #1190

Open
bladernr opened this issue Apr 16, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@bladernr
Copy link
Collaborator

Bug Description

While trying to see if we have a programmatic way to determine if a TPM exists on a machine, I looked at the TPM jobs in the base provider. I discovered that in providers/base/units/tpm/ there's a sysfs.pxu that lists several jobs that are supposed to get data from sysfs about installed TPMs.

Several of those seem to depend on a script called tpm_sysfs_resource.py, but that script does not seem to exist in checkbox.

bladernr@galactica:~/development/checkbox/providers$ grep -r tpm_sysfs_resource.py
base/units/tpm/sysfs.pxu: tpm_sysfs_resource.py tool. The only resource attribute is 'count'
base/units/tpm/sysfs.pxu:command: echo "count: $(tpm_sysfs_resource.py | grep -c -F 'x-sysfs-device-name')"
base/units/tpm/sysfs.pxu:command: tpm_sysfs_resource.py
base/units/tpm/sysfs.pxu:command: tpm_sysfs_resource.py
base/units/tpm/sysfs.pxu:command: tpm_sysfs_resource.py
bladernr@galactica:~/development/checkbox/providers$ find . -name tpm_sysfs_resource.py
bladernr@galactica:~/development/checkbox/providers$ 

For example:

unit: job
id: sysfs_tpm_count
category_id: tpm
plugin: resource
_summary: Count the number of visible TPM chips in sysfs
_description:
 This job just counts the number of visible TPM chips in as reported by
 tpm_sysfs_resource.py tool. The only resource attribute is 'count'
command: echo "count: $(tpm_sysfs_resource.py | grep -c -F 'x-sysfs-device-name')"
estimated_duration: 2s
flags: preserve-locale

How are these jobs ever run if that script doesn't exist? Is it stored somewhere outside of checkbox, perhaps?

To Reproduce

Review the info in the summary
The jobs all seem to call a non-existant script

Environment

Ubuntu, checkbox

Relevant log output

See description for output

Additional context

No response

@bladernr bladernr added the bug Something isn't working label Apr 16, 2024
Copy link

Thank you for reporting us your feedback!

The internal ticket has been created: https://warthogs.atlassian.net/browse/CHECKBOX-1404.

This message was autogenerated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant