-
Notifications
You must be signed in to change notification settings - Fork 131
spyre support for ServiceReport #3076
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
base: master
Are you sure you want to change the base?
spyre support for ServiceReport #3076
Conversation
saijanani-c
commented
Dec 24, 2025
- Integrated '-v -p spyre' and '-r -p spyre' (repair) flows.
- Implemented automatic repair if validation fails, followed by re-validation.
- Added non-root user execution.
- Validates '/dev/vfio' population before and after ServiceReport execution.
abdhaleegit
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please look into comments and also upload logs
| return True | ||
| except Exception: | ||
| pass | ||
| return False |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the whole code can be replaced by reusing get_pci_class () utils method.. please reuse the funciton
| os.chdir(self.sourcedir) | ||
|
|
||
| if not self.spyrePresent(): | ||
| self.cancel("Spyre Accelerator not present on this system") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this test will be used for non spyre use case... so do not cancel instead move all spyre related options/test inside the if spyrePresent() block
| if process.system(cmd, ignore_status=True, sudo=True, shell=True): | ||
| self.fail("ServiceReport: Failed command is: %s" % cmd) | ||
|
|
||
| spyreVerboseCmd = "./servicereport -v -p spyre" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ./ as the servicereport is already installed and in the /bin executable path..
| self.sourcedir = os.path.join(self.workdir, 'ServiceReport-master') | ||
| build.make(self.sourcedir) | ||
|
|
||
| def spyrePresent(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isAccelarator will be better name
| if 'FAIL' in output: | ||
| self.log.info("FAIL detected in -v -p spyre") | ||
| spyreRepairCmd = "./servicereport -r -p spyre" | ||
| process.system(spyreRepairCmd, ignore_status=True, sudo=True, shell=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
process.system or process.run ?
| if not os.path.exists('/dev/vfio') or not os.listdir('/dev/vfio'): | ||
| self.fail("/dev/vfio not populated after servicereport") | ||
|
|
||
| user = 'new_sentient_user' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
keep user name as senuser
|
|
||
| process.run(f"useradd {user}", ignore_status=True, sudo=True, shell=True) | ||
| process.run(f"echo '{user}:{user}' | chpasswd", ignore_status=True, sudo=True, shell=True) | ||
| process.run(f"usermod -aG {group} {user}", ignore_status=True, sudo=True, shell=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove ignore_status .. it ignores even if command fails
Signed-off-by: Sai Janani C <[email protected]>