learn-katacoda
learn-katacoda copied to clipboard
Container Hosts: Can't find container processes
In which scenario did this bug occur?
Linux Container Internals 2.0 - Lab 4: Container Host
Step 3: SELinux & sVirt: Dynamically generated contexts to protect your containers
If you can't remember the exact step, try to explain where in the scenario did the bug happen
The user is instructed to inspect MLS labels of container processes by executing:
podman run -dt registry.access.redhat.com/ubi7/ubi sleep 10
sleep 3
ps -efZ | grep container_t | grep sleep
However, instead of the indicated sample output, grep
returns no information at all.
Additional context
Instead of container_t
, the container process security labels contain svirt_lxc_net_t
, so the first grep command returns an empty string. Sample:
system_u:system_r:svirt_lxc_net_t:s0:c606,c659 root 18436 18424 11 08:17 pts/0 00:00:00 sleep 100