remote-system-image generator tries to ungzip initrd.img

Bug #1452856 reported by Barry Warsaw
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ubuntu system image
New
Undecided
Unassigned

Bug Description

I set up a remote-system-image channel in my server config, but when I run it, it crashes trying to ungzip the initrd.img file. It's entirely possible I'm doing something stupid, but I want to at least capture this bug for discussion.

Traceback:

2015-05-07 10:52:16,698 DEBUG Path generated: /var/www/si/pool/device-db93e9f632177cf189afd7a349b36cf10e095bd41289c5cd2d05cd51\
c4a9b98e.tar.xz
2015-05-07 10:52:23,885 DEBUG Unxzipping file: /tmp/tmpspAHRE/input.tar
2015-05-07 10:52:28,022 DEBUG Ungzipping /tmp/tmpspAHRE/img/initrd.img to: /tmp/tmpspAHRE/img/initrd
Traceback (most recent call last):
  File "bin/import-images", line 188, in <module>
    environment)
  File "/home/barry/projects/si/server/si30/bin/../lib/systemimage/generators.py", line 170, in generate_file
    path = generate_file_remote_system_image(conf, arguments, environment)
  File "/home/barry/projects/si/server/si30/bin/../lib/systemimage/generators.py", line 1202, in generate_file_remote_system_i\
mage
    options['keyring']):
  File "/home/barry/projects/si/server/si30/bin/../lib/systemimage/tools.py", line 306, in repack_recovery_keyring
    os.path.join(tempdir, "img", "initrd"))
  File "/home/barry/projects/si/server/si30/bin/../lib/systemimage/tools.py", line 199, in gzip_uncompress
    uncompressed.writelines(compressed)
  File "/usr/lib/python2.7/gzip.py", line 462, in readline
    c = self.read(readsize)
  File "/usr/lib/python2.7/gzip.py", line 268, in read
    self._read(readsize)
  File "/usr/lib/python2.7/gzip.py", line 303, in _read
    self._read_gzip_header()
  File "/usr/lib/python2.7/gzip.py", line 197, in _read_gzip_header
    raise IOError, 'Not a gzipped file'

I'll paste my configuration file momentarily. I'm using the instructions straight out of the wiki page for invoking bin/si-shell and bin/import-image -vvvv

Revision history for this message
Barry Warsaw (barry) wrote :

[global]
base_path = /home/barry/ubuntu/system-image/
channels = devel
gpg_key_path = secret/gpg/keys/
gpg_keyring_path = secret/gpg/keyrings/
publish_path = /var/www/si
state_path = state/
public_fqdn = hope.wooz.org
public_http_port = 80
public_https_port = 443

[channel_devel]
type = auto
versionbase = 1
fullcount = 15
files = ubuntu, device, keyring, version
file_ubuntu = remote-system-image;https://system-image.ubuntu.com;ubuntu-touch/vivid-proposed;ubuntu
file_device = remote-system-image;https://system-image.ubuntu.com;ubuntu-touch/vivid-proposed;device;keyring=archive-master
file_keyring = keyring;archive-master
file_version = version

Revision history for this message
Barry Warsaw (barry) wrote :

Is it possible that the initrd inside the partitions/recovery.img inside the real device-*.tar.xz file isn't compressed?

Revision history for this message
Barry Warsaw (barry) wrote :

Or maybe s/possible/expected/

Revision history for this message
Barry Warsaw (barry) wrote :

After further debugging, I have no clue what the format of the initrd.img file is inside the recovery.img. AFAICT it isn't xz or gz compressed, you can't `abootimg -x` it, you can't `cpio -i` it and you can't loopback mount it.

Maybe it's gotten corrupted?

Daniel Manrique didn't run into the problem because they omitted the `keyring` parameter from the file_device line in the config file. Indeed, without that, you can generate some semblance of an image from the remote server.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.