-
Notifications
You must be signed in to change notification settings - Fork 496
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
(PA-4569) Changes to use bundled virt-what #2739
Conversation
Could you expand on what the expected behavior is? Some questions that come to mind are: What happens if we call our I don't know if we've updated our Do you have an idea of what facts may change as a result? Are there cases where |
-> This is to resolve issue with the jira: https://perforce.atlassian.net/browse/PA-4569.
-> We are trying to use our built
-> I see recent update to our component. puppetlabs-toy-chest/puppet-runtime#588.
-> We can close this PR in case we would want to have more system details. Here Assuming facter could not resolve to
|
Thanks @skyamgarp, I think the code changes are fine, but I'm concerned about the scope of the change and our lack of test coverage to assess the risk. For example, The other risk I see are cases where |
I think to use the vendored version makes sense (why was it vendored when it wasn't used it? Is that a bug or do other parts rely in virt-what?). However I agree with @joshcooper and think this needs to be tested on some platforms to understand how/where this has potential impact. And from a packager point of view: I build facter/puppet for other platforms and it would be great if you could document this logic somewhere in the docs. |
Also forgot to mention that facter 3.x used to delegate to our vendored
virt-what again.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should facter
ensure that /opt/puppetlabs/puppet/bin
is in its PATH
instead? That would make it friendlier for non-AIO builds.
@bastelfreak |
We don't want to share the private bin directory. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did not understand the last point about packager point of view. Can you please elaborate more on that?
Facter is also packaged outside of Puppet's AIO. For example:
We don't want to share the private bin directory.
IMHO this current PR already does that.
@@ -13,7 +13,12 @@ def post_resolve(fact_name, _options) | |||
end | |||
|
|||
def retrieve_from_virt_what(fact_name) | |||
output = Facter::Core::Execution.execute('virt-what', logger: log) | |||
command = if File.readable?('/opt/puppetlabs/puppet/bin/virt-what') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If anything, you need to make sure it's executable
command = if File.readable?('/opt/puppetlabs/puppet/bin/virt-what') | |
command = if File.executable?('/opt/puppetlabs/puppet/bin/virt-what') |
You don't have to set it in |
We have some precedence in facter/lib/facter/resolvers/augeas.rb Lines 26 to 30 in e776b42
I think the remaining issue with this PR is whether we can actually merge it without introducing a breaking change? I'm less certain about that. Maybe it has to wait for Facter 5? |
@joshcooper , @bastelfreak , @ekohl Based on our discussion:
|
Closing this PR as we would be doing this change in facter 5. |
This is to resolve issue with the jira: https://perforce.atlassian.net/browse/PA-4569.
Reporter has mentioned we are not using our bundled virt-what. Our bundled virt-what seems to be returning correct value for user, with this PR we can use our bundled virt-what. This change will help when there is no virt-what installed on the system(This is assumption based on the jira issue). The component is built only for linux systems.