I was trying to deploy an image based on an Ubuntu Desktop install. I made a "curtin-compatible" tar.gz which includes cloud-init, put it in place of root-tgz in my maas server, and tried to deploy a node (using juju bootstrap).
Juju ended up complaining and timing out, and the node never fully completed installation. On closer look, I found curtin crashes when running "curthooks", specifically at some point it does dpkg --list. The code that handles this (utils.subp) assumes output from its commands is pure ascii and so crashes when the output contains non-ascii. For Ubuntu Desktop, in particular, the output contains "Déjȧ Dup", which is what causes things to barf.
I SSHd into the half-installed node and ran curtin manually like so:
Running command ['chroot', '/tmp/tmpQ_dk0_/target', 'dpkg-query', '--list'] with allowed return codes [0] (shell=False, capture=True)
Traceback (most recent call last):
File "/curtin/curtin/commands/main.py", line 96, in main
sys.exit(args.func(args))
File "/curtin/curtin/commands/curthooks.py", line 443, in curthooks
apply_debconf_selections(cfg, target)
File "/curtin/curtin/commands/curthooks.py", line 219, in apply_debconf_selections
pkgs_installed = get_installed_packages(target)
File "/curtin/curtin/commands/curthooks.py", line 259, in get_installed_packages
(out, _err) = util.subp(cmd, capture=True)
File "/curtin/curtin/util.py", line 58, in subp
out = out.decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 19027: ordinal not in range(128)
'ascii' codec can't decode byte 0xc3 in position 19027: ordinal not in range(128)
Traceback (most recent call last):
File "/curtin/curtin/commands/main.py", line 96, in main
sys.exit(args.func(args))
File "/curtin/curtin/commands/install.py", line 267, in cmd_install
stage.run()
File "/curtin/curtin/commands/install.py", line 104, in run
util.subp(cmd, shell=shell, env=self.env)
File "/curtin/curtin/util.py", line 68, in subp
cmd=args)
ProcessExecutionError: Unexpected error while running command.
Command: ['curtin', 'curthooks']
Exit code: 3
Reason: -
Stdout: ''
Stderr: ''
Unexpected error while running command.
Command: ['curtin', 'curthooks']
Exit code: 3
Reason: -
Stdout: ''
Stderr: ''
I was trying to deploy an image based on an Ubuntu Desktop install. I made a "curtin-compatible" tar.gz which includes cloud-init, put it in place of root-tgz in my maas server, and tried to deploy a node (using juju bootstrap).
Juju ended up complaining and timing out, and the node never fully completed installation. On closer look, I found curtin crashes when running "curthooks", specifically at some point it does dpkg --list. The code that handles this (utils.subp) assumes output from its commands is pure ascii and so crashes when the output contains non-ascii. For Ubuntu Desktop, in particular, the output contains "Déjȧ Dup", which is what causes things to barf.
I SSHd into the half-installed node and ran curtin manually like so:
sudo CURTIN_STACKTRACE=1 /curtin/bin/curtin --verbose --verbose --log-file /media/ root-rw/ curtin- install. log install --config= configs/ config- 000.cfg http:// 10.10.10. 1/MAAS/ static/ images/ ubuntu/ amd64/generic/ trusty/ release/ root-tgz
It ended in this:
Running command ['chroot', '/tmp/tmpQ_ dk0_/target' , 'dpkg-query', '--list'] with allowed return codes [0] (shell=False, capture=True) curtin/ commands/ main.py" , line 96, in main exit(args. func(args) ) curtin/ commands/ curthooks. py", line 443, in curthooks debconf_ selections( cfg, target) curtin/ commands/ curthooks. py", line 219, in apply_debconf_ selections packages( target) curtin/ commands/ curthooks. py", line 259, in get_installed_ packages curtin/ util.py" , line 58, in subp curtin/ commands/ main.py" , line 96, in main exit(args. func(args) ) curtin/ commands/ install. py", line 267, in cmd_install curtin/ commands/ install. py", line 104, in run curtin/ util.py" , line 68, in subp nError: Unexpected error while running command.
Traceback (most recent call last):
File "/curtin/
sys.
File "/curtin/
apply_
File "/curtin/
pkgs_installed = get_installed_
File "/curtin/
(out, _err) = util.subp(cmd, capture=True)
File "/curtin/
out = out.decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 19027: ordinal not in range(128)
'ascii' codec can't decode byte 0xc3 in position 19027: ordinal not in range(128)
Traceback (most recent call last):
File "/curtin/
sys.
File "/curtin/
stage.run()
File "/curtin/
util.subp(cmd, shell=shell, env=self.env)
File "/curtin/
cmd=args)
ProcessExecutio
Command: ['curtin', 'curthooks']
Exit code: 3
Reason: -
Stdout: ''
Stderr: ''
Unexpected error while running command.
Command: ['curtin', 'curthooks']
Exit code: 3
Reason: -
Stdout: ''
Stderr: ''
I'm attaching the full log as well.