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

Give an error on non-existing devices #19

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mgeri
Copy link

@mgeri mgeri commented Feb 2, 2023

Describe what this PR does

This PR will return a fatal error during startup if the configuration doesn't match any devices.

Does this pull request fix one issue?

Fixes #15

Copy link
Owner

@everpeace everpeace left a comment

Choose a reason for hiding this comment

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

Sorry for the late review. Please take a look at comment.

@@ -48,6 +48,9 @@ func (d HostDevice) Expand() ([]*ExpandedHostDevice, error) {
if err != nil {
return nil, err
}
if len(matchedHostPath) == 0 {
return nil, fmt.Errorf("no file matched: %s", d.HostPath)
Copy link
Owner

Choose a reason for hiding this comment

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

This is breaking change. Could you introduce feature switch for this??

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.

HealthCheck always reports Healthy
2 participants