WebUI overrides proxy values that have not changed (was GET metadata with MAAS built-in proxy enabled fails with "500 Internal Server Error")
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Andres Rodriguez | ||
2.3 |
Fix Released
|
Critical
|
Andres Rodriguez | ||
2.4 |
Fix Released
|
Critical
|
Andres Rodriguez |
Bug Description
I upgraded our MAAS server from 2.3.3 to 2.4.1 and cannot commission nodes anymore. On the commissioned node I can see that the retrieval of 'http://
2018-08-16 05:20:49 maasserver: [error] #######
2018-08-16 05:20:49 maasserver: [error] Traceback (most recent call last):
File "/usr/lib/
response = wrapped_
File "/usr/lib/
return view_atomic(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/usr/lib/
response = upcall(request, *args, **kwargs)
File "/usr/lib/
response = func(*args, **kwargs)
File "/usr/lib/
result = self.error_
File "/usr/lib/
result = meth(request, *args, **kwargs)
File "/usr/lib/
return function(self, request, *args, **kwargs)
File "/usr/lib/
preseed = get_preseed(node, region_ip)
File "/usr/lib/
default_
File "/usr/lib/
default_
File "/usr/lib/
default_
File "/usr/lib/
node, token, base_url, default_
File "/usr/lib/
default_
File "/usr/lib/
node.
File "/usr/lib/
url = "http://:%d/" % maas_proxy_port
TypeError: %d format: a number is required, not NoneType
2018-08-16 05:20:49 regiond: [info] 172.17.100.123 GET /MAAS/metadata/
-9-g2e62cb8a-
I quickly checked in a fresh container, installed MAAS from scratch and think I see the same there. If I go into settings and change the proxy from "MAAS Built-in proxy" to "Don't use a proxy" the problem disappears and I can commission nodes again. List of installed packages:
# dpkg -l | egrep 'maas|cloud-init'
ii cloud-init 18.3-9-
ii cloud-initramfs
ii cloud-initramfs
ii maas 2.4.1-7032-
ii maas-cli 2.4.1-7032-
ii maas-common 2.4.1-7032-
ii maas-dhcp 2.4.1-7032-
ii maas-proxy 2.4.1-7032-
ii maas-rack-
ii maas-region-api 2.4.1-7032-
ii maas-region-
ii python3-django-maas 2.4.1-7032-
ii python3-maas-client 2.4.1-7032-
ii python3-
Related branches
- MAAS Lander: Approve
- Andres Rodriguez (community): Approve
-
Diff: 35 lines (+12/-1)2 files modifiedsrc/maasserver/compose_preseed.py (+2/-0)
src/maasserver/forms/__init__.py (+10/-1)
- Andres Rodriguez (community): Approve
-
Diff: 49 lines (+14/-3)3 files modifiedsrc/maasserver/compose_preseed.py (+2/-0)
src/maasserver/forms/__init__.py (+11/-2)
src/maasserver/models/config.py (+1/-1)
- MAAS Lander: Needs Fixing
- Blake Rouse (community): Approve
-
Diff: 52 lines (+16/-4)3 files modifiedsrc/maasserver/compose_preseed.py (+4/-1)
src/maasserver/forms/__init__.py (+11/-2)
src/maasserver/models/config.py (+1/-1)
Changed in maas: | |
milestone: | none → 2.5.0alpha2 |
Changed in maas: | |
status: | Incomplete → Confirmed |
importance: | Undecided → Critical |
Changed in maas: | |
assignee: | nobody → Andres Rodriguez (andreserl) |
status: | Confirmed → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
summary: |
- GET metadata with MAAS built-in proxy enabled fails with "500 Internal - Server Error" + WebUI overrides proxy values that have not changed (was GET metadata + with MAAS built-in proxy enabled fails with "500 Internal Server Error") |
Hi Stefan,
Thank you for you bug report. Can you please get some data for me:
maas <user> maas get-config name=maas_ proxy_port
And attach /var/lib/ maas/maas- proxy.conf
Once you do that, you can fix this by doing
maas <user> maas set-config name=maas_ proxy_port value=8080
Thanks
On Thu, Aug 16, 2018 at 7:30 AM Stefan Fleischmann <
<email address hidden>> wrote:
> Public bug reported: 172.17. 100.3:5240/ MAAS/metadata/ latest/ by- ?op=get_ preseed' fails with status "500 Internal Server maas/regiond. log I see this: ####### ####### ####### #### ####### ####### ####### #### python3/ dist-packages/ django/ core/handlers/ base.py" , line callback( request, *callback_args, **callback_kwargs) python3/ dist-packages/ maasserver/ utils/views. py", line with_post_ commit_ savepoint python3. 6/contextlib. py", line 52, in inner python3/ dist-packages/ maasserver/ api/support. py", line python3/ dist-packages/ django/ views/decorator s/vary. py", python3/ dist-packages/ piston3/ resource. py", line 190, in handler( e, request, meth, em_format) python3/ dist-packages/ piston3/ resource. py", line 188, in python3/ dist-packages/ maasserver/ api/support. py", line python3/ dist-packages/ metadataserver/ api.py" , line 1149, python3/ dist-packages/ maasserver/ preseed. py", line 616, region_ ip=default_ region_ ip) python3/ dist-packages/ maasserver/ preseed. py", line 936, region_ ip=default_ region_ ip)) python3/ dist-packages/ maasserver/ preseed. py", line 864, preseed_ context region_ ip=default_ region_ ip), python3/ dist-packages/ maasserver/ compose_ preseed. py", region_ ip=default_ region_ ip) python3/ dist-packages/ maasserver/ compose_ preseed. py", commissioning_ preseed region_ ip=default_ region_ ip) python3/ dist-packages/ maasserver/ compose_ preseed. py", cloud_init_ preseed boot_rack_ controller( ), default_ region_ ip=defaul. ..
>
> I upgraded our MAAS server from 2.3.3 to 2.4.1 and cannot commission
> nodes anymore. On the commissioned node I can see that the retrieval of
> 'http://
> id/asfery/
> Error". In the log file /var/log/
>
> 2018-08-16 05:20:49 maasserver: [error] #######
> Exception: %d format: a number is required, not NoneType
> #######
> 2018-08-16 05:20:49 maasserver: [error] Traceback (most recent call last):
> File "/usr/lib/
> 185, in _get_response
> response = wrapped_
> File "/usr/lib/
> 277, in view_atomic_
> return view_atomic(*args, **kwargs)
> File "/usr/lib/
> return func(*args, **kwds)
> File "/usr/lib/
> 70, in __call__
> response = upcall(request, *args, **kwargs)
> File "/usr/lib/
> line 21, in inner_func
> response = func(*args, **kwargs)
> File "/usr/lib/
> __call__
> result = self.error_
> File "/usr/lib/
> __call__
> result = meth(request, *args, **kwargs)
> File "/usr/lib/
> 310, in dispatch
> return function(self, request, *args, **kwargs)
> File "/usr/lib/
> in get_preseed
> preseed = get_preseed(node, region_ip)
> File "/usr/lib/
> in get_preseed
> default_
> File "/usr/lib/
> in render_preseed
> default_
> File "/usr/lib/
> in get_node_
> default_
> File "/usr/lib/
> line 435, in compose_preseed
> node, token, base_url, default_
> File "/usr/lib/
> line 312, in compose_
> default_
> File "/usr/lib/
> line 365, in _compose_
> node.get_