Bug #34746
openForeman Web UI Cannot Create Host After Upgrade (Templates Missing)
Description
foreman_xen : 1.0.1
foreman_version: 3.2
katello version: 4.4
I recently upgraded from foreman 3.1 to 3.2 (and katello 4.3 to 4.4). Before in the prior Foreman/Katello versions provisioning host in the UI worked fine. Now if I now attempt to create a host I run into issues: If I go the Host Creation page and select the Xen compute resource, the "spinner" on the top of the page spins endlessly, there is NO field for the "VM Template" which means it's impossible to create a VM and the interface field does not populate. Can anyone tell me how to enable debug logging in the foreman_xen plugin so I can continue troubleshooting? I have a hunch there's a problem with the "new" caching mechanism ( https://github.com/theforeman/foreman-xen/commit/717923b3bb08e25f7006e1cea24c7328e58075f1 ). Likewise, if anyone knows how to clear the cache I'd like to try that as well.
Updated by Ben Erickson over 2 years ago
I forgot to mention that in my case, navigating to the Compute Resource page and clicking on the "Images" tab brings up NO results. It should IIRC be listing the builtin templates on the Xen server at a minimum. So something seems screwed up there.
Updated by Roman Aleksic over 2 years ago
I have the same issue with foreman 3.3 (+katello 4.5). Would be great if somebody could look into it or help since vm deployment is broken with xen/xcp-ng.
Updated by Roman Aleksic over 2 years ago
Error in the JS Web Console:
Uncaught TypeError: tfm.numFields is undefined
<anonymous> foreman-vendor.bundle-v10.1.0-production-764404f58e4a47165b8a.js line 162 > eval:2
jQuery 3
globalEval
we
replaceWith
success host_edit-c169eb8c2e14ba1a17b3f5ff574b87eb3a5873a3f21373dc366c82f9dcebaf24.js:1
jQuery 6
c
fireWith
C
t
send
ajax
submit_with_all_params host_edit-c169eb8c2e14ba1a17b3f5ff574b87eb3a5873a3f21373dc366c82f9dcebaf24.js:1
<anonymous> host_edit-c169eb8c2e14ba1a17b3f5ff574b87eb3a5873a3f21373dc366c82f9dcebaf24.js:1
jQuery 10
dispatch
handle
add
ue
each
each
ue
on
js
js
Webpack 7
n
js
n
0
n
<anonymous>
<anonymous>
foreman-vendor.bundle-v10.1.0-production-764404f58e4a47165b8a.js line 162 > eval:2:2
<anonymous> foreman-vendor.bundle-v10.1.0-production-764404f58e4a47165b8a.js line 162 > eval:2
jQuery 3
globalEval
we
replaceWith
success host_edit-c169eb8c2e14ba1a17b3f5ff574b87eb3a5873a3f21373dc366c82f9dcebaf24.js:1
jQuery 6
c
fireWith
C
t
(Async: EventHandlerNonNull)
send
ajax
submit_with_all_params host_edit-c169eb8c2e14ba1a17b3f5ff574b87eb3a5873a3f21373dc366c82f9dcebaf24.js:1
<anonymous> host_edit-c169eb8c2e14ba1a17b3f5ff574b87eb3a5873a3f21373dc366c82f9dcebaf24.js:1
jQuery 10
dispatch
handle
(Async: EventListener.handleEvent)
add
ue
each
each
ue
on
js
js
Webpack 7
n
js
n
0
n
<anonymous>
<anonymous>
Updated by Ben Erickson over 2 years ago
Roman Aleksic wrote:
Error in the JS Web Console:
[...]
Okay well that was easy. Thanks for the JS error message. According to this git issue ( https://github.com/theforeman/foreman/pull/8538 ), numFields is no longer used. I removed the offending line from /usr/local/share/gems/gems/foreman_xen-1.0.1/app/views/compute_resources_vms/form/xenserver/_base.html.erb and the host now builds properly. Looks like a pull request was already submitted to fix this here: https://github.com/theforeman/foreman-xen/pull/72