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

Suppress facter warnings on systems that don't support LVM. #44

Merged
merged 1 commit into from
Oct 23, 2013

Conversation

smithj4
Copy link
Contributor

@smithj4 smithj4 commented Oct 7, 2013

We were seeing these facter warnings when running puppet on our systems that don't use LVM:

/usr/bin/which: no vgs in (/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin)

@@ -4,7 +4,7 @@
confine :kernel => :linux

setcode do
vgdisplay = Facter::Util::Resolution.exec('which vgs')
vgdisplay = Facter::Util::Resolution.exec('which vgs 2>/dev/null')
Copy link

Choose a reason for hiding this comment

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

Can you give this a test with:

vgdisplay = Facter::Util::Resolution.which('vgs')

As we have a helper for which already. :)

@smithj4
Copy link
Contributor Author

smithj4 commented Oct 22, 2013

I updated the pull request to use the builtin which instead of exec and tested on our hosts.

@apenney
Copy link

apenney commented Oct 22, 2013

Unfortunately this breaks the tests!

https://travis-ci.org/puppetlabs/puppetlabs-lvm/jobs/12899316

Can you take a quick look? It should be as simple as updating it to use .which instead of .exec, just like the fact change.

(Once that's fixed can you rebase everything to a single commit for clean merging?)

@smithj4
Copy link
Contributor Author

smithj4 commented Oct 23, 2013

Pull request updated to pass CI tests and commits squashed.

apenney pushed a commit that referenced this pull request Oct 23, 2013
Suppress facter warnings on systems that don't support LVM.
@apenney apenney merged commit ba8efdd into puppetlabs:master Oct 23, 2013
@smithj4 smithj4 deleted the lvm_support branch October 23, 2013 18:20
cegeka-jenkins pushed a commit to cegeka/puppet-lvm that referenced this pull request Oct 23, 2017
Suppress facter warnings on systems that don't support LVM.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants