maas-import-ephemerals copies where move would be superior
Bug #1238158 reported by
Scott Moser
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.
Related branches
lp:~jtv/maas/bug-1238158
- Julian Edwards (community): Approve
-
Diff: 172 lines (+28/-26)2 files modifiedsrc/provisioningserver/import_images/ephemerals_script.py (+10/-10)
src/provisioningserver/import_images/tests/test_ephemerals_script.py (+18/-16)
Changed in maas: | |
importance: | Undecided → Medium |
Changed in maas: | |
status: | New → Triaged |
tags: | added: m-i-p-f |
Changed in maas: | |
assignee: | nobody → Jeroen T. Vermeulen (jtv) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | none → 14.04 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.