[UI] MAAS should handle better errors in curtin preseeds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Wishlist
|
Andres Rodriguez |
Bug Description
MAAS curtin preseed should be rendering the curtin_userdata file correctly, and not assuming that the user will use the correct encoding. From the user perspective, this should all be 'str' and not 'byte-encoded'.
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/
user_data = get_curtin_
File "/usr/lib/
configs=
File "/usr/lib/
main_config = get_curtin_
File "/usr/lib/
return template.
File "/usr/lib/
result, defs, inherit = self._interpret(ns)
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
self.
File "/usr/lib/
raise exc_info[
File "/usr/lib/
exec(code, self.default_
File "<string>", line 7, in <module>
TypeError: a bytes-like object is required, not 'str' at line 2 column 3 in file /etc/maas/
=======
I have a MAAS server running Xenial and MAAS 1.10 from maas/next. The server has 14.04 images from the Release stream.
On the node, there are three NICs and all three are set to AutoAssign and are assigned 10.0.0.125, 126 and 127.
On boot, the installer ephemeral boots but then cloud-init tries to get data from 169.254.169.254. It does this for 120 seconds, THEN tries calling 10.0.0.1 which also fails, and then it finally just gives up.
At this point, the node is up, and stuck and I had to backdoor it to get logs.
The logs are attached from the node, the biggest thing I noticed was this:
2016-02-22 16:50:25,132 - util.py[WARNING]: Failed fetching metadata from url http://
2016-02-22 16:50:25,133 - util.py[DEBUG]: Failed fetching metadata from url http://
Traceback (most recent call last):
File "/usr/lib/
paths=
File "/usr/lib/
ssl_
File "/usr/lib/
exception_
File "/usr/lib/
raise excps[-1]
UrlError: 500 Server Error: INTERNAL SERVER ERROR
However, when I try that metadata, after getting in via the backdoor, it seems to work:
backdoor@ubuntu:~$ echo $url
http://
backdoor@ubuntu:~$ sudo python $maasds --config=$cfg get $url
== http://
2012-03-01
latest
backdoor@ubuntu:~$ sudo python $maasds --config=$cfg crawl $url/latest/
== http://
node-9c831f44-
== http://
x-wing.maas
== http://
ssh-rsa AAAAB3NzaC1yc2E
== http://
backdoor@ubuntu:~$ sudo python $maasds --config=$cfg crawl $url/2012-
== http://
node-9c831f44-
== http://
x-wing.maas
== http://
ssh-rsa AAAAB3NzaC1yc2E
== http://
Related branches
- Andres Rodriguez (community): Approve
-
Diff: 352 lines (+108/-11)5 files modifiedsrc/maasserver/api/machines.py (+7/-0)
src/maasserver/api/tests/test_machine.py (+34/-1)
src/maasserver/node_action.py (+7/-0)
src/maasserver/tests/test_node_action.py (+58/-10)
src/maasserver/websockets/handlers/tests/test_machine.py (+2/-0)
summary: |
- unable to deploy nodes w/ 14.04 and MAAS 1.10 on Xenial + TypeError: a bytes-like object is required, not 'str' at line 2 column 3 + in file /etc/maas/preseeds/curtin_userdata |
description: | updated |
Changed in maas: | |
status: | New → Triaged |
no longer affects: | maas/1.10 |
summary: |
- MAAS should handle better errors in curtin preseeds + [UI] MAAS should handle better errors in curtin preseeds |
Changed in maas: | |
assignee: | nobody → Newell Jensen (newell-jensen) |
Changed in maas: | |
importance: | Critical → Wishlist |
Changed in maas: | |
milestone: | 2.0.0 → 2.1.0 |
Changed in maas: | |
milestone: | 2.1.0 → 2.1.1 |
Changed in maas: | |
milestone: | 2.1.1 → 2.1.2 |
Changed in maas: | |
milestone: | 2.1.2 → 2.1.3 |
Changed in maas: | |
milestone: | 2.1.3 → 2.2.0 |
Changed in maas: | |
milestone: | 2.2.0 → 2.2.x |
Changed in maas: | |
milestone: | 2.2.x → 2.3.0 |
assignee: | Newell Jensen (newell-jensen) → nobody |
Changed in maas: | |
assignee: | nobody → Andres Rodriguez (andreserl) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 2.3.0 → 2.3.0alpha1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
maas: bzr4578- 0ubuntu2 bzr4578- 0ubuntu2 bzr4578- 0ubuntu2 500 us.archive. ubuntu. com/ubuntu xenial/main amd64 Packages us.archive. ubuntu. com/ubuntu xenial/main i386 Packages dpkg/status 10.0+bzr4578- 0ubuntu2 500 ppa.launchpad. net/maas/ next/ubuntu xenial/main amd64 Packages ppa.launchpad. net/maas/ next/ubuntu xenial/main i386 Packages
Installed: 1.10.0+
Candidate: 1.10.0+
Version table:
*** 1.10.0+
500 http://
500 http://
100 /var/lib/
1.
500 http://
500 http://