Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard contents are not shown in Fedora 23 #12

Closed
lcorreia opened this issue Dec 10, 2015 · 13 comments
Closed

Dashboard contents are not shown in Fedora 23 #12

lcorreia opened this issue Dec 10, 2015 · 13 comments
Assignees

Comments

@lcorreia
Copy link
Member

No error shown in log. In firebug I can see the following:

Synchronous XMLHttpRequest on the main thread is deprecated because of its detrimental effects to the end user's experience. For more help http://xhr.spec.whatwg.org/ jquery.min.js:5:0
not well-formed :1:80
TypeError: data.memory is undefined jquery.min.js:636:9

@danielhb
Copy link
Contributor

It is worth saying that this error was revealed when installing Ginger via RPM.

@samhenri
Copy link
Contributor

Does it happens on all browsers (including Windows browsers when you access the server remotely)? The XMLHttpRequest message is just a warning and not part of the problem, it is due to jquery implementation.
I haven't touched a bit of the dashboard js scripts, I just tweaked a bit from the line-charts JS and the old kimchi.hosts.js that had the scripts for all the components in Host tab. Last time I checked it was fine on Fedora 22 but I never installed by RPM.
I believe this problem might be related to dependencies not being installed. I had the same problem in the latest CentOs build. Can you check on Chrome and confirm if you have the same errors on the developer console?
It would also give a hint if in the Networks tab from Google Inspector it shows the "stats" XHR request and it contents.
I think data.memory key should come from this json so if it's empty, undefined or null, it must be a problem.

@danielhb
Copy link
Contributor

I can assert that this bug is happening in the RPM install of wok/ginger/gingerbase in F23. I don't believe this is a F23 only issue though.

This is the result when loading WoK for the first time in Chrome running in incognito (private) mode:

image

To be completely fair this is an 'old' error of the old UI that happens quite often even when things are working. Thus I don't know if this is the root cause of this specific bug (although it should be looked at when possible).

This is the error that happens when trying to load the Dashboard tab:

image

I've expanded the error in the console to show you more details:

image

From this screenshot we can see that the error is happening because data['memory'] is undefined, as said in the first comment of this issue. Again, this was discovered running in Chrome in private mode, so cache problems are somewhat discarded too.

If you have a Fedora 22 machine it is possible to create the RPM packages and install them in your own environment to see the error occurring:

  • build wok, gingerbase and ginger
  • execute $sudo make rpm in Wok root, Gingerbase root and Ginger root. The RPM will be generated in the rpm/RPMs/noarch subdir
  • install each generated RPM using rpm or even yum/dnf
  • run wokd service: $ sudo systemctl start wokd.service
  • if everything goes smooth, WoK should be running in localhost:8000.

Let me know if you have issues creating the RPMs. @lcorreia and myself are actively to make the packaging works due to the WoK/Gingerbase separation from Kimchi and if a new problem is detected we'll try to fix them ASAP.

Daniel

@danielhb danielhb added this to the Ginger Base 2.0 milestone Dec 11, 2015
@alinefm
Copy link
Member

alinefm commented Dec 11, 2015

Hi @danielhb! Hi @samhenri!

Recently the API was changed to return multiple values for memory.
It is worth to verify the backend too.
@chandrureddy, could you, please, take a look on it?

@danielhb
Copy link
Contributor

This is the current API:

[danielhb@arthas gingerbase]$ curl -u root -H "Content-Type: application/json" -H "Accept: application/json" -k "https://localhost:8001/plugins/gingerbase/host" -X GET
Enter host password for user 'root':
{
  "os_distro":"Fedora",
  "cpus":{
    "offline":0,
    "online":4
  },
  "cpu_model":"Intel(R) Core(TM) i5-3320M CPU @ 2.60GHz",
  "os_version":"22",
  "host":"arthas.ltc.br.ibm.com",
  "os_codename":"Twenty Two",
  "architecture":"x86_64",
  "memory":{
    "offline":0,
    "online":8059600896
  }
}[danielhb@arthas gingerbase]$ 

At first glance it doesn't look that data['memory'] is undefined

@potula-chandra
Copy link
Member

@danielhb, First errors due tot he fact that we split the functionality of the Host into Dashboard and Updates. I guess we also need to split the help html same. Probably I will work on the help split part.

@sureshab, Could you please quickly help in to solving the memory attribute issue ?

@danielhb
Copy link
Contributor

Update: in F23 the gingerbase/host API returns empty:

[danielhb@localhost ~]$ curl -u root -H "Content-Type: application/json" -H "Accept: application/json" -k "https://localhost:8001/plugins/gingerbase/host" -X GET
Enter host password for user 'root':

{}

I consider this a backend bug, not an UI one. I'll reassign it to myself for the time being to free up @samhenri queue. Let me know if someone else is willing to fix this

@danielhb danielhb added backend and removed UI labels Dec 11, 2015
@danielhb danielhb assigned danielhb and unassigned samhenri Dec 11, 2015
@danielhb
Copy link
Contributor

@chandrureddy ,

"First errors due tot he fact that we split the functionality of the Host into Dashboard and Updates. I guess we also need to split the help html same. Probably I will work on the help split part."

Okay! Feel free to create a new issue to report this bug if you like.

@potula-chandra
Copy link
Member

Yep Sure.

On 11/12/15 5:34 PM, Daniel Henrique Barboza wrote:

@chandrureddy https://github.com/chandrureddy ,

"First errors due tot he fact that we split the functionality of the
Host into Dashboard and Updates. I guess we also need to split the
help html same. Probably I will work on the help split part."

Okay! Feel free to create a new issue to report this bug if you like.


Reply to this email directly or view it on GitHub
#12 (comment).

@potula-chandra
Copy link
Member

Created #14 for the same.

I will be working on it.

On 11/12/15 5:34 PM, Daniel Henrique Barboza wrote:

@chandrureddy https://github.com/chandrureddy ,

"First errors due tot he fact that we split the functionality of the
Host into Dashboard and Updates. I guess we also need to split the
help html same. Probably I will work on the help split part."

Okay! Feel free to create a new issue to report this bug if you like.


Reply to this email directly or view it on GitHub
#12 (comment).

@sureshab
Copy link
Member

@danielhb
Please feel free to reassign this issue to me. I can take a look at back end code.

@danielhb danielhb assigned sureshab and danielhb and unassigned danielhb and sureshab Dec 11, 2015
@danielhb
Copy link
Contributor

@sureshab , I just went trigger happy and fixed this bug. The fix is available in the ML.

Thanks

danielhb added a commit that referenced this issue Dec 14, 2015
This code was invoking psutil.NUM_CPUS before checking
if the attribute exists. In case it doesn't (seems to
be the case in Fedora 23), this was causing an uncaught
exception and plugins/gingerbase/host API returning empty.
The UI is not ready to deal with this response and, in
this case, the Dashboard doesn't load.

If we have no means of getting the 'online_cpus' attribute
the values of 'online_cpus' and 'offline_cpus' now defaults
to "unknown".

Signed-off-by: Daniel Henrique Barboza <dhbarboza82@gmail.com>
@danielhb
Copy link
Contributor

Patch applied to remote master/next branches

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants