Curtin fails to deploy through MAAS due to tar error
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
curtin |
Fix Released
|
Critical
|
Unassigned |
Bug Description
I just tried to deploy both trusty and wily using MAAS 1.9.0~alpha6+
Related bugs:
* bug 1511104: support more compression [xz or bzip] in curtin 'extract'
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Fetched 8492 kB in 2s (2986 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
dmeventd libdevmapper-
module-init-tools postfix ssl-cert watershed
Suggested packages:
thin-
postfix-pcre sasl2-bin dovecot-common postfix-cdb mail-reader postfix-doc
openssl-blacklist xfsdump attr quota
Recommended packages:
default-mta mail-transport-
The following NEW packages will be installed:
btrfs-tools dmeventd libdevmapper-
libreadline5 lvm2 mdadm module-init-tools postfix ssl-cert watershed
xfsprogs
0 upgraded, 13 newly installed, 0 to remove and 3 not upgraded.
Need to get 3956 kB of archives.
After this operation, 16.1 MB of additional disk space will be used.
Get:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Get:12 http://
Get:13 http://
Preconfiguring packages ...
Fetched 3956 kB in 3s (1223 kB/s)
Selecting previously unselected package liblzo2-2:amd64.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 61866 files and directories currently installed.)
Preparing to unpack .../liblzo2-
Unpacking liblzo2-2:amd64 (2.08-1.2) ...
Selecting previously unselected package module-init-tools.
Preparing to unpack .../module-
Unpacking module-init-tools (21-1ubuntu1) ...
Selecting previously unselected package btrfs-tools.
Preparing to unpack .../btrfs-
Unpacking btrfs-tools (4.0-2) ...
Selecting previously unselected package libdevmapper-
Preparing to unpack .../libdevmappe
Unpacking libdevmapper-
Selecting previously unselected package liblvm2cmd2.
Preparing to unpack .../liblvm2cmd2
Unpacking liblvm2cmd2.
Selecting previously unselected package dmeventd.
Preparing to unpack .../dmeventd_
Unpacking dmeventd (2:1.02.
Selecting previously unselected package libreadline5:amd64.
Preparing to unpack .../libreadline
Unpacking libreadline5:amd64 (5.2+dfsg-3) ...
Selecting previously unselected package watershed.
Preparing to unpack .../archives/
Unpacking watershed (7) ...
Selecting previously unselected package lvm2.
Preparing to unpack .../lvm2_
Unpacking lvm2 (2.02.122-1ubuntu1) ...
Selecting previously unselected package mdadm.
Preparing to unpack .../mdadm_
Unpacking mdadm (3.3-2ubuntu2) ...
Selecting previously unselected package ssl-cert.
Preparing to unpack .../ssl-
Unpacking ssl-cert (1.0.37) ...
Selecting previously unselected package postfix.
Preparing to unpack .../postfix_
Unpacking postfix (2.11.3-1ubuntu2) ...
Selecting previously unselected package xfsprogs.
Preparing to unpack .../xfsprogs_
Unpacking xfsprogs (3.2.1ubuntu1) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...
Processing triggers for ufw (0.34-2) ...
Setting up liblzo2-2:amd64 (2.08-1.2) ...
Setting up module-init-tools (21-1ubuntu1) ...
Setting up btrfs-tools (4.0-2) ...
update-initramfs: deferring update (trigger activated)
Setting up libdevmapper-
Setting up libreadline5:amd64 (5.2+dfsg-3) ...
Setting up watershed (7) ...
update-initramfs: deferring update (trigger activated)
Setting up mdadm (3.3-2ubuntu2) ...
Generating mdadm.conf... done.
update-initramfs: deferring update (trigger activated)
/usr/sbin/
invoke-rc.d: policy-rc.d denied execution of start.
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up ssl-cert (1.0.37) ...
hostname: Name or service not known
make-ssl-cert: Could not get FQDN, using "maas-test-1".
make-ssl-cert: You may want to fix your /etc/hosts and/or DNS setup and run
make-ssl-cert: make-ssl-cert generate-
make-ssl-cert: again.
Setting up postfix (2.11.3-1ubuntu2) ...
Adding group `postfix' (GID 118) ...
Done.
Adding system user `postfix' (UID 112) ...
Adding new user `postfix' (UID 112) with group `postfix' ...
ERROR: ld.so: object 'libeatmydata.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Not creating home directory `/var/spool/
Creating /etc/postfix/
Adding tcp map entry to /etc/postfix/
Adding sqlite map entry to /etc/postfix/
Adding group `postdrop' (GID 119) ...
Done.
setting myhostname: maas-test-1
setting alias maps
setting alias database
mailname is not a fully qualified domain name. Not changing /etc/mailname.
setting destinations: localdomain, localhost, localhost.
setting relayhost:
setting mynetworks: 127.0.0.0/8 [::ffff:
setting mailbox_size_limit: 0
setting recipient_
setting inet_interfaces: all
setting inet_protocols: all
/etc/aliases does not exist, creating it.
WARNING: /etc/aliases exists, but does not have a root alias.
Postfix is now set up with a default configuration. If you need to make
changes, edit
/etc/postfix/
values, see postconf(1).
After modifying main.cf, be sure to run '/etc/init.
Running newaliases
invoke-rc.d: policy-rc.d denied execution of restart.
Setting up xfsprogs (3.2.1ubuntu1) ...
Setting up dmeventd (2:1.02.
/usr/sbin/
Setting up lvm2 (2.02.122-1ubuntu1) ...
update-initramfs: deferring update (trigger activated)
invoke-rc.d: policy-rc.d denied execution of start.
invoke-rc.d: policy-rc.d denied execution of start.
Setting up liblvm2cmd2.
Processing triggers for libc-bin (2.21-0ubuntu4) ...
Processing triggers for initramfs-tools (0.120ubuntu6) ...
update-initramfs: Generating /boot/initrd.
cryptsetup: WARNING: failed to detect canonical device of /media/root-ro/
cryptsetup: WARNING: could not determine root device from /etc/fstab
Warning: /sbin/fsck.
W: mdadm: /etc/mdadm/
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (225-1ubuntu9) ...
Processing triggers for ufw (0.34-2) ...
mdadm: No arrays found in config file or automatically
Logical volume "lvroot" successfully removed
Volume group "lvroot" not found
Cannot process volume group lvroot
Volume group "vgroot" successfully removed
Physical volume "/dev/vda1" successfully created
Volume group "vgroot" successfully created
Logical volume "lvroot" created.
--2015-10-27 21:23:42-- http://
Connecting to 10.0.0.2:5248... connected.
HTTP request sent, awaiting response... 200 OK
Length: 389807502 (372M) [text/html]
Saving to: 'STDOUT'
tar: Archive is compressed. Use -z option
tar: Error is not recoverable: exiting now
0KUnexpected error while running command.
Command: ['sh', '-cf', 'wget "$1" --progress=dot:mega -O - |tar -C "$2" --xattrs --xattrs-include=* -Sxpf - --numeric-owner', '--', 'http://
Exit code: 2
Reason: -
Stdout: ''
Stderr: ''
Installation failed with exception: Unexpected error while running command.
Command: ['curtin', 'extract']
Exit code: 3
Reason: -
Stdout: b'--2015-10-27 21:23:42-- http://
Stderr: ''
Related branches
- Ryan Harper (community): Needs Fixing
-
Diff: 164 lines (+123/-2)4 files modifiedcurtin/commands/extract.py (+5/-2)
curtin/deps/__init__.py (+1/-0)
debian/control (+1/-0)
helpers/smtar (+116/-0)
Changed in curtin: | |
status: | New → Triaged |
importance: | Undecided → Critical |
description: | updated |
The source of the change is here, the question is what isn't tar doing the right thing then.
My understanding is that tar can skip the compression option if it's operating on a file directly (tar -tvf mytar.tgz) but when passed through a pipe, it doesnt (cat mytar.tgz | tar -tvf -).
% bzr log -n0 -r282 ------- ------- ------- ------- ------- ------- ------- ----
-------
revno: 282
committer: Scott Moser <email address hidden>
branch nick: trunk
timestamp: Fri 2015-10-09 10:48:17 -0400
message:
extract: do not specify 'z' to tar extract
tar will automatically do the right thing for compression
it knows about. Removing the 'z' here makes us able to install
a .tar.xz file too.
% bzr diff -r281..282 commands/ extract. py' commands/ extract. py 2015-10-02 18:37:42 +0000 commands/ extract. py 2015-10-09 14:48:17 +0000 util.subp( args=[' sh', '-cf',
('wget "$1" --progress=dot:mega -O - |'
'tar -C "$2" ' + ' '.join( tar_xattr_ opts()) +
'--', source, target])
=== modified file 'curtin/
--- curtin/
+++ curtin/
@@ -55,7 +55,7 @@
curtin.
- ' ' + '-Sxpzf - --numeric-owner'),
+ ' ' + '-Sxpf - --numeric-owner'),