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

Remove RunAsAny (root) for qatlib container #145

Open
vbedida79 opened this issue Sep 19, 2023 · 2 comments
Open

Remove RunAsAny (root) for qatlib container #145

vbedida79 opened this issue Sep 19, 2023 · 2 comments
Labels
qat QAT feature
Milestone

Comments

@vbedida79
Copy link
Contributor

vbedida79 commented Sep 19, 2023

Summary

Currently qatlib workload runs with custom SCC using IPC_LOCK and root permissions

Detail

qatlib workload needs IPC_LOCK permission, added via custom SCC based on restricted-v2 default SCC. The container also needs to run as root according to qatlib doc. This is added with RunAsAny permission in custom SCC. This also enables container to access devices as root

Possible solutions

  1. To avoid access to host devices as root, follow Configure cri-o to allow workloads running non-root user to access devices #35. Figure how to enable CRIO flag for every host. Possibly via privileged container daemonset.
  2. Possibility to run qatlib container as non-root or a specific user?
@vbedida79 vbedida79 changed the title Remove RunAsAny (root permission) for qatlib container scc Remove RunAsAny (root) for qatlib container Sep 19, 2023
@vbedida79 vbedida79 added this to the v1.1.0 milestone Sep 19, 2023
@hershpa hershpa added the qat QAT feature label Sep 19, 2023
@mythi
Copy link

mythi commented Sep 20, 2023

The container also needs to run as root according to qatlib doc.

qatlib docs are not valid in containers space (host groups and gids are not directly applicable). Read my blog. It describes the problems and solution.

Figure how to enable CRIO flag for every host.

I'd submit a feature request to OCP to have that flag available in MCO. At least to trigger the conversation. This flag is universal to all devices, not just QAT specific.

@mythi
Copy link

mythi commented Sep 20, 2023

I'd submit a feature request to OCP to have that flag available in MCO. At least to trigger the conversation. This flag is universal to all devices, not just QAT specific.

Via ContainerRuntimeConfig CR: https://docs.openshift.com/container-platform/4.13/post_installation_configuration/machine-configuration-tasks.html#create-a-containerruntimeconfig_post-install-machine-configuration-tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qat QAT feature
Projects
None yet
Development

No branches or pull requests

3 participants