Skip to content

Propagate failure to detect MountInfo #929

@smurf667

Description

@smurf667

This request concerns the 3.2.0 release.

While debugging an issue related to Vault access (we're using HashiCorp Vault with a custom authentication mechanism), we encountered a situation where authentication requests occasionally timed out due to a five-second timeout setting in a client.

We discovered that these timeouts were silently caught in the following code block, with logging only at debug level (which was not active):

catch (VaultException e) {
if (logger.isDebugEnabled()) {
logger.debug("Unable to determine mount information for [%s]. Returning unavailable MountInfo: %s"
.formatted(path, e.getMessage()), e);
}
return MountInfo.unavailable();
}
catch (RuntimeException e) {
if (logger.isDebugEnabled()) {
logger.debug("Unable to determine mount information for [%s]. Caching unavailable MountInfo: %s"
.formatted(path, e.getMessage()), e);
}
mountInfo = MountInfo.unavailable();
}

As a result, mount information was unavailable, but the code continued attempting to access secrets, which led to "403 Forbidden" errors. It was not immediately clear that the root cause of these access errors was the failure to retrieve mount metadata.

Suggestion: It would be very helpful if such failures were logged at the error or warning level. This would significantly reduce the time required to diagnose similar issues in the future.

Thank you for your work on this project and for considering this request!

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions