-
Notifications
You must be signed in to change notification settings - Fork 259
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
Fix access denied when killing stopped container #1447
Fix access denied when killing stopped container #1447
Conversation
4930b4c
to
071d095
Compare
This change fixes access denied errors when killing an already stopped host process container. This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
071d095
to
9e72a85
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we are switching over to go1.13 style errors, should we also add Is(
implementations as well so we can get rid of the getInnerError
in all the Is<Error>(
functions?
func (e *HcsError) Is(target error) bool {
target = getInnerError
return errors.Is(e.Err, target)
}
@helsaawy Good idea.. wanna take this up as a follow-up? |
Am I being voluntold? 😅 |
LOL possibly.. 😆 |
This change fixes access denied errors when killing an already stopped host process container. This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This change fixes access denied errors when killing an already stopped host process container. This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
This change fixes access denied errors when killing an already stopped host process container.
This change also uses errors.Is() to compare errors in various functions of the hcs error package. This allows error wrapping while still properly validating that a wrapped error is of a certain type.
Signed-off-by: Gabriel Adrian Samfira gsamfira@cloudbasesolutions.com