[2.2, 2.3] RegionService can raise unexpected exceptions for an empty connection list
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Mike Pontillo | ||
2.2 |
Fix Released
|
High
|
Mike Pontillo |
Bug Description
The symptom can be seen as follows:
2017-07-18 18:11:46 maasserver.
Traceback (most recent call last):
File "/usr/lib/
i = self._randbelow
File "/usr/lib/
r = getrandbits(k) # 0 <= r < 2**k
ValueError: number of bits must be greater than zero
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/
response = middleware_
File "/usr/lib/
self.
File "/usr/lib/
connected_ids = list(client.ident for client in getAllClients())
File "/usr/lib/
return func_in_
File "/usr/lib/
result.
File "/usr/lib/
raise self.value.
IndexError: Cannot choose from an empty sequence
Related branches
- Mike Pontillo (community): Approve
-
Diff: 117 lines (+36/-11)4 files modifieddocs/changelog.rst (+3/-1)
requirements.txt (+2/-2)
src/maasserver/rpc/regionservice.py (+11/-7)
src/maasserver/rpc/tests/test_regionservice.py (+20/-1)
- Blake Rouse (community): Approve
-
Diff: 96 lines (+32/-9)3 files modifiedrequirements.txt (+1/-1)
src/maasserver/rpc/regionservice.py (+11/-7)
src/maasserver/rpc/tests/test_regionservice.py (+20/-1)
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
milestone: | 2.3.0 → 2.3.0alpha1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |