regiond.conf "debug_http: true" causes image downloads from regiond to fail with 500 error code
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Anton Troyanov | ||
3.2 |
Fix Released
|
High
|
Anton Troyanov |
Bug Description
[Impact]
Image sync from region-controller to rack controller will fail. In the Images tab of the Browser Interface, the message: Loading
Waiting for rack controller(s) to sync is displayed beside the image name and errors similar to those below are found in logs:
Logs in regiond.log:
maasserver: [error] #######
2022-09-16 20:25:41 maasserver: [error] Traceback (most recent call last):
File "/usr/lib/
raise exc from exc.__cause__
File "/usr/lib/
response = django_
File "/usr/lib/
response = self._middlewar
File "/usr/lib/
response = self.get_
File "/usr/lib/
decoded_content = content.
AttributeError: 'str' object has no attribute 'decode'
regiond: [info] 10.55.0.12 GET /MAAS/images-
provisioningser
Logs in rackd.log:
twisted.
twisted.
Traceback (most recent call last):
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
--- <exception caught here> ---
File "/usr/lib/
result = result.
File "/usr/lib/
return g.throw(self.type, self.value, self.tb)
File "/usr/lib/
yield deferToThread(
File "/usr/lib/
result = inContext.theWork()
File "/usr/lib/
File "/usr/lib/
return self.currentCon
File "/usr/lib/
return func(*args,**kw)
File "/usr/lib/
result = func(*args, **kwargs)
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
return self.sync_
File "/usr/lib/
File "/usr/lib/
return self.sync_
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
File "/usr/lib/
raise checksum_
[Platforms]
debs in Bionic
debs in Focal
Snap
[Reproducer]
In any MAAS installation, edit regiond.conf and add:
debug_http: true
Then restart maas-regiond. In a deb install:
/etc/maas/
systemctl restart maas-regiond
Try to curl an image:
...
< HTTP/1.1 500 Internal Server Error
...
'str' object has no attribute 'decode'
Or add a new image to the list.
[Workaround]
Remove the configuration http_debug from regiond.conf file and restart maas-regiond.
Related branches
- MAAS Lander: Approve
- Adam Collard (community): Approve
-
Diff: 13 lines (+1/-1)1 file modifiedsrc/maasserver/middleware.py (+1/-1)
- MAAS Lander: Approve
- Christian Grabowski: Approve
-
Diff: 13 lines (+1/-1)1 file modifiedsrc/maasserver/middleware.py (+1/-1)
summary: |
- regiond.conf "http_debug: true" causes image downloads from regiond to + regiond.conf "debug_http: true" causes image downloads from regiond to fail with 500 error code |
Changed in maas: | |
status: | New → Triaged |
Changed in maas: | |
assignee: | nobody → Anton Troyanov (troyanov) |
Changed in maas: | |
status: | Triaged → In Progress |
Changed in maas: | |
milestone: | none → 3.3.0 |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.3.0 → 3.3.0-beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in maas: | |
importance: | Undecided → High |