maas-import-ephemerals copies where move would be superior

Bug #1238158 reported by Scott Moser
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Medium
Jeroen T. Vermeulen

Bug Description

As it is right now, when the simplestreams code decides that an item needs to be inserted to maas, the 'extract_item' method will be called it will extract the .tar.gz file and copy the disk.img, linux and initrd.gz files to the target location.

The extracted .img file will be ~700M or so. This is a large amount of IO, which is slow and potentially causes filesystem full errors.
An additional advantage of move from a temp dir would be atomic creation of the file.

Tags: m-i-p-f

Related branches

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

oh, and also its likely that shutil.copy loses the sparseness of the file that tar -S created. meaning an increase in actually used size.

Scott Moser (smoser)
Changed in maas:
importance: Undecided → Medium
Changed in maas:
status: New → Triaged
tags: added: m-i-p-f
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

The change could be limited entirely to extract_image_tarball. Looks easy.

Changed in maas:
assignee: nobody → Jeroen T. Vermeulen (jtv)
status: Triaged → In Progress
Changed in maas:
status: In Progress → Fix Committed
Raphaël Badin (rvb)
Changed in maas:
milestone: none → 14.04
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.