This one is more puzzling than I first thought. It seems you have a subnet that has no IP addresses in it, and I'm not sure how this can happen. (the divide by zero you mentioned was due to a /32 subnet, and we already have unit tests for /32 and /128 subnets.)
Which subnets are defined on your MAAS server? Are you able to log into the MAAS CLI and tell me which is the problematic subnet? To narrow it down, run this command against each subnet:
This one is more puzzling than I first thought. It seems you have a subnet that has no IP addresses in it, and I'm not sure how this can happen. (the divide by zero you mentioned was due to a /32 subnet, and we already have unit tests for /32 and /128 subnets.)
Which subnets are defined on your MAAS server? Are you able to log into the MAAS CLI and tell me which is the problematic subnet? To narrow it down, run this command against each subnet:
maas <profile> subnet statistics <cidr> include_ suggestions= True include_ranges=True
The one that doesn't work is the one causing the problem.