Created attachment 1273678 [details] screenshot, red ones -> problematic, orange -> the first one Description of problem: Hi, I was creating the service dialog (the orange box in the screenshot), at some moment, the "unexpected" error popped up. (the error about multiple tabs, but i had only one). After the fact i noticed that now there is an issue with the service dialogs. When i click/select certain service dialogs, i now get in production.log an "comparison of NilClass with String failed" error and the dialog is not shown in the webui. The previously selected dialog is shown instead, and the actions apply also to the previously selected items. So one cannot edit or delete the offending dialog. In the uploaded screenshot, i get the error "comparison of NilClass with String failed" on the items inside the red box. All issues started when i was creating the item in the orange box and got interrupted by the "unexpected error". I am still able to view and edit all dialogs (included the problematic ones) if i go: AUTOMATE -> CUSTOMIZATION -> In "All Dialogs", check one of the offending ones -> Click the "configuration" Button and select "Edit the selected dialog". If i do that, i do not get the traceback. I recently updated to 5.7.2.1 from 5.7.1.3, i never saw this before. With the method above, i deleted the offending dialog (orange box from the screenshot) But the issue still remains for the other items in the red box. With the previous versions there was no issue at all. I don't know if this was caused by an abnormal dialog creation or if it is new from 5.7.2.1 and general. I rebooted (and cleaned logs) for both cfme appliances. The issue still persist. How reproducible: always Version-Release number of selected component (if applicable): 5.7.2.1 Steps to Reproduce: 1. Go to Automate -> Customization -> Service Dialogs 2. From the "left" "all-dialogs" list, select the offending dialogs 3. traceback Actual results: unable to select some service dialogs by clicking on them from the "left" "all-dialogs" list. WORKAROUND: AUTOMATE -> CUSTOMIZATION -> In "All Dialogs" from the "right" (the one that has checkboxes), check one of the offending ones -> Click the "configuration" Button and select "Edit the selected dialog". If i do that, i do not get the traceback. Expected results: being able to select (and edit, delete, etc) all services dialogs by clicking on them from the "left" "all-dialogs" list. (and no traceback)
Created attachment 1273679 [details] production.log showing the traceback
Created attachment 1273681 [details] DC-MAIN support data
Created attachment 1273682 [details] DC-RHV-Worker Support Data
This sounds extremely similar to what was happening in this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1435758 The fix should be the same, as it's crashing in the same place. There's a hotfix attached to that BZ that you should be able to use. If the hotfix does not resolve the issue, please re-open this ticket. *** This bug has been marked as a duplicate of bug 1435758 ***
Hi, I tried the hot-fix in BZ #1435758, but nothing changed. Revisiting the production.log file: [----] F, [2017-04-26T11:34:55.697139 #2849:140e970] FATAL -- : Error caught: [ActionView::Template::Error] comparison of NilClass with String failed /var/www/miq/vmdb/app/views/miq_ae_customization/_dialog_sample.html.haml:77:in `sort_by' /var/www/miq/vmdb/app/views/miq_ae_customization/_dialog_sample.html.haml:77:in `block (4 levels) in _app_views_miq_ae_customization__dialog_sample_html_haml___2929487655071113707_172871580' /var/www/miq/vmdb/app/views/miq_ae_customization/_dialog_sample.html.haml:19:in `each' /var/www/miq/vmdb/app/views/miq_ae_customization/_dialog_sample.html.haml:19:in `block (3 levels) in _app_views_miq_ae_customization__dialog_sample_html_haml___2929487655071113707_172871580' /var/www/miq/vmdb/app/views/miq_ae_customization/_dialog_sample.html.haml:13:in `each' /var/www/miq/vmdb/app/views/miq_ae_customization/_dialog_sample.html.haml:13:in `block (2 levels) in _app_views_miq_ae_customization__dialog_sample_html_haml___2929487655071113707_172871580' /var/www/miq/vmdb/app/helpers/application_helper.rb:1361:in `block in miq_tab_content' This leads to this code in the file '/var/www/miq/vmdb/app/views/miq_ae_customization/_dialog_sample.html.haml' - else - val = field.values.sort_by { |d| field.sort_by == :value ? d.first : d.last } Hum, it is so suspicious... I performed several import/export test and i created a minimal working dialog and a failing working dialog. In the failing/defective dialog: - name: number_of_sockets description: '' data_type: string When 'data_type' is set to 'string' is when the issue does happen. Editing the dialog and set 'data_type' to 'integer' fixes the issue. I tested this on: Server #1 : cfdlgtst1.example.com CFME Version : 5.7.0.17 Server #2 : cfme1.example.com CFME Version : 5.7.2.1
Created attachment 1274261 [details] This dialog is GOOD, no issues.
Created attachment 1274263 [details] This dialog is DEFECTIVE, it causes the traceback.
Does CFME perform some form of validation for the dialogs and also when importing any dialog? Cheers.
Hmm, it's possible the hotfix is incorrect, but the line that it is blowing up on should not exist in the fixed code. I'll attached the _dialog_sample.html.haml as it should be in the latest 5.7 release. Please update the file on all of the UI appliances and restart them and see if that helps.
Created attachment 1274269 [details] _dialog_sample Hotfix file
Hi, Also there is this in both dialogs GOOD/DEFECTIVE: values: - - - "<Choose>" - - '1' - Single Socket - - '2' - Dual Socket - - '4' - Quad Socket I had no idea where the '<Choose>' element came from. Cheers.
Created attachment 1274284 [details] Editing Dialog GOOD, the '<Choose>' entry is shown.
Created attachment 1274285 [details] Same dialog, after deleting the '<Choose>' entry. Please note that it caused an WebUI artifact (red)
Hi, On CFME: 5.7.2.1 the _dialog_sample.html.haml was different from the one in the attachment in Comment #11 $ diff _dialog_sample.html.haml _dialog_sample.html.haml-BAD 72c72,80 < - val = copy_array(field.values) --- > - if field.sort_by.to_s != "none" > - if field.data_type == "integer" > - val = field.values.sort_by { |d| field.sort_by == :value ? d.first.to_i : d.last.to_i } > - val = val.reverse if field.sort_order == :descending > - else > - val = field.values.sort_by { |d| field.sort_by == :value ? d.first : d.last } > - val = val.reverse if field.sort_order == :descending > - else > - val = copy_array(field.values) I updated the _dialog_sample.html.haml in the appliance with the updated one and restarted the appliance. After that, i went to sevice dialogs (and withoud doing anything more) clicked fast over each dialog, specially the ones that caused the traceback. All dialogs displayed correctly and there were no tracebacks in production.log. The CFME appliance "cfme1.example.com" history was: 4.1.x -> Upgrade 4.2.x. (It was not a fresh 4.2.x deployment). Thanks.
Dear customer, The CloudForms team is reviewing the current CloudForms Bug(defect) backlog in order to target engineering efforts. We are closing any bugs for versions that no longer have an active errata stream or that have hit their age limit. We are committing to better management of the backlog as we move forward. If you have an bug that you are still able to reproduce on a current version of CloudForms please open a new bug. If you have any concerns about this, please let us know. Thanks and regards!