www.cendio.com
Bug 4431 - Setting existing_users_weight to 0 crashes the load balancer
: Setting existing_users_weight to 0 crashes the load balancer
Status: NEW
: ThinLinc
VSM Server
: 3.4.0
: PC Unknown
: P2 Normal
: LowPrio
Assigned To:
:
:
:
:
  Show dependency treegraph
 
Reported: 2012-10-16 09:48 by
Modified: 2018-01-09 13:02 (History)
Acceptance Criteria:


Attachments


Note

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


Description From cendio 2012-10-16 09:48:12
2012-10-16 09:46:13 ERROR vsmserver.loadinfo: Unhandled exception fetching load
from 127.0.0.1:904: <type 'exceptions.ZeroDivisionError'> integer division or
modulo by zero Traceback (most recent call last):
  File "/opt/thinlinc/modules/thinlinc/vsm/async.py", line 112, in iii11
    obj . handle_read_event ( )
  File "/usr/lib64/python2.7/asyncore.py", line 444, in handle_read_event
    self.handle_read()
  File "/usr/lib64/python2.7/asynchat.py", line 140, in handle_read
    self.found_terminator()
  File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 401, in
found_terminator
    self . handle_response ( )
  File "/opt/thinlinc/modules/thinlinc/vsm/xmlrpc.py", line 433, in
handle_response
    self . handle_returnvalue ( )
  File "/opt/thinlinc/modules/thinlinc/vsm/call_getload.py", line 42, in
handle_returnvalue
    self . parent . loadbalancer . update_loadinfo ( self . url , self .
returnvalue )
  File "/opt/thinlinc/modules/thinlinc/vsm/loadbalancer.py", line 107, in
update_loadinfo
    self . loadstatus [ Ooo ] . update ( loadstatus_dict )
  File "/opt/thinlinc/modules/thinlinc/vsm/loadbalancer.py", line 174, in
update
    self . rate_server ( )
  File "/opt/thinlinc/modules/thinlinc/vsm/loadbalancer.py", line 231, in
rate_server
    ooOO0O0ooOooO = ii1ii1ii - ( self . num_users / OO0OoO0o00 )
ZeroDivisionError: integer division or modulo by zero
. Marking agent as down.
------- Comment #1 From cendio 2012-10-16 09:51:04 -------
Also (untested, but implying from the code), setting existing_users_weight to a
negative value will result in the server having an *increased* rating for every
existing user.

We should probably make sure that existing_users_weight >= 1.