-
Notifications
You must be signed in to change notification settings - Fork 19
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
oci-umount: do not error out if the config file is missing #1
oci-umount: do not error out if the config file is missing #1
Conversation
When the configuration file is missing, just raise a warning instead of giving an error. Closes: https://github.com/rhatdan/oci-umount/issues/2 Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
How did you run into this? Somebody removed the config file? It should be shipped with the package. |
Having said that, warning when config file is missing sounds reasonable. LGTM |
we encountered this issue while running Docker in a system container and /cc @ashcrow |
LGTM |
Now thinking more about it. Very fact that it was error you noticed it and fixed it by copying file to host. If it was just a warning, nobody would have noticed it in the flood of messages. And much later somebody would have complained that hey mounts points are leaking and oci-umount is not working. So may be making it error again makes more sense? |
@rhvgoyal Interesting. If docker should indeed fail if the file doesn't exist I agree, though I'd suggest a more verbose error message. When I noticed the message it seemed more like "I can't find this file so I can't start" rather than "I must have this file else docker won't work correctly". If that's the case I don't mind updating our container Dockerfiles as well submitting a PR with an updated error message. |
@ashcrow Whether docker works correctly without this file or not depends on how docker is being used. If people are using volume mounts like "-v /:/host" for containers, then there is a chance that docker will not work correctly for container removal. I am not sure about using "must" keyword. I think its more a sanity check for the oci-umount plugin. And if a sanity check improves the probability of user having right configuration, I am up for it. OTOH, what's the use case for making this a warning (instead of error). Where is that useful? If we don't have a good use case, I would say, just revert this PR and let the code be as it is. |
@rhvgoyal I'm OK with a revert but I do feel pretty strongly on having a better error message. I'd say, with this new information, the use case for a warning changes and would be that I think the alternate solution is reverting and updating the error message to note that the file must exist to run docker (though nothing is done to make sure the file has content). |
@ashcrow change error message and generate a PR if you like. But I am not sure how it is more helpful if I say In both the cases admin comes to know that docker is looking for a file which is missing. |
@rhvgoyal Agreed. I'd just like to speed up the time 😄 . 👍 on revert. Will sent a PR with an updated message. |
@ashcrow hey, did you generate a PR reverting this? |
@giuseppe this PR changes pr_pwarning() to LOG_INFO, instead of LOG_WARNING. That's just wrong. |
Ok, I see that pr_pwarning() is logging as LOG_INFO. I will fix it. This should have been reverted too. |
When the configuration file is missing, just raise a warning instead of
giving an error.
Closes: https://github.com/rhatdan/oci-umount/issues/2
Signed-off-by: Giuseppe Scrivano gscrivan@redhat.com