gvde
April 19, 2022, 12:36pm
#1
Problem:
When I want to check the details of one of our smart proxies, the page remains empty. It doesn’t even show the selector to switch to another smart proxy. See screenshot below.
My two other proxies (main server and content proxy) look just fine. It’s only the third proxy which has only logs and puppet features enabled which doesn’t show anything.
I think it worked before I have upgraded to katello 4.3 but I am not 100% sure about this.
Expected outcome:
Show the smart proxy details.
Foreman and Proxy versions:
Foreman 3.1.2
Foreman and Proxy plugin versions:
Katello 4.3.1
Distribution and version:
CentOS 7.9
Other relevant data:
Hi,
is there any error in the application log or in the browser console?
gvde
April 20, 2022, 6:45am
#3
No. Not really. This is the console log:
This page uses the non standard property “zoom”. Consider using calc() in the relevant property values, or using “transform” along with “transform-origin: 0 0”. 6-foreman-puppet-example-com
window.controllers/Controllers is deprecated. Do not use it for UA detection. index.js:1362
WARNING: Tried to load AngularJS more than once. katello:common-fff5953a7136b4e914ac.js:7:179007
Source map error: Error: NetworkError when attempting to fetch resource.
Resource URL: https://foreman.example.com/webpack/katello/katello:common-fff5953a7136b4e914ac.js
Source Map URL: katello:common-fff5953a7136b4e914ac.js.map
downloadable font: kern: Too large subtable (font-family: "Open Sans" style:normal weight:700 stretch:100 src index:3) source: https://foreman.example.com/assets/OpenSans-Bold-webfont-895ed3b017b8c886c1f6be929d261f4be5e9b276651c9a3ee6243593feafb9f4.woff2
downloadable font: Table discarded (font-family: "Open Sans" style:normal weight:700 stretch:100 src index:3) source: https://foreman.example.com/assets/OpenSans-Bold-webfont-895ed3b017b8c886c1f6be929d261f4be5e9b276651c9a3ee6243593feafb9f4.woff2
However, I see the same errors (and more) accessing the details of the other proxies.
MarcoG
April 20, 2022, 6:45am
#4
Same problem here: we’ve a secondary smart proxy with only dns and dhcp. After 4.3.1 upgrade we’ve the same blank page and no error messages in Foreman logs
gvde
April 20, 2022, 6:47am
#5
Looks to me as if smart proxies without content proxy are affected…
Interesting, and how about application log, are there any errors?
# Logs folder:
/var/log/foreman
# or use:
foreman-tail
MarcoG
April 20, 2022, 7:02am
#7
No error message:
==> /var/log/foreman/production.log <==
2022-04-20T08:58:59 [I|app|bf79c9b5] User ‘jdoh’ logged in from ‘192.168.25.7’
2022-04-20T08:58:59 [I|app|bf79c9b5] Redirected to https://katello.example.com/smart_proxies/2-capsule-01-example-com
2022-04-20T08:58:59 [I|app|bf79c9b5] Completed 302 Found in 764ms (ActiveRecord: 190.4ms | Allocations: 29509)
2022-04-20T08:58:59 [I|app|e291d24c] Started GET “/smart_proxies/2-capsule-01-example-com” for 192.168.25.7 at 2022-04-20 08:58:59 +0200
2022-04-20T08:58:59 [I|app|e291d24c] Processing by SmartProxiesController#show as HTML
2022-04-20T08:58:59 [I|app|e291d24c] Parameters: {“id”=>“2-capsule-01-example-com”}
2022-04-20T08:58:59 [I|app|e291d24c] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/views/foreman/smart_proxies/show.html.erb within katello/layouts/foreman_with_bastion
2022-04-20T08:58:59 [I|app|e291d24c] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/views/foreman/smart_proxies/show.html.erb within katello/layouts/foreman_with_bastion (Duration: 11.1ms | Allocations: 970)
2022-04-20T08:58:59 [I|app|e291d24c] Rendered layouts/_application_content.html.erb (Duration: 6.1ms | Allocations: 731)
2022-04-20T08:58:59 [I|app|e291d24c] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/engines/bastion/app/views/bastion/layouts/assets.html.erb
==> /var/log/httpd/foreman-ssl_access_ssl.log <==
192.168.25.7 - - [20/Apr/2022:08:58:59 +0200] “GET /smart_proxies/2-capsule-01-example-com HTTP/1.1” 200 6497 “https://katello.example.com/users/login ” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0”
192.168.25.7 - - [20/Apr/2022:08:59:00 +0200] “GET /assets/bastion_katello/bastion_katello-68c5a5a4b6067df3d32e8b6a83c2ba7d2b7aa920b6c9db6cf4838e2b75aaf7c3.css HTTP/1.1” 304 - “https://katello.example.com/smart_proxies/2-capsule-01-example-com ” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0”
192.168.25.7 - - [20/Apr/2022:08:59:00 +0200] “GET /assets/bastion/bastion-e08b9980168e6aaae07eee70aafb857a12d686bf7c4f732ba73c92e056144dc4.css HTTP/1.1” 304 - “https://katello.example.com/smart_proxies/2-capsule-01-example-com ” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0”
192.168.25.7 - - [20/Apr/2022:08:59:00 +0200] “GET /assets/bastion/angular-i18n/angular-locale_en-1b68bdfcea9e92a5c5e692a1acad8f1118e6afe06685e1fecdfb2ad8532521bd.js HTTP/1.1” 304 - “https://katello.example.com/smart_proxies/2-capsule-01-example-com ” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0”
192.168.25.7 - - [20/Apr/2022:08:59:00 +0200] “GET /assets/bastion/bastion-c5aab6e0ee46fdd6d4d1c92d1f87c789d2d4a6dd09f38a100135435c76895faa.js HTTP/1.1” 304 - “https://katello.example.com/smart_proxies/2-capsule-01-example-com ” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0”
192.168.25.7 - - [20/Apr/2022:08:59:00 +0200] “GET /assets/bastion_katello/bastion_katello-3242f718acec9802f50d4a67e44f3915c3010577148b9bc7d1c41710585e3ea9.js HTTP/1.1” 304 - “https://katello.example.com/smart_proxies/2-capsule-01-example-com ” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0”
==> /var/log/foreman/production.log <==
2022-04-20T08:58:59 [I|app|e291d24c] Rendering layouts/base.html.erb
2022-04-20T08:58:59 [I|app|e291d24c] Rendered layouts/base.html.erb (Duration: 117.2ms | Allocations: 40418)
2022-04-20T08:58:59 [I|app|e291d24c] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/engines/bastion/app/views/bastion/layouts/assets.html.erb (Duration: 425.0ms | Allocations: 77833)
2022-04-20T08:58:59 [I|app|e291d24c] Completed 200 OK in 584ms (Views: 461.0ms | ActiveRecord: 91.9ms | Allocations: 87647)
==> /var/log/httpd/foreman-ssl_access_ssl.log <==
192.168.25.7 - - [20/Apr/2022:08:59:00 +0200] “GET /notification_recipients HTTP/1.1” 200 40 “https://katello.example.com/smart_proxies/2-capsule-01-example-com ” “Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:98.0) Gecko/20100101 Firefox/98.0”
==> /var/log/foreman/production.log <==
2022-04-20T08:59:00 [I|app|ca252646] Started GET “/notification_recipients” for 192.168.25.7 at 2022-04-20 08:59:00 +0200
2022-04-20T08:59:00 [I|app|ca252646] Processing by NotificationRecipientsController#index as JSON
2022-04-20T08:59:00 [I|app|ca252646] Completed 200 OK in 88ms (Views: 0.3ms | ActiveRecord: 58.7ms | Allocations: 4358)
gvde
April 20, 2022, 7:04am
#8
There are no errors and the production log is actually very brief for the “broken” smart proxy pages.
2022-04-20T09:02:46 [I|app|de1e95ee] Started GET "/smart_proxies/6-foreman-puppet-example-com" for 136.172.17.101 at 2022-04-20 09:02:46 +0200
2022-04-20T09:02:46 [I|app|de1e95ee] Processing by SmartProxiesController#show as HTML
2022-04-20T09:02:46 [I|app|de1e95ee] Parameters: {"id"=>"6-foreman-puppet-example-com"}
2022-04-20T09:02:46 [I|app|de1e95ee] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/views/foreman/smart_proxies/show.html.erb within katello/layouts/foreman_with_bastion
2022-04-20T09:02:46 [I|app|de1e95ee] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/views/foreman/smart_proxies/show.html.erb within katello/layouts/foreman_with_bastion (Duration: 8.5ms | Allocations: 6265)
2022-04-20T09:02:46 [I|app|de1e95ee] Rendered layouts/_application_content.html.erb (Duration: 3.7ms | Allocations: 5886)
2022-04-20T09:02:46 [I|app|de1e95ee] Rendering /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/engines/bastion/app/views/bastion/layouts/assets.html.erb
2022-04-20T09:02:46 [I|app|de1e95ee] Rendering layouts/base.html.erb
2022-04-20T09:02:46 [I|app|de1e95ee] Rendered layouts/base.html.erb (Duration: 21.1ms | Allocations: 24583)
2022-04-20T09:02:46 [I|app|de1e95ee] Rendered /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/engines/bastion/app/views/bastion/layouts/assets.html.erb (Duration: 160.3ms | Allocations: 148862)
2022-04-20T09:02:46 [I|app|de1e95ee] Completed 200 OK in 191ms (Views: 163.9ms | ActiveRecord: 16.4ms | Allocations: 171241)
gvde
April 20, 2022, 7:16am
#9
O.K. Looking at the file /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.1/app/views/foreman/smart_proxies/show.html.erb
and the history on github
Before the commit in December it looked like this:
<% if @smart_proxy.pulp_mirror? -%>
<div ng-controller="CapsuleContentController">
<%= render :file => 'smart_proxies/show' %>
</div>
<% else -%>
<%= render :file => 'smart_proxies/show' %>
<% end -%>
It’s only rendered if smart_proxy.pulp_mirror or smart_proxy.pulp_primary is set. Looks to me a lot like it’s only rendered if it’s a content proxy…
Committer: @iballou
Pinging @katello team, can anybody check the issue?
evgeni
April 20, 2022, 8:16am
#11
Can you try making this:
<% if @smart_proxy.pulp_mirror? -%>
<div ng-controller="CapsuleContentController">
<%= render :file => 'smart_proxies/show' %>
</div>
<% elsif @smart_proxy.pulp_primary? -%>
<div ng-controller="PulpPrimaryController">
<%= render :file => 'smart_proxies/show' %>
</div>
<% else -%>
<%= render :file => 'smart_proxies/show' %>
<% end -%>
(Essentially adding back the else
branch?)
You’ll need to restart services afterwards.
evgeni
April 20, 2022, 8:27am
#12
3 Likes
MarcoG
April 20, 2022, 11:01am
#13
yes, it works !!! thank you very much
gvde
April 20, 2022, 11:04am
#14
Tried it and it works. Didn’t even have to restart anything.
1 Like
Thanks @evgeni ! We’ll be pulling this into the next release of 4.4 and 4.3.
1 Like