GC29
March 24, 2023, 9:21am
1
Problem:
I would like to setup traces for my Ubuntu hosts which it working like a charm for my RedHat like distros.
Katello-upload-profile and katello-host-tools-tracer are installed on the hosts, I can see the needs
for reboot in the host status but nothing appears in the traces tab. Is that a normal behaviour for Ubuntu or did I miss a step somewhere?
Expected outcome:
See traces in the tab
Foreman and Proxy versions:
Foreman 3.5.1 Katello 4.7.3
Foreman and Proxy plugin versions:
|plugin |version|
|—|—|—|—|
|foreman-tasks | 7.1.1|
|foreman_bootdisk |21.0.3|
|foreman_puppet |5.0.0|
|foreman_remote_execution |8.2.0|
|katello |4.7.3|
|puppetdb_foreman |6.0.1|
Distribution and version:
OracleLinux 8.7
Other relevant data:
Have a look at https://apt.atix.de/
There you can find sub-man and katello-host-tools including tracer package.
GC29
March 29, 2023, 11:31am
3
Hi @Bernhard_Suttner ,
subscription-manager, katello-host-tools and katello-host-tools-tracer are installed on my hosts from a local mirror of apt.atix.de . Thats why I’m asking if I have missed a step
Sonic
April 6, 2023, 3:34pm
4
Hi there!
I have the same problem than @GC29 :
Ubuntu 20.04 and 22.04 hosts
subscription-manager
, katello-host-tools
and katello-host-tools-tracer
installed (edit, installed from apt.atix.de )
Still having the Enable Traces
button in the Foreman GUI
Still having the Cannot upload tracer data, is this client registered?
message on all the hosts.
Is there something else to do for register the client ?
GC29
April 7, 2023, 11:55am
5
Thanks for your feedback, I’m feeling less alone!
1 Like
Did you run “package-profile-upload --force” on the debian/ubuntu host?
On the foreman-rake console, you can run:
irb(main):006:0> a = Host.find_by(name: 'ubuntu2004-219.local')
irb(main):007:0> a.content_facet.tracer_installed?
This should show “true”. It checks, if on the host a package “python3-katello-host-tools-tracer” is installed. See: katello/content_facet.rb at master · Katello/katello · GitHub
GC29
April 12, 2023, 8:40am
7
Hi Bernhard,
On the foreman-rake console, it return me “false”
a.content_facet.tracer_installed?
=> false
On the concerned host:
# apt list --installed | grep python3-katello-host-tools-tracer
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
python3-katello-host-tools-tracer/unknown,now 3.5.7.1-1 all [installed,automatic]
The package-profile-upload returns me:
# package-profile-upload --force
Package profile updates
status: 1
updates: []
exceptions:
Thanks for you report. Just opened a new PR which should fix the issue.
Katello:master
← ATIX-AG:fix_36297
opened 07:46AM - 13 Apr 23 UTC
#### What are the changes introduced in this pull request?
#### Consideration… s taken when implementing this change?
#### What are the testing steps for this pull request?
Please give it a try.
GC29
April 13, 2023, 2:27pm
9
On my server /usr/share/gems/gems/katello-4.7.4/app/models/katello/host/content_facet.rb is only 282 lines…
Should I modify this part ?
213 def katello_agent_installed?
214 self.host.installed_packages.where("#{Katello::InstalledPackage.table_name}.name" => 'katello-agent').any?
215 end
216
217 def tracer_installed?
218 self.host.installed_packages.where("#{Katello::InstalledPackage.table_name}.name" => [ "python-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
219 "python3-#{HOST_TOOLS_TRACER_PACKAGE_NAME}",
220 HOST_TOOLS_TRACER_PACKAGE_NAME ]).any?
221 end
222
223 def host_tools_installed?
224 host.installed_packages.where("#{Katello::InstalledPackage.table_name}.name" => [ "python-#{HOST_TOOLS_PACKAGE_NAME}",
225 "python3-#{HOST_TOOLS_PACKAGE_NAME}",
226 HOST_TOOLS_PACKAGE_NAME ]).any?
227 end
Sonic
April 13, 2023, 7:48pm
10
Hi @Bernhard_Suttner
I have made the same changes that those of the PR in the /usr/share/gems/gems/katello-4.8.0.rc2/app/models/katello/host/content_facet.rb
file and it looks like the package is now tagged as installed:
irb(main):001:0> Host.find_by(name: 'foreman-t5.lab').content_facet.tracer_installed?
=> true
irb(main):002:0> Host.find_by(name: 'foreman-t4.lab').content_facet.tracer_installed?
=> true
irb(main):003:0> Host.find_by(name: 'foreman-t3.lab').content_facet.tracer_installed?
=> true
irb(main):004:0> Host.find_by(name: 'foreman-t2.lab').content_facet.tracer_installed?
=> true
And no more Cannot upload tracer data, is this client registered?
message:
sonic@foreman-t2:~$ sudo katello-tracer-upload
sonic@foreman-t2:~$
But still no traces available dand the Enable Traces button in the GUI:
Thanks for the help
1 Like
Sonic
April 13, 2023, 8:06pm
11
Oh my bad, after restarting the host the traces looks working!
3 Likes
GC29
April 14, 2023, 9:55am
13
I just try the fix, it works for me too!
Thanks!
1 Like