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

Add error handling in Linux filesystem plugin #1047

Merged
merged 3 commits into from
Sep 6, 2017
Merged

Conversation

jeunito
Copy link
Contributor

@jeunito jeunito commented Aug 23, 2017

Description

Add error handling in Linux filesystem plugin for when a command does not exist.

Issues Resolved

#1011

  • New functionality includes tests
  • All tests pass
  • All commits have been signed-off for the Developer Certificate of Origin.

Signed-off-by: Jose Asuncion <jeunito@gmail.com>
Signed-off-by: Jose Asuncion <jeunito@gmail.com>
@tas50
Copy link
Contributor

tas50 commented Aug 23, 2017

Instead of performing the which before the shell_out (which does the which again) could you look into rescuing the shell_out exceptions. We do that for a lot of the language plugins. It avoids a pile of disk IO every time we run the plugin.

Signed-off-by: Jose Asuncion <jeunito@gmail.com>
@jeunito
Copy link
Contributor Author

jeunito commented Aug 24, 2017

@tas50 ok. I have changed the implementation

@tas50 tas50 merged commit 819a7e3 into chef:master Sep 6, 2017
@tas50
Copy link
Contributor

tas50 commented Sep 6, 2017

Thanks

@jeunito
Copy link
Contributor Author

jeunito commented Sep 7, 2017 via email

@jaymzh
Copy link
Collaborator

jaymzh commented Oct 3, 2017

This is actually super terrifying. If df stops working for any reason, you get partial data which can be lying to you.

I'm not a fan of this. I'm actually going to make a PR to make this optional and default to failing the plugin.

jaymzh added a commit to jaymzh/ohai that referenced this pull request Oct 3, 2017
PR chef#1047 allows a plugin to return partial data which may be incredibly
dangerous. It's a totally reasonable thing to want, however, so we gate
it behind a plugin config. However, the default behavior reverts to
where it was.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
@jaymzh jaymzh mentioned this pull request Oct 3, 2017
4 tasks
@jeunito
Copy link
Contributor Author

jeunito commented Oct 3, 2017

@jaymzh I just fixed the issue but the reporter who wanted this feature is someone else. I have informed that person already in the issue was filed #1011

jaymzh added a commit to jaymzh/ohai that referenced this pull request Oct 4, 2017
PR chef#1047 allows a plugin to return partial data which may be incredibly
dangerous. It's a totally reasonable thing to want, however, so we gate
it behind a plugin config. However, the default behavior reverts to
where it was.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
jaymzh added a commit to jaymzh/ohai that referenced this pull request Oct 5, 2017
PR chef#1047 allows a plugin to return partial data which may be incredibly
dangerous. It's a totally reasonable thing to want, however, so we gate
it behind a plugin config. However, the default behavior reverts to
where it was.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
jaymzh added a commit that referenced this pull request Oct 5, 2017
PR #1047 allows a plugin to return partial data which may be incredibly
dangerous. It's a totally reasonable thing to want, however, so we gate
it behind a plugin config. However, the default behavior reverts to
where it was.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
@chef chef locked and limited conversation to collaborators Feb 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants