On Thu, Aug 16, 2018 at 7:30 AM Stefan Fleischmann <
<email address hidden>> wrote:
> Public bug reported:
>
> 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://172.17.100.3:5240/MAAS/metadata/latest/by-
> id/asfery/?op=get_preseed' fails with status "500 Internal Server
> Error". In the log file /var/log/maas/regiond.log I see this:
>
> 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/python3/dist-packages/django/core/handlers/base.py", line
> 185, in _get_response
> response = wrapped_callback(request, *callback_args, **callback_kwargs)
> File "/usr/lib/python3/dist-packages/maasserver/utils/views.py", line
> 277, in view_atomic_with_post_commit_savepoint
> return view_atomic(*args, **kwargs)
> File "/usr/lib/python3.6/contextlib.py", line 52, in inner
> return func(*args, **kwds)
> File "/usr/lib/python3/dist-packages/maasserver/api/support.py", line
> 70, in __call__
> response = upcall(request, *args, **kwargs)
> File "/usr/lib/python3/dist-packages/django/views/decorators/vary.py",
> line 21, in inner_func
> response = func(*args, **kwargs)
> File "/usr/lib/python3/dist-packages/piston3/resource.py", line 190, in
> __call__
> result = self.error_handler(e, request, meth, em_format)
> File "/usr/lib/python3/dist-packages/piston3/resource.py", line 188, in
> __call__
> result = meth(request, *args, **kwargs)
> File "/usr/lib/python3/dist-packages/maasserver/api/support.py", line
> 310, in dispatch
> return function(self, request, *args, **kwargs)
> File "/usr/lib/python3/dist-packages/metadataserver/api.py", line 1149,
> in get_preseed
> preseed = get_preseed(node, region_ip)
> File "/usr/lib/python3/dist-packages/maasserver/preseed.py", line 616,
> in get_preseed
> default_region_ip=default_region_ip)
> File "/usr/lib/python3/dist-packages/maasserver/preseed.py", line 936,
> in render_preseed
> default_region_ip=default_region_ip))
> File "/usr/lib/python3/dist-packages/maasserver/preseed.py", line 864,
> in get_node_preseed_context
> default_region_ip=default_region_ip),
> File "/usr/lib/python3/dist-packages/maasserver/compose_preseed.py",
> line 435, in compose_preseed
> node, token, base_url, default_region_ip=default_region_ip)
> File "/usr/lib/python3/dist-packages/maasserver/compose_preseed.py",
> line 312, in compose_commissioning_preseed
> default_region_ip=default_region_ip)
> File "/usr/lib/python3/dist-packages/maasserver/compose_preseed.py",
> line 365, in _compose_cloud_init_preseed
> node.get_boot_rack_controller(), default_region_ip=default_region_ip)
> File "/usr/lib/python3/dist-packages/maasserver/compose_preseed.py",
> line 45, in get_apt_proxy
> 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/latest/by-id/asfery/?op=get_preseed HTTP/1.1 --> 500
> INTERNAL_SERVER_ERROR (referrer: -; agent: Cloud-Init/18.3
> -9-g2e62cb8a-0ubuntu1~18.04.2)
>
> 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-g2e62cb8a-0ubuntu1~18.04.2 all Init scripts for cloud
> instances
> ii cloud-initramfs-copymods 0.40ubuntu1
> all copy initramfs modules into root filesystem for later use
> ii cloud-initramfs-dyn-netconf 0.40ubuntu1
> all write a network interface file in /run for BOOTIF
> ii maas
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all "Metal as a Service"
> is a physical cloud and IPAM
> ii maas-cli
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all MAAS client and
> command-line interface
> ii maas-common
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all MAAS server common files
> ii maas-dhcp
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all MAAS DHCP server
> ii maas-proxy
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all MAAS Caching Proxy
> ii maas-rack-controller
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all Rack Controller for
> MAAS
> ii maas-region-api
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all Region controller API
> service for MAAS
> ii maas-region-controller
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all Region Controller for
> MAAS
> ii python3-django-maas
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all MAAS server Django web
> framework (Python 3)
> ii python3-maas-client
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all MAAS python API client
> (Python 3)
> ii python3-maas-provisioningserver
> 2.4.1-7032-g11e4fa330-0ubuntu1~18.04.1 all MAAS server
> provisioning libraries (Python 3)
>
> ** Affects: maas
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https://bugs.launchpad.net/bugs/1787381
>
> Title:
> GET metadata with MAAS built-in proxy enabled fails with "500 Internal
> Server Error"
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/maas/+bug/1787381/+subscriptions
>
> Launchpad-Notification-Type: bug
> Launchpad-Bug: product=maas; status=New; importance=Undecided;
> assignee=None;
> Launchpad-Bug-Information-Type: Public
> Launchpad-Bug-Private: no
> Launchpad-Bug-Security-Vulnerability: no
> Launchpad-Bug-Commenters: sfleischmann
> Launchpad-Bug-Reporter: Stefan Fleischmann (sfleischmann)
> Launchpad-Bug-Modifier: Stefan Fleischmann (sfleischmann)
> Launchpad-Message-Rationale: Subscriber (MAAS)
> Launchpad-Message-For: andreserl
>
--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer
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=default_ region_ ip) python3/ dist-packages/ maasserver/ compose_ preseed. py", latest/ by-id/asfery/ ?op=get_ preseed HTTP/1.1 --> 500 SERVER_ ERROR (referrer: -; agent: Cloud-Init/18.3 0ubuntu1~ 18.04.2) g2e62cb8a- 0ubuntu1~ 18.04.2 all Init scripts for cloud -copymods 0.40ubuntu1 -dyn-netconf 0.40ubuntu1 g11e4fa330- 0ubuntu1~ 18.04.1 all "Metal as a Service" g11e4fa330- 0ubuntu1~ 18.04.1 all MAAS client and g11e4fa330- 0ubuntu1~ 18.04.1 all MAAS server common files g11e4fa330- 0ubuntu1~ 18.04.1 all MAAS DHCP server g11e4fa330- 0ubuntu1~ 18.04.1 all MAAS Caching Proxy controller g11e4fa330- 0ubuntu1~ 18.04.1 all Rack Controller for g11e4fa330- 0ubuntu1~ 18.04.1 all Region controller API controller g11e4fa330- 0ubuntu1~ 18.04.1 all Region Controller for g11e4fa330- 0ubuntu1~ 18.04.1 all MAAS server Django web g11e4fa330- 0ubuntu1~ 18.04.1 all MAAS python API client maas-provisioni ngserver g11e4fa330- 0ubuntu1~ 18.04.1 all MAAS server /bugs.launchpad .net/bugs/ 1787381 /bugs.launchpad .net/maas/ +bug/1787381/ +subscriptions Notification- Type: bug Undecided; Bug-Information -Type: Public Bug-Private: no Bug-Security- Vulnerability: no Bug-Commenters: sfleischmann Bug-Reporter: Stefan Fleischmann (sfleischmann) Bug-Modifier: Stefan Fleischmann (sfleischmann) Message- Rationale: Subscriber (MAAS) Message- For: andreserl
>
> 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_
> File "/usr/lib/
> line 45, in get_apt_proxy
> 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/
> INTERNAL_
> -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-
> instances
> ii cloud-initramfs
> all copy initramfs modules into root filesystem for later use
> ii cloud-initramfs
> all write a network interface file in /run for BOOTIF
> ii maas
> 2.4.1-7032-
> is a physical cloud and IPAM
> ii maas-cli
> 2.4.1-7032-
> command-line interface
> ii maas-common
> 2.4.1-7032-
> ii maas-dhcp
> 2.4.1-7032-
> ii maas-proxy
> 2.4.1-7032-
> ii maas-rack-
> 2.4.1-7032-
> MAAS
> ii maas-region-api
> 2.4.1-7032-
> service for MAAS
> ii maas-region-
> 2.4.1-7032-
> MAAS
> ii python3-django-maas
> 2.4.1-7032-
> framework (Python 3)
> ii python3-maas-client
> 2.4.1-7032-
> (Python 3)
> ii python3-
> 2.4.1-7032-
> provisioning libraries (Python 3)
>
> ** Affects: maas
> Importance: Undecided
> Status: New
>
> --
> You received this bug notification because you are subscribed to MAAS.
> https:/
>
> Title:
> GET metadata with MAAS built-in proxy enabled fails with "500 Internal
> Server Error"
>
> To manage notifications about this bug go to:
> https:/
>
> Launchpad-
> Launchpad-Bug: product=maas; status=New; importance=
> assignee=None;
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
> Launchpad-
>
--
Andres Rodriguez (RoAkSoAx)
Ubuntu Server Developer
MSc. Telecom & Networking
Systems Engineer