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

health_at_a_glance : indexError #46

Closed
Poulpatine opened this issue Jul 16, 2014 · 8 comments
Closed

health_at_a_glance : indexError #46

Poulpatine opened this issue Jul 16, 2014 · 8 comments

Comments

@Poulpatine
Copy link

Hi, I'm facing this issue with health_at_a_glance on some of my hosts :

Traceback (most recent call last):
File "./ps.py", line 86, in
main()
File "./ps.py", line 81, in main
xmlilo(iloname, options, logger,args[0])
File "./ps.py", line 34, in xmlilo
dilo = ilocon.get_embedded_health()
File "/home/poulpy/python/env/ilo/lib64/python2.6/site-packages/hpilo.py", line 852, in get_embedded_health
process=process)
File "/home/poulpy/python/env/ilo/lib64/python2.6/site-packages/hpilo.py", line 624, in _info_tag
return self._process_info_tag(message, returntags or [tagname], process)
File "/home/poulpy/python/env/ilo/lib64/python2.6/site-packages/hpilo.py", line 635, in _process_info_tag
return process(self._element_children_to_dict(message))
File "/home/poulpy/python/env/ilo/lib64/python2.6/site-packages/hpilo.py", line 845, in process
if tag in data[category][0]:
IndexError: list index out of range

It seems that this dummy patch is solving the issues :

845c845,846
<                         if tag in data[category][0]:

---
>                         #if tag in data[category][0]:
>                         if tag in data[category]:
@seveas
Copy link
Owner

seveas commented Jul 16, 2014

Thanks for the bugreport. Can you run this command and share the output please:

hpilo_cli -dd your.ilo.ip.here get_fw_version + get_embedded_health

@Poulpatine
Copy link
Author

I'm sorry but I've asked to my company if I was allowed to upload an "anonymised" version of an output but I've still not received any response :(.

Sent from my Minitel \o/

Le 21 juil. 2014 à 22:57, cramasta notifications@github.com a écrit :

Here is the full output. Commented out some info specific to the server

Connecting to xx.xx.xx.xx port 443
Connecting to xx.xx.xx.xx port 443
Sending XML request, 132 bytes
POST /ribcl HTTP/1.1
Host: localhost
Content-Length: 52
Connection: Close


Received 424 bytes
HTTP/1.1 200 OK
Content-Type: text/xml
Transfer-Encoding: chunked
Cache-Control: no-cache
Connection: close
Date: Mon, 21 Jul 2014 20:49:55 GMT
Server: HP-iLO-Server/1.30

Connecting to xx.xx.xx.xx port 443
Connecting to xx.xx.xx.xx port 443
Sending XML request, 301 bytes
POST /ribcl HTTP/1.1
Host: localhost
Content-Length: 220
Connection: Close

<RIB_INFO MODE="read"><GET_FW_VERSION /></RIB_INFO><SERVER_INFO MODE="read"><GET_EMBEDDED_HEALTH /></SERVER_INFO>
Received 37666 bytes
HTTP/1.1 200 OK
Content-Type: text/xml
Transfer-Encoding: chunked
Cache-Control: no-cache
Connection: close
Date: Mon, 21 Jul 2014 20:49:55 GMT
Server: HP-iLO-Server/1.30

@seveas
Copy link
Owner

seveas commented Jul 21, 2014

@Poulpatine no sweat, looks like @cramasta can :) (or at least he could, until he deleted his comments)

Anonymysed versions are hard to parse. If you don't want the output to be publicly visible, please run the following command:

hpilo_cli your.ilo.ip get_embedded_health --save-response=for_dennis.txt

and mail the generated for_dennis.txt to dennis@kaarsemaker.net - any anonymisation you want to apply should be done only by replacing characters with the same number of characters, so do not add more characters or remove parts of the data.

@ghost
Copy link

ghost commented Jul 22, 2014

Just checking if you got my email today?

@seveas
Copy link
Owner

seveas commented Jul 23, 2014

I did get it, but the output is mangled too much and I can't read it back properly. Really, only overwrite characters one by one and don't add/remove more. Also make sure your editor doesn't try to "fix" newlines, as that also messed it up quite bad.

@seveas
Copy link
Owner

seveas commented Jul 23, 2014

I managed to fix up the newlines and can now reproduce the error.

@seveas
Copy link
Owner

seveas commented Jul 23, 2014

The <STORAGE> section is empty in your output. Does the server not have a raid controller? If it does, you may need to update the iLO firmware to see it. In the mean time, I've fixed hpilo.py to not break when it sees this in commit 0fa74cb.

@seveas seveas closed this as completed Jul 23, 2014
@ghost
Copy link

ghost commented Jul 23, 2014

Appreciate you taking the time to put it back together and making a fix, it was probably the editor I used. It does have a raid controller so Ill give updating the ilo firmware a shot.
Thanks!

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

No branches or pull requests

2 participants