#8248 httpd ccaches created during server upgrade aren't cleaned up on uninstall/install
Closed: fixed by cheimes. Opened by tjaalton.

I had a server install which was upgraded to 4.8.5, then I uninstalled it and ran ipa-server-install again and it failed:

[15/21]: clean up any existing httpd ccaches
[error] IsADirectoryError: [Errno 21] Is a directory: '/run/ipa/ccaches/upgrade_ccachessj4ov8i6'
[Errno 21] Is a directory: '/run/ipa/ccaches/upgrade_ccachessj4ov8i6'

remove_httpd_ccaches() doesn't seem to clean directories, only files.


I wonder why shutil.rmtree(paths.IPA_CCACHES) wasn't used.

Metadata Update from @rcritten:
- Issue assigned to rcritten

shutil also removes the directory so I call systemd-tmpfiles --create afterward to re-create it.

https://github.com/freeipa/freeipa/pull/5124

Metadata Update from @rcritten:
- Issue priority set to: normal
- Issue set to the milestone: FreeIPA 4.8.9

master:

  • cc5d9a8c9de3db863ca181348bfb01506f74302d Clean up entire /run/ipa/ccaches directory not just files
  • 9f9dcfe88acb27c6ac734af18dc4015e8cb5c327 Test that ccaches are cleaned up during installation

ipa-4-8:

  • ade428f51909b79a7ec0ced8f9810ce459aba1d3 Clean up entire /run/ipa/ccaches directory not just files
  • 7cfd03db48060c61e6a7fecbb72d9995a7de2511 Test that ccaches are cleaned up during installation

Metadata Update from @cheimes:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

Metadata