Bug 1501927 - RHV compute resource screen shows DataTables warning invalid json response
Summary: RHV compute resource screen shows DataTables warning invalid json response
Alias: None
Product: Red Hat Satellite 6
Classification: Red Hat
Component: Compute Resources - RHEV
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: Released
Assignee: orabin
QA Contact: Lukáš Hellebrandt
: 1523251 1583243 (view as bug list)
Depends On:
Blocks: GSS_Sat6Beta_Tracker, GSS_Sat6_Tracker 1583242 1583243
TreeView+ depends on / blocked
Reported: 2017-10-13 13:38 UTC by Eric Lavarde
Modified: 2019-10-07 17:19 UTC (History)
6 users (show)

Fixed In Version: foreman-
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2019-05-14 12:36:38 UTC

Attachments (Terms of Use)
datatables warning dialog (86.93 KB, image/png)
2017-10-13 13:38 UTC, Eric Lavarde
no flags Details
messed up VM tab (48.76 KB, image/png)
2017-10-13 13:39 UTC, Eric Lavarde
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2019:1222 None None None 2019-05-14 12:36:49 UTC
Foreman Issue Tracker 22154 None None None 2018-01-04 17:47:06 UTC
Foreman Issue Tracker 22155 None None None 2018-01-04 17:56:36 UTC
Foreman Issue Tracker 25817 None None None 2019-01-10 11:52:17 UTC

Description Eric Lavarde 2017-10-13 13:38:15 UTC
Created attachment 1338233 [details]
datatables warning dialog

Description of problem:
After creating a compute resource, it doesn't seem to be able to properly parse the output of the API calls. The "Virtual Machines" tab looks as well broken.

Version-Release number of selected component (if applicable):

How reproducible:
Each time I go to the RHEV's compute resource page, but I haven't checked if it happens with any RHV compute resource.

Steps to Reproduce:
1. hammer compute-resource create --datacenter Default --description "RHEV on my Laptop" --locations "Default Location" --name "cr-rhev-laptop" --organizations "Default Organization" --password ADMINPWD --provider Ovirt --url https://rhev.example.com/api --user 'admin@internal'
2. Go to the Satellite UI, Infrastructure -> Compute resources
3. Click on the compute resource's name

Actual results:
Error message dialog: DataTables warning: table id=DataTables_Table_0 - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1 (see screenshot).
Additionally the page with the VMs is empty and rather malformed (e.g. no page number, see 2nd screenshot).

Expected results:
No error message and the VMs are properly listed (there are two of them).

Additional info:
RHEV version 3.6 is used here.

Comment 1 Eric Lavarde 2017-10-13 13:39:12 UTC
Created attachment 1338235 [details]
messed up VM tab

Comment 3 orabin 2018-01-04 17:47:03 UTC
Created redmine issue http://projects.theforeman.org/issues/22154 from this bug

Comment 4 pm-sat@redhat.com 2018-01-04 19:26:12 UTC
Upstream bug assigned to orabin@redhat.com

Comment 5 pm-sat@redhat.com 2018-01-04 19:26:15 UTC
Upstream bug assigned to orabin@redhat.com

Comment 6 orabin 2018-06-18 11:52:31 UTC
*** Bug 1583243 has been marked as a duplicate of this bug. ***

Comment 7 Shira Maximov 2018-07-10 13:58:26 UTC
*** Bug 1523251 has been marked as a duplicate of this bug. ***

Comment 8 orabin 2018-08-09 09:38:57 UTC
The main bug here is: https://projects.theforeman.org/issues/22155 and it was merged upstream.
The other connected bug is about the message being unclear in the UI. That message no longer exists with the bug fixed.
I'm moving this to POST.

Comment 10 Lukáš Hellebrandt 2019-01-03 12:26:38 UTC
Verified with Sat 6.5 snap 9

It is now possible to add and edit RHEV CR using Hammer (this BZ only applied to Hammer, despite it not being mentioned here) without causing wrong Datacenter settings.

Comment 11 Lukáš Hellebrandt 2019-01-03 12:54:06 UTC
Nope. I was too quick verifying this.

1) Whenever I try to change datacenter through Hammer, it seems to set the first datacenter in the list rather than the one specified.
2) When entering a name of nonexistent datacenter, the command "succeeds", changing nothing.

No tracebacks. But I think it can be caused by the wrong logic here [1]. What happens if something fails?

[1] https://projects.theforeman.org/projects/foreman/repository/revisions/62976743b694fea31fc4111f23d8025966af28a4/diff/app/controllers/api/v2/compute_resources_controller.rb

Comment 12 Lukáš Hellebrandt 2019-01-03 13:14:52 UTC
Ad 2) : Also changing to the first datacenter in the list

Comment 13 orabin 2019-02-21 08:50:48 UTC
The new issue opened for the bug in Comment 11 (https://projects.theforeman.org/issues/25817) is now merged.

Comment 15 Lukáš Hellebrandt 2019-03-14 12:12:17 UTC
Verified with Sat 6.5 snap 19 using reproducers from OP and comment 11.

The issue is fixed and regression caused by first fix version and described in comment 11 is also fixed.

Comment 17 errata-xmlrpc 2019-05-14 12:36:38 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.