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

Provide better error context for backend drivers #664

Closed
stevvooe opened this issue Jun 26, 2015 · 0 comments
Closed

Provide better error context for backend drivers #664

stevvooe opened this issue Jun 26, 2015 · 0 comments

Comments

@stevvooe
Copy link
Collaborator

#492 describes an issue with using the s3 driver and IAM roles. While not strictly the domain of the registry, the error message only contained the message "Access Denied", coming from the s3 driver. The log message is below:

time="2015-06-23T17:27:37.379316264Z" level=error msg="An error occured" environment=development err.code=UNKNOWN err.detail="Access Denied" err.message="unknown error" http.request.host=docker-registry.mydomain http.request.id=077d63aa-5be4-4462-9205-468ad5fa9044 http.request.method=HEAD http.request.remoteaddr=xxx.xxx.xxx.xxx http.request.uri="/v2/gitbucket/blobs/sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" http.request.useragent="docker/1.6.2 go/go1.4.2 git-commit/7c8fca2 kernel/4.0.3-boot2docker os/linux arch/amd64" instance.id=2b4ff1b4-b905-4eb0-be28-486977c4840e service=registry vars.digest="sha256:a3ed95caeb02ffe68cdd9fd84406680ae93d633cb16422d00e8a7c22955b46d4" vars.name=gitbucket version=v2.0.1

We may want to explore providing a little more context in driver instantiated errors. These widely vary, so we may want to provide some common wrappers and test that drivers appropriately wrap internal errors.

@aaronlehmann aaronlehmann added this to the Registry/2.1 milestone Aug 3, 2015
@dmp42 dmp42 assigned amitshukla and unassigned RichardScothern Oct 5, 2015
amitshukla added a commit to amitshukla/distribution that referenced this issue Oct 6, 2015
amitshukla added a commit to amitshukla/distribution that referenced this issue Oct 6, 2015
Clean up the code for issue 664
amitshukla added a commit to amitshukla/distribution that referenced this issue Oct 6, 2015
Errors thrown by storage drivers don't have the name of the driver, causing user confusion about whether the error is coming from Docker or from a storage driver. This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes whenever ErrUnsupportedDriver is used.
The tests check whether the driver name appears in the error message.
amitshukla added a commit to amitshukla/distribution that referenced this issue Oct 6, 2015
Errors thrown by storage drivers don't have the name of the driver, causing user confusion about whether the error is coming from Docker or from a storage driver. This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes whenever ErrUnsupportedDriver is used.
The tests check whether the driver name appears in the error message.

Signed-off-by: Amit Shukla amit.shukla@docker.com
RichardScothern pushed a commit to RichardScothern/distribution that referenced this issue Nov 2, 2015
Errors thrown by storage drivers don't have the name of the driver, causing user
confusion about whether the error is coming from Docker or from a storage driver.
This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes
whenever ErrUnsupportedDriver is used.  The tests check whether the driver name
appears in the error message.

Signed-off-by: <Amit Shukla amit.shukla@docker.com>
RichardScothern pushed a commit to RichardScothern/distribution that referenced this issue Nov 3, 2015
Errors thrown by storage drivers don't have the name of the driver, causing user
confusion about whether the error is coming from Docker or from a storage driver.
This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes
whenever ErrUnsupportedDriver is used.  The tests check whether the driver name
appears in the error message.

Signed-off-by: Amit Shukla <amit.shukla@docker.com>
RichardScothern pushed a commit to RichardScothern/distribution that referenced this issue Nov 3, 2015
Errors thrown by storage drivers don't have the name of the driver, causing user
confusion about whether the error is coming from Docker or from a storage driver.
This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes
whenever ErrUnsupportedDriver is used.  The tests check whether the driver name
appears in the error message.

Signed-off-by: Amit Shukla <amit.shukla@docker.com>
thaJeztah pushed a commit to thaJeztah/distribution that referenced this issue Apr 22, 2021
Errors thrown by storage drivers don't have the name of the driver, causing user
confusion about whether the error is coming from Docker or from a storage driver.
This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes
whenever ErrUnsupportedDriver is used.  The tests check whether the driver name
appears in the error message.

Signed-off-by: Amit Shukla <amit.shukla@docker.com>
thaJeztah pushed a commit to thaJeztah/distribution that referenced this issue Jan 19, 2022
Errors thrown by storage drivers don't have the name of the driver, causing user
confusion about whether the error is coming from Docker or from a storage driver.
This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes
whenever ErrUnsupportedDriver is used.  The tests check whether the driver name
appears in the error message.

Signed-off-by: Amit Shukla <amit.shukla@docker.com>
dylanrhysscott pushed a commit to digitalocean/docker-distribution that referenced this issue Jan 5, 2023
Errors thrown by storage drivers don't have the name of the driver, causing user
confusion about whether the error is coming from Docker or from a storage driver.
This change adds the storage driver name to each error message.

This required changing ErrUnsupportedDriver to a type, leading to code changes
whenever ErrUnsupportedDriver is used.  The tests check whether the driver name
appears in the error message.

Signed-off-by: Amit Shukla <amit.shukla@docker.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants