intel-technology-enabling-for-openshift icon indicating copy to clipboard operation
intel-technology-enabling-for-openshift copied to clipboard

Remove RunAsAny (root) for qatlib container

Open vbedida79 opened this issue 1 year ago • 2 comments

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 https://github.com/intel/intel-technology-enabling-for-openshift/issues/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 avatar Sep 19 '23 21:09 vbedida79

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 avatar Sep 20 '23 05:09 mythi

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

mythi avatar Sep 20 '23 11:09 mythi