-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Netdata does not detect pkg-config under automated install #6405
Comments
Hello @rtkjliviero, thank you for your report! Sorry to hear you bumped into problems. Chef runs the commands as what user? Is the user's environment correct and has access to the required dependent libraries? I am not sure i can think of anything that would lead to the script to fail on a remote execution at |
Thanks for the quick response! I just ran a quick test to be sure, and chef runs the commands as root. It should have access to everything. Note that in both the successful and unsuccessful cases, |
yep, we are installing pkg-config as required. It is very peculiar. |
Can you confirm whether you are running on the exact same host setup with the exact same packages both cases? |
@rtkjliviero There must be something different on the core packages like gcc, pkg config or auto-conf between those two hosts. Could you provide more details on the packages installed before running the script on both cases? Is that feasible? Because now that you already run the script once, packages should be already installed |
Also, could try executing this command and upload the complete output here?
Note: Dont forget to remove any sensitive information you might notice on the output, if any |
bump @rtkjliviero, any luck ? |
Thanks for checking in @paulkatsoulakis!
Definitely. I have:
I have run the commands on the same host as well (one example given above), so there
At the moment I can't, but I can do that tomorrow! |
Cool, yes please do @rtkjliviero because i am very curious to see what is happening with Chef and i can't have a playground for Chef at the moment |
Hello @rtkjliviero, got anything? |
That commands completes successfully under chef:
However, on that same machine:
So running chef-client again with the previous command ( |
what is that? We detect this pkg-config and we do not install our own. |
Great question. After some limited reading, apparently chef bundles some packages internally for use by the chef-client machine. If netdata is using |
Well yes, we can't control the environments and the binaries the may carry. We can only go up to the point to expect specific binaries and install them if they are missing. I think you need to check with Chef what is going on. |
I'll definitely do some more investigation into chef, but I don't think it's chef that's breaking here. The issue link above describes a different problem. This issue seems more closely related: https://github.com/chef/chef-dk/issues/313 Either way, the issue here won't be chef-specific - my use of chef is just exposing the underlying problem. You posted the relevant lines above; any script residing in Looking at the
In any case, I have a couple easy workarounds for my own case, and I appreciate your time and insight! |
I will take the time to discuss it with the team, but the thing is we can't predict what people do with their installations. In this particular case, even if we did work with package manager and we detect that pkg-config package needs to be installed, path will still be messed up because there will be two binaries that are resolved with $PATH and the problem would still be there. |
Hello @rtkjliviero, after careful consideration of the possible solutions to this peculiar issue, we concluded that we are not really able to do much about it. No matter what we do, it is always left to the system admins hands to make sure they maintain a healthy PATH with all the required dependencies correctly set. Even in the case where we decide to stop checking for the binary and just install the package directly by checking the package manager only, we would end up with problems. If PATH is defined in such way that the binary from folder A gets overriden by the binary with the same name under folder B and we are interested for binary in folder A, we won't be able to see it. If you allow me, i will be closing the issue for now, but please do reopen if you have a concrete suggestion for us to implement. |
Thanks for following up @paulkatsoulakis! |
Bug report summary
netdata fails to install in an automated context - using
chef
in this case. However, if the same command is run by hand, installation is successful. Below is a snippet of the output from the failure case:And the corresponding snippet from the successful case:
Note that in the failure case, the line "Checking if 'pkg-config' is installed..." is not present; in the succesfull case, it is. The chef run can be made to succeed by pre-installing pkg-config
In both cases, the command is
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait --stable-channel --no-updates
OS / Environment
Ubuntu 16.04.6 LTS (Xenial Xerus)
Netdata version (ouput of
netdata -V
)netdata v1.15.0 (presumably latest stable - using kickstart install script)
Component Name
Unsure - dependency detector?
Steps To Reproduce
bash <(curl -Ss https://my-netdata.io/kickstart.sh) --dont-wait --stable-channel --no-updates
by handExpected behavior
netdata should install successfully in an automated context.
The text was updated successfully, but these errors were encountered: