grycap / clues

CLUES: an energy management system for HPC Clusters and Cloud infrastructures.
http://www.grycap.upv.es/clues
GNU General Public License v3.0
24 stars 7 forks source link

Error running cluesserver command #1

Closed alvarosimon closed 9 years ago

alvarosimon commented 9 years ago

Hi

We are playing around with Clues in our OpenNebula cluster, we have followed the doc example to use our ONE endpoint (clues and oned are running in the same CentOS7 machine) but we get this error running the command:

# /usr/bin/cluesserver

http://0.0.0.0:8000/
Traceback (most recent call last):
  File "/usr/bin/cluesserver", line 639, in <module>
    main_loop()
  File "/usr/bin/cluesserver", line 636, in main_loop
    CLUES_DAEMON.loop(options.RT_MODE)
  File "/usr/lib/python2.7/site-packages/clueslib/cluesd.py", line 638, in loop
    cpyutils.eventloop.get_eventloop().loop()
  File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 258, in loop
    e = self.execute_next_event()
  File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 226, in execute_next_event
    pe_execute.call()
  File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 77, in call
    Event.call(self)
  File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 55, in call
    self.callback(*self.parameters)
  File "/usr/lib/python2.7/site-packages/clueslib/cluesd.py", line 288, in _monitor_lrms_nodes
    lrms_nodelist = self._platform.get_nodeinfolist()
  File "/usr/lib/python2.7/site-packages/clueslib/platform.py", line 44, in get_nodeinfolist
    return self._lrms.get_nodeinfolist()
  File "/usr/lib/python2.7/site-packages/cluesplugins/one.py", line 322, in get_nodeinfolist
    hosts = self._one.get_hosts()
  File "/usr/lib/python2.7/site-packages/cpyutils/oneconnect.py", line 224, in get_hosts
    return HOST_POOL(str_out).HOST
  File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 111, in __init__
    self._parse(xml_str, parameters)
  File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 81, in _parse
    newObj = className(obj.toxml())
  File "/usr/lib/python2.7/site-packages/cpyutils/oneconnect.py", line 82, in __init__
    self.keywords.update(self.TEMPLATE.get_kws_dict())
  File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 139, in get_kws_dict
    kw_dict[kw] = _to_numeric(self.__dict__[kw])
  File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 114, in _to_numeric
    v = float(value)
TypeError: float() argument must be a string or a number

Do you know where the issue is? we are using ONE 4.12.1 in our case

Thanks in advance! Alvaro

dealfonso commented 9 years ago

Hi,

The error happened because some of the values obtained from the hosts in ONE is "None".

We have just corrected the error and we have pushed a new version of the cpyutils. Please update the installation of the cpyutils.

We think that the issue is related to ONE 4.12.1, in which we have not tested CLUES yet. The error maybe happened because any of fields from the information model of ONE has changed. So, please forgive some problems that may happen until the new version of ONE is tested.

Regards, Carlos A.

El 02/07/15 a las 12:02, Álvaro Simón escribió:

Hi

We are playing around with Clues in our OpenNebula cluster, we have followed the doc example to use our ONE endpoint (clues and oned are running in the same CentOS7 machine) but we get this error running the command:

|# /usr/bin/cluesserver|

http://0.0.0.0:8000/ Traceback (most recent call last): File "/usr/bin/cluesserver", line 639, in main_loop() File "/usr/bin/cluesserver", line 636, in main_loop CLUES_DAEMON.loop(options.RT_MODE) File "/usr/lib/python2.7/site-packages/clueslib/cluesd.py", line 638, in loop cpyutils.eventloop.get_eventloop().loop() File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 258, in loop e = self.execute_next_event() File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 226, in execute_next_event pe_execute.call() File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 77, in call Event.call(self) File "/usr/lib/python2.7/site-packages/cpyutils/eventloop.py", line 55, in call self.callback(*self.parameters) File "/usr/lib/python2.7/site-packages/clueslib/cluesd.py", line 288, in _monitor_lrms_nodes lrms_nodelist = self._platform.get_nodeinfolist() File "/usr/lib/python2.7/site-packages/clueslib/platform.py", line 44, in get_nodeinfolist return self._lrms.get_nodeinfolist() File "/usr/lib/python2.7/site-packages/cluesplugins/one.py", line 322, in get_nodeinfolist hosts = self._one.get_hosts() File "/usr/lib/python2.7/site-packages/cpyutils/oneconnect.py", line 224, in get_hosts return HOST_POOL(str_out).HOST File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 111, in init self._parse(xml_str, parameters) File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 81, in _parse newObj = className(obj.toxml()) File "/usr/lib/python2.7/site-packages/cpyutils/oneconnect.py", line 82, in init self.keywords.update(self.TEMPLATE.get_kws_dict()) File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 139, in get_kws_dict kw_dict[kw] = _to_numeric(self.dict[kw]) File "/usr/lib/python2.7/site-packages/cpyutils/xmlobject.py", line 114, in _to_numeric v = float(value) TypeError: float() argument must be a string or a number

Do you know where the issue is? we are using ONE 4.12.1 in our case

Thanks in advance! Alvaro

— Reply to this email directly or view it on GitHub https://github.com/grycap/clues/issues/1.

alvarosimon commented 9 years ago

Hi Carlos Thanks a lot for your quick answer! I have upgraded cpyutils to the new version and now we don't get the error message. As you said it seems that something has changed in ONE 4.12.1, we get these warnings from our log:

...
[WARNING] 2015-07-02 13:16:49,086 numeric value expected for NETTX - found None
[WARNING] 2015-07-02 13:16:49,090 numeric value expected for CPUSPEED - found None
[WARNING] 2015-07-02 13:16:49,090 numeric value expected for NETRX - found None
[WARNING] 2015-07-02 13:16:49,090 numeric value expected for NETTX - found None
...

Cheers and thanks! Alvaro

dealfonso commented 9 years ago

Hi,

those variables are not needed by CLUES, yet. So CLUES should be working fine.

Regards, Carlos A.