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

Switch --no-upload does not work unless the system is registered #82

Open
hifzakh opened this issue Jul 3, 2019 · 6 comments
Open

Switch --no-upload does not work unless the system is registered #82

hifzakh opened this issue Jul 3, 2019 · 6 comments
Assignees

Comments

@hifzakh
Copy link

hifzakh commented Jul 3, 2019

If users want to be able to look at the latest uploader.json file and also collect data from their system without uploading it, they will not be able to do it unless their system is registered. The switch --offline does allow users to run insights-client on their machines without registering them, but then the user will not be able to download the latest uploader.json file to see what would would be collected.

@pipopopo
Copy link

Works for me:

System is not registered:

# insights-client --status
System is NOT registered locally via .registered file. Unregistered at 2019-07-11T16:35:39.635587
Insights API says this machine was unregistered at 2019-07-11T14:35:39.000Z

Can obtain archive:

# insights-client --offline --no-upload
Starting to collect Insights data for ktordeur-sat65.sysmgmt.lan
Archive saved at /var/tmp/Pp8rIP/insights-ktordeur-sat65.sysmgmt.lan-20190711163721.tar.gz

What version of insights are you running?

# insights-client --version

@hifzakh
Copy link
Author

hifzakh commented Jul 11, 2019

I am using a RHEL8 box with the following insights-client version.

# insights-client --version
Client: 3.0.5-4
Core: 3.0.102-1

@hifzakh
Copy link
Author

hifzakh commented Jul 12, 2019

Why can't we use --no-upload option both when the system is registered and unregistered?

@pipopopo
Copy link

@hifzakh I did perform the --no-upload in both registered/unregistered and was able to get the archive:

[root@rhel8 ~]# insights-client --version
Client: 3.0.5-4
Core: 3.0.102-1

[root@rhel8 ~]# insights-client --status
System is registered locally via .registered file. Registered at 2019-07-12T09:48:33.768864
Insights API confirms registration.

[root@rhel8 ~]#  insights-client --offline --no-upload
Starting to collect Insights data for rhel8.kenny.lan
Archive saved at /var/tmp/un2ny5o8/insights-rhel8.kenny.lan-20190713103254.tar.gz

[root@rhel8 ~]#  insights-client
insights-client      insights-client-run  

[root@rhel8 ~]#  insights-client --unregister
Successfully unregistered from the Red Hat Insights Service

[root@rhel8 ~]#  insights-client --status
System is NOT registered locally via .registered file. Unregistered at 2019-07-13T10:33:38.327885
Insights API says this machine was unregistered at 2019-07-13T08:33:38.000Z

[root@rhel8 ~]#  insights-client --offline --no-upload
Starting to collect Insights data for rhel8.kenny.lan
Archive saved at /var/tmp/nogewvf8/insights-rhel8.kenny.lan-20190713103350.tar.gz

@portante
Copy link

@pipopopo, can you run the following sequence instead (assuming the host starts out registered with insights?

# insights-client --version
# insights-client --status
# insights-client --no-upload
# insights-client --unregister
# insights-client --status
# insights-client --offline --no-upload

We'd like to be able to see what the client would have uploaded when the node is registered without having to keep it from talking to cloud.redhat.com.

Does that make sense?

@pipopopo
Copy link

@portante I think you wanted to say:

We'd like to be able to see what the client would upload when the node is _not_ registered without having to keep it from talking to cloud.redhat.com.

As you can see the archive is created even when the system is not registered:

# bash -x /tmp/test.sh 

+ insights-client --version
Client: 3.0.5-4
Core: 3.0.110-1
+ insights-client --status
System is registered locally via .registered file. Registered at 2019-07-17T10:33:47.539894
Insights API confirms registration.
+ insights-client --no-upload
Starting to collect Insights data for rhel8.kenny.lan
Archive saved at /var/tmp/7bh8spn8/insights-rhel8.kenny.lan-20190717103416.tar.gz
+ insights-client --unregister
Successfully unregistered from the Red Hat Insights Service
+ insights-client --status
System is NOT registered locally via .registered file. Unregistered at 2019-07-17T10:34:33.204348
Insights API says this machine was unregistered at 2019-07-17T08:34:33.000Z
+ insights-client --offline --no-upload
Starting to collect Insights data for rhel8.kenny.lan
Archive saved at /var/tmp/ji4efup4/insights-rhel8.kenny.lan-20190717103440.tar.gz

@gravitypriest gravitypriest self-assigned this Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants