def cleanup(self):
    'Clean up this jailer context.'
    shutil.rmtree(self.chroot_base_with_id(), ignore_errors=True)
    if self.netns:
        _ = run('ip netns del {}'.format(self.netns), shell=True, stderr=PIPE)
    controllers = ('cpu', 'cpuset', 'pids')
    for controller in controllers:
        try:
            retry_call(f=self._kill_crgoup_tasks, fargs=[controller], exceptions=TimeoutError, max_delay=5)
        except TimeoutError:
            pass
        back_cmd = '-depth -type d -exec rmdir {} \\;'
        cmd = 'find /sys/fs/cgroup/{}/{}/{} {}'.format(controller, FC_BINARY_NAME, self.jailer_id, back_cmd)
        _ = run(cmd, shell=True, stderr=PIPE)
Clean up this jailer context.
def cleanup(self):
    
    shutil.rmtree(self.chroot_base_with_id(), ignore_errors=True)
    if self.netns:
        _ = run('ip netns del {}'.format(self.netns), shell=True, stderr=PIPE)
    controllers = ('cpu', 'cpuset', 'pids')
    for controller in controllers:
        try:
            retry_call(f=self._kill_crgoup_tasks, fargs=[controller], exceptions=TimeoutError, max_delay=5)
        except TimeoutError:
            pass
        back_cmd = '-depth -type d -exec rmdir {} \\;'
        cmd = 'find /sys/fs/cgroup/{}/{}/{} {}'.format(controller, FC_BINARY_NAME, self.jailer_id, back_cmd)
        _ = run(cmd, shell=True, stderr=PIPE)