-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[utilities][ceph] wildcard support for path in files, fix ceph plugin paths #3312
Conversation
Congratulations! One of the builds has completed. 🍾 You can install the built RPMs by following these steps:
Please note that the RPMs should be used only in a testing environment. |
My inclination here is to say we should instead target specific files within these subdirs, if an empty subdir can be present on a system where the plugin shouldn't run. At the moment, the ceph plugins here are the only ones that attempt to use wildcards in their The other thought I have is that the glob detection should go into I'd prefer if we can identify reliable file(s) for these plugins, but if that isn't practically possible then I'd be ok with extending the functions to handle globs, provided that the logic is handled within def path_exists(path, sysroot):
if '*' in path:
return _os_wrapper(path, sysroot, 'glob', module=glob)
return _os_wrapper(path, sysroot, 'exists') |
Thanks for the feedback Jake. I have seen in typical juju deployed ubuntu setups, the folder name inside the non empty folder is generally ceph-$hostname. But this may not always be the case, nor have I extensively seen other environments like standalone, or RH deployments, so I cannot be sure this will always be the case.
I think we gain more if we allow wildcards in "files" triggers, so I'll try to put the glob code in path_exists() and test it out. |
This lets files triggers use * and also updates the ceph plugins to trigger only if folders are non empty Closes: #3311 Signed-off-by: Nikhil Kshirsagar <[email protected]>
I've tested the changes you suggested in path_exists() and they seem to work well, I've tested it on a mon and osd node.
|
This lets files triggers use * and also updates the ceph plugins to trigger only if folders are non empty
Closes: #3311
Please place an 'X' inside each '[]' to confirm you adhere to our Contributor Guidelines