I just installed 2.3.4 and restarted the services with ‘katello-service restart’. Unfortunately, the issue of the Ansible role switcher not appearing is still occurring. Is there any type of cache to clear or command to rebuild javascripts that needs to be run?
If not, what log file would you look into to try to help find the issue?
i’ve already patched my lab, but the new version did not fix that issue.
Is there another patch of core components needed?
As far as i understand the comments in the PR, it was expected that the patch for foreman_ansible would fix that issue.
The PR for the fix in foreman core was closed in favor of the patch for foreman-ansible…
I noticed that after installing version 2.3.4 I have the following in the log. Maybe that’s the reason for the problem.
2019-05-08T07:08:22 [I|app|ab30a973] Deface: [WARNING] No :original defined for ‘ansible_roles_tab’, you should change its definition to include:
:original => ‘8c63c5282ee199068bfd65475e13066ee981089a’
2019-05-08T07:08:22 [I|app|ab30a973] Deface: [WARNING] No :original defined for ‘ansible_roles_tab_content’, you should change its definition to include:
:original => ‘738d75b8975dc598101e60505810ef267e2c43ae’
I’m really hoping that I’m missing something fundamental. This would appear to me to be a bit of a show stopper if you’re depending on Ansible integration.
I’ve followed the pull request through, and I appear to have the updated RPMs installed, yet I still have no Ansible roles available in a host edit session. I’m seeing the same warnings that Edll posted.
I’m not sure if this is the right one but I can see it in the console:
TypeError: “l.propsToSnakeCase is not a function”
getAnsibleRoles foreman_ansible-11e40d5c9201b72b3e66.js:1
Redux 2
value foreman_ansible-11e40d5c9201b72b3e66.js:1
React 8
n i18nProviderWrapperFactory.js:18
i es6.promise.js:66
O es6.promise.js:83
c _microtask.js:18
react-dom.production.min.js:187:139
React 12
n i18nProviderWrapperFactory.js:18
i es6.promise.js:66
O es6.promise.js:83
c _microtask.js:18
Unhandled promise rejection TypeError: “l.propsToSnakeCase is not a function”
getAnsibleRoles foreman_ansible-11e40d5c9201b72b3e66.js:1
Redux 2
value foreman_ansible-11e40d5c9201b72b3e66.js:1
React 8
n i18nProviderWrapperFactory.js:18
i es6.promise.js:66
O es6.promise.js:83
c _microtask.js:18
es6.promise.js:101
t es6.promise.js:101
exports _perform.js:3
P es6.promise.js:95
exports _invoke.js:5
_task.js:35
y _task.js:21
v _task.js:25
Ok, that may help. Meanwhile I tested 1.22 RC1 with foreman_ansible 2.3.3 (even the one from the original report) and it works. So it may be different issue. @ezr-ondrej do you have any other ideas?
react-dom.production.min.js:187 TypeError: (0 , l.propsToSnakeCase) is not a function
at foreman_ansible-11e40d5c9201b72b3e66.js:1
at index.js:8
at Object.getAnsibleRoles (bindActionCreators.js:3)
at t.value (foreman_ansible-11e40d5c9201b72b3e66.js:1)
at Wi (react-dom.production.min.js:218)
at Vi (react-dom.production.min.js:211)
at $i (react-dom.production.min.js:210)
at qi (react-dom.production.min.js:210)
at Di (react-dom.production.min.js:208)
at fi (react-dom.production.min.js:206)
Lo @ react-dom.production.min.js:187
n.callback @ react-dom.production.min.js:194
Ia @ react-dom.production.min.js:143
Ba @ react-dom.production.min.js:144
Wi @ react-dom.production.min.js:219
Vi @ react-dom.production.min.js:211
$i @ react-dom.production.min.js:210
qi @ react-dom.production.min.js:210
Di @ react-dom.production.min.js:208
fi @ react-dom.production.min.js:206
enqueueSetState @ react-dom.production.min.js:147
w.setState @ react.production.min.js:12
(anonymous) @ i18nProviderWrapperFactory.js:18
Promise.then (async)
I18nProviderWrapper(Connect(t)) @ i18nProviderWrapperFactory.js:17
Ao @ react-dom.production.min.js:173
ci @ react-dom.production.min.js:201
ui @ react-dom.production.min.js:202
Vi @ react-dom.production.min.js:211
$i @ react-dom.production.min.js:210
qi @ react-dom.production.min.js:210
Di @ react-dom.production.min.js:208
fi @ react-dom.production.min.js:206
Zi @ react-dom.production.min.js:222
ts @ react-dom.production.min.js:223
cs.render @ react-dom.production.min.js:230
(anonymous) @ react-dom.production.min.js:234
Yi @ react-dom.production.min.js:221
ds @ react-dom.production.min.js:234
render @ react-dom.production.min.js:236
t.mount @ MountingService.js:26
(anonymous) @ foreman_ansible-11e40d5c9201b72b3e66.js:1
dispatch @ jquery.js:4737
b.handle @ jquery.js:4549
trigger @ jquery.js:7807
(anonymous) @ jquery.js:7875
each @ jquery.js:365
each @ jquery.js:137
trigger @ jquery.js:7874
(anonymous) @ application-1a0cbb115eb11e6b4835d94525d9fb9b6c39ee9f50112a41f122fc2eeca4d6a2.js:9
(anonymous) @ application-1a0cbb115eb11e6b4835d94525d9fb9b6c39ee9f50112a41f122fc2eeca4d6a2.js:1
dispatch @ jquery.js:4737
b.handle @ jquery.js:4549
trigger @ jquery.js:7807
(anonymous) @ jquery.js:7875
each @ jquery.js:365
each @ jquery.js:137
trigger @ jquery.js:7874
onLoad @ application-1a0cbb115eb11e6b4835d94525d9fb9b6c39ee9f50112a41f122fc2eeca4d6a2.js:1
l @ jquery.js:3187
fireWith @ jquery.js:3317
ready @ jquery.js:3536
L @ jquery.js:3552
Show 22 more frames
edit:1 [DOM] Found 2 elements with non-unique id #interface: (More info: https://goo.gl/9p2vKq) <fieldset id="interface" data-url="/interfaces/new">… <fieldset id="interface" data-url="/interfaces/new">…
foreman_ansible-11e40d5c9201b72b3e66.js:1 Uncaught (in promise) TypeError: (0 , l.propsToSnakeCase) is not a function
at foreman_ansible-11e40d5c9201b72b3e66.js:1
at index.js:8
at Object.getAnsibleRoles (bindActionCreators.js:3)
at t.value (foreman_ansible-11e40d5c9201b72b3e66.js:1)
at Wi (react-dom.production.min.js:218)
at Vi (react-dom.production.min.js:211)
at $i (react-dom.production.min.js:210)
at qi (react-dom.production.min.js:210)
at Di (react-dom.production.min.js:208)
at fi (react-dom.production.min.js:206)
This appears when the main host pane appears, and remains when the Ansible pane is selected.
thanks @jkalchik and @Edll for the backtrace.
That is really unrelated to the issue solved in the PR. The function which is not found is introduced in 1.22, so this seems to be a core/plugin version mismatch (the plugin expect the core js helpers to be in newer version).
Thanks everyone for confirmation. Note that in 1.22 (foreman_ansible 3.0) this component will be changed. We’ll be happy to hear your feedback once you upgrade. It would be also very beneficial for us if you could test our nightly builds or RCs, e.g. when we add new features. If you’re interested, please let us know, right now we have 1.22 RC1 test week and we are working on bigger foreman_ansible 3.0 release which will allow running ansible via ansible-runner.
@Marek_Hulan, I’d love to test on nightly builds in a sandbox… I respun a VM earlier this week, and can’t even install katello, it comes up with a puppet-agent version requirement that can’t be satisified with the configured repository list. I’m using Foreman :: Plugin Manuals installing on CentOS7.
After updating tfm-rubygem-foreman_ansible to version 2.3.5-1.fm1_21.el7.noarch I cannot use Ansible variables. When I’m trying to use ansible variables (https://foreman.*/ansible/ansible_variables) I have following error:
**Oops, we're sorry but something went wrong** undefined local variable or method 'hash_for_new_ansible_variable_path' for #<#<Class:0x0000000010f43868>:0x00007f1b8700c518> Did you mean? hash_for_edit_ansible_variable_path hash_for_ansible_variable_path hash_for_api_ansible_variable_path hash_for_ansible_variables_path hash_for_api_ansible_variables_path hash_for_api_ansible_role_path hash_for_api_ansible_roles_path hash_for_import_ansible_variables_path hash_for_edit_ansible_variable_url hash_for_api_ansible_variable_url hash_for_ansible_role_path hash_for_api_smart_variable_path hash_for_api_ansible_variables_url hash_for_ansible_variable_url hash_for_ansible_variables_url