Skip to content
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

Expose more internal errors via hscshim api #933

Merged
merged 1 commit into from
Jan 28, 2021

Conversation

jsturtevant
Copy link
Contributor

As part of kubernetes/kubernetes#98509 we found that a newly started container in the "Created" state but not "Running" returns errors when it queries for stats:

failure in a Windows system call: The requested virtual machine or container operation is not valid in the current state. (0xc0370105) 
failure in a Windows system call: Access is denied. (0x5)

I've worked around it by looking for the Error codes but would be cleaner if there were other helper functions that exposed the interal error stats

Signed-off-by: James Sturtevant jstur@microsoft.com

Signed-off-by: James Sturtevant <jstur@microsoft.com>
@jsturtevant jsturtevant requested a review from a team as a code owner January 28, 2021 20:14
@jsturtevant
Copy link
Contributor Author

/cc @dcantah @kevpar

// `ErrVmcomputeOperationAccessIsDenied`.
func IsAccessIsDenied(err error) bool {
err = getInnerError(err)
return err == ErrVmcomputeOperationAccessIsDenied
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could be

return ErrVmComputeOperationAccessIsDenied == getInnerError(err)

I know this is just following the same for the others however

Copy link
Member

@kevpar kevpar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kevpar kevpar merged commit c22b700 into microsoft:master Jan 28, 2021
princepereira pushed a commit to princepereira/hcsshim that referenced this pull request Aug 29, 2024
Expose more internal errors via hscshim api
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants