Add support for tar.xz images

Bug #1843266 reported by Lee Trager
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Wishlist
Unassigned
curtin
Fix Released
Medium
Unassigned

Bug Description

Some vendors have begun to provide root.tar.xz images[1]. As MAAS/Curtin gains support for these images MAAS/Curtin should add the ability to deploy root.tar.xz. Ideally MAAS/Curtin should be able to deploy a tar using any compression type supported by Python's tar library using the following.

with tarfile.open(mode='r|*', fileobj=binary) as tar:
    tar.extractall(scripts_dir)

[1] https://download.opensuse.org/repositories/Cloud:/Images:/Leap_15.1/images/

Related branches

Revision history for this message
Scott Moser (smoser) wrote :

It seems like this might "just work" right now for curtin. The support for xz compression is already in `helpers/smtar`. smtar is used via `extract_root_tgz_url`.

It looks like maybe we would want sanitize_source to contain 'txz' (and might as well add tbz) in curtin/util.py .

Revision history for this message
Ryan Harper (raharper) wrote :

Thanks Scott,

that looks right to me, a quick test shows smtar knows how to extract:

cat /tmp/openSUSE-Leap-15.1-OpenStack-rootfs.x86_64.tar.xz | ./helpers/smtar -t | head
etc/
etc/named.d/
etc/named.d/rndc-access.conf
etc/tmpfiles.d/
etc/rsyncd.conf
etc/polkit-default-privs.restrictive
etc/idmapd.conf
etc/auto.master
etc/default/
etc/default/grub

Changed in curtin:
importance: Undecided → Medium
status: New → Triaged
Revision history for this message
Server Team CI bot (server-team-bot) wrote :

This bug is fixed with commit 5f132478 to curtin on branch master.
To view that commit see the following URL:
https://git.launchpad.net/curtin/commit/?id=5f132478

Changed in curtin:
status: Triaged → Fix Committed
Changed in maas:
milestone: none → next
status: Triaged → Fix Committed
Revision history for this message
Ryan Harper (raharper) wrote : Fixed in curtin version 19.3.

This bug is believed to be fixed in curtin in version 19.3. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
status: Fix Committed → Fix Released
Changed in maas:
milestone: next → 2.7.0b1
Changed in maas:
status: Fix Committed → Fix Released
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.