In 3.5.0 image sync download-bootresourcefile activity fails with "integer division or modulo by zero"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Committed
|
High
|
Jacopo Rota | ||
3.5 |
Fix Committed
|
High
|
Jacopo Rota |
Bug Description
In 3.5.0 in an environment with 3 nodes in HA some "download-
{
"message": "integer division or modulo by zero",
"stackTrace": " File \"/snap/
"applicationF
"type": "ZeroDivisionError"
}
}
see the screenshot attached.
This happens because the parameter of the bootresource-
[
{
"extract_
"force": false,
"rfile_ids": [
22
],
"sha256": "189757828954b8
"size": 0,
"source_list": [],
"total_size": 133248031
}
]
and source_list is empty
Related branches
- MAAS Lander: Approve
- Jacopo Rota: Approve
-
Diff: 33 lines (+15/-7)1 file modifiedsrc/maasserver/workflow/bootresource.py (+15/-7)
- MAAS Lander: Approve
- Anton Troyanov: Approve
-
Diff: 33 lines (+15/-7)1 file modifiedsrc/maasserver/workflow/bootresource.py (+15/-7)
description: | updated |
Changed in maas: | |
assignee: | nobody → Jacopo Rota (r00ta) |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
milestone: | 3.5.0 → 3.6.0 |
Found out that
@activity. defn(name= "get-bootresour cefile- endpoints" ) efile_endpoints (self) -> dict[str, list]: url}/api/ 2.0/regioncontr ollers/ " async(" GET", url)
r[ "system_ id"]: [
compose_ URL("http:// :5240/MAAS/ boot-resources/", src)
async def get_bootresourc
url = f"{self.
regions = await self.request_
return {
for src in r["ip_addresses"]
]
for r in regions
}
might actually return empty list for some regions
[ 10.244. 40.32:5240/ MAAS/boot- resources/", 192.168. 33.23:5240/ MAAS/boot- resources/" 10.244. 40.31:5240/ MAAS/boot- resources/", 10.244. 40.33:5240/ MAAS/boot- resources/", 192.168. 33.22:5240/ MAAS/boot- resources/"
{
"dnsatk": [],
"m4mmw8": [
"http://
"http://
],
"mthcpn": [
"http://
"http://
"http://
]
}
]