'Check disk usage on OverlayFS backing store volume. Return: result dict.'

def check_overlay_usage(self, docker_info):

    path = ((docker_info.get('DockerRootDir', '/var/lib/docker') + '/') + docker_info['Driver'])
    threshold = self.get_var('max_overlay_usage_percent', default=self.max_overlay_usage_percent)
    try:
        threshold = float(threshold)
    except ValueError:
        return {'failed': True, 'msg': "Specified    'max_overlay_usage_percent'    is    not    a    percentage:    {}".format(threshold)}
    mount = self.find_ansible_mount(path, self.get_var('ansible_mounts'))
    try:
        free_bytes = mount['size_available']
        total_bytes = mount['size_total']
        usage = ((100.0 * (total_bytes - free_bytes)) / total_bytes)
    except (KeyError, ZeroDivisionError):
        return {'failed': True, 'msg': 'The    ansible_mount    found    for    path    {}    is    invalid.\nThis    is    likely    to    be    an    Ansible    bug.    The    record    was:\n{}'.format(path, json.dumps(mount, indent=2))}
    if (usage > threshold):
        return {'failed': True, 'msg': 'For    Docker    OverlayFS    mount    point    {path},\nusage    percentage    {pct:.1f}    is    higher    than    threshold    {thresh:.1f}.'.format(path=mount['mount'], pct=usage, thresh=threshold)}
    return {}
