Closed SteveHNH closed 6 years ago
Hi, I'm trying to get familiar with the whole Insights project. I wanted to look into this issue as it appears simple to investigate (at least initially). But I'm not able to even get to the point of reproducing it because it's not clear how to setup a development environment for insights-client.
On Fedora 26 I've tired the following approach:
(I also created an "insights" user because otherwise it was complaining about permissions in /var/log
)
git clone https://github.com/RedHatInsights/insights-core.git
git clone https://github.com/RedHatInsights/insights-client.git
cd insights-client
virtualenv .
source bin/activate
pip install -e .
pip install -e ../insights-core
And after all this I get... a mysterious failure:
(insights-client) [george@f26 insights-client]$ insights-client
(insights-client) [george@f26 insights-client]$ echo $?
1
(insights-client) [george@f26 insights-client]$ insights-client --verbose
2017-11-23 16:15:59,857 DEBUG insights.client.client Logging initialized
(insights-client) [george@f26 insights-client]$ insights-client --verbose --register
2017-11-23 16:16:02,776 DEBUG insights.client.client Logging initialized
(insights-client) [george@f26 insights-client]$ redhat-access-insights --verbose
2017-11-23 16:28:42,974 DEBUG insights.client.client Logging initialized
Full paste of the aforementioned procedure: https://hastebin.com/raw/ibeligawan
6e1d1b5ab75c632d75963dd9df709600ce5d0571
? I couldn't find it in either -core or -client. Has there been some rebase since the issue was first reported?I'm hoping that if I can find the answers to these questions we can also document them in the README.md
of the relevant project so that future contributors don't get stuck on this.
Hi @gangelop, sorry for the big confusion here. This issue was migrated from a Trello board, and it appears it is related to insights-client version 1.0.13, which is actually called redhat-access-insights
. This is a different code repo, found at https://github.com/redhataccess/insights-client. Thus, we should probably close this issue out and track it elsewhere.
To answer your questions around getting the new insights-client
to run at all, you probably need a basic understanding of how the code gets executed. We designed the client to fetch a Python egg from Red Hat with most of the client implementation packaged inside. Thus you need to build an egg to be used by the RPM. Also, it probably makes the most sense to build the RPM and install it in order to have insights-client
run as it expects to. So, in a nutshell:
git clone https://github.com/RedHatInsights/insights-core.git
git clone https://github.com/RedHatInsights/insights-client.git
cd insights-core
virtualenv .
. bin/activate
pip install -e .[develop]
./build_client_egg.sh
cp insights.egg ../insights-client/etc/rpm.egg # install generated egg into expected location
cd ../insights-client
make clean all
sudo yum install dist/RPMS/noarch/insights-client-3.0.2-2.fc26.noarch.rpm
insights-client --no-gpg
Fedora 26 Python 2.7.13 python2-requests 2.13.0
Tested with insights-client master (6e1d1b5ab75c632d75963dd9df709600ce5d0571) as well as 1.0.13-4
imported from Trello