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

[disk] Fix disk check exclusion #2476

Merged
merged 3 commits into from
May 7, 2016
Merged

Conversation

masci
Copy link
Contributor

@masci masci commented May 6, 2016

#2359 introduced a regression under the following circumstances:

  • device name is ''
  • excluded_disk_re is not specified in the config file.

In that case, the default pattern for excluded_disk_re was ^$ thus making _exclude_disk return before evaluating excluded_mountpoint_re.

Also added a specific test for this issue and fixed the logic with a more verbose but easier to read pattern.

@olivielpeau olivielpeau self-assigned this May 6, 2016
@olivielpeau olivielpeau added this to the 5.8.0 milestone May 6, 2016
# device name matches `excluded_disk_re`
elif not name_empty and self._excluded_disk_re.match(name):
return True
# device name matches `excluded_mountpoint_re`
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this should be "device mountpoint"

@olivielpeau
Copy link
Member

@masci: Had a little discussion with myself, but apart from your own comment the PR looks good to me!

@masci masci merged commit 0337e06 into master May 7, 2016
@masci masci deleted the massi/fix_disk_check_exclusion branch May 7, 2016 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants