uninstall.yml playbook fails to remove /var/lib/docker if its mounted on separate filesystem

Solution In Progress - Updated -

Issue

  • uninstall.yml playbook fails to remove /var/lib/docker if its mounted on separate filesystem with below errors:
The full traceback is:
  File "/tmp/ansible_5zSHkj/ansible_module_file.py", line 278, in main
    shutil.rmtree(b_path, ignore_errors=False)
  File "/usr/lib64/python2.7/shutil.py", line 256, in rmtree
    onerror(os.rmdir, path, sys.exc_info())
  File "/usr/lib64/python2.7/shutil.py", line 254, in rmtree
    os.rmdir(path)
failed: [ose_master.example.com] (item=/var/lib/docker) => {
    "changed": false,
    "invocation": {
        "module_args": {
            "attributes": null,
            "backup": null,
            "content": null,
            "delimiter": null,
            "diff_peek": null,
            "directory_mode": null,
            "follow": false,
            "force": false,
            "group": null,
            "mode": null,
            "original_basename": null,
            "owner": null,
            "path": "/var/lib/docker",
            "recurse": false,
            "regexp": null,
            "remote_src": null,
            "selevel": null,
            "serole": null,
            "setype": null,
            "seuser": null,
            "src": null,
            "state": "absent",
            "unsafe_writes": null,
            "validate": null
        }
    },
    "item": "/var/lib/docker",
    "msg": "rmtree failed: [Errno 16] Device or resource busy: '/var/lib/docker'"
}

Environment

  • OpenShift Container Platform
    • 3.9
  • /var/lib/docker mounted on separate filesystem.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.