snappy update on wily edge from 114 to 136 bails with "No space left on device".

Bug #1484457 reported by John Lenton
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Critical
Unassigned

Bug Description

steps to reproduce:

rm -f wily.img && sudo ubuntu-device-flash --revision 114 core rolling --oem=generic-amd64 --channel edge -o wily.img --developer-mode && kvm -snapshot -redir :8022::22 -redir :4200::4200 -m 2048 wily.img

wait for it to boot, then reboot it (114 does not yet come up with network in kvm).

wait for it to boot again, then:

(amd64)ubuntu@localhost:~$ snappy list
Name Date Version Developer
ubuntu-core 2015-07-21 114 ubuntu
generic-amd64 2015-08-13 1.4 canonical
(amd64)ubuntu@localhost:~$ sudo snappy update
Updating ubuntu-core (136)
Syncing boot files
Starting download of ubuntu-core
Applying update[-]
Apply done
Updating boot files
126.80 MB / 126.80 MB [=============================================================] 100.00 % 1.46 MB/s
Done
Failed to run command '/bin/cp /writable/cache/assets/initrd.img-4.1.0-3-generic /boot/grub/b': /bin/cp: error writing '/boot/grub/b/initrd.img-4.1.0-3-generic': No space left on device
/bin/cp: failed to extend '/boot/grub/b/initrd.img-4.1.0-3-generic': No space left on device
 (exit status 1)
(amd64)ubuntu@localhost:~$

Related branches

Revision history for this message
Michael Vogt (mvo) wrote :

This appears to be a problem with the way that the kernel/initrd is copied/created on "b/". When I inspect the partition I see b/vmlinuz *and* b/vmlinuz-4.1.0-3-generic. So its not normalizing the names.

Changed in snappy:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Michael Vogt (mvo) wrote :

And indeed, the HandleAssets() code will do a:
"""
if err := runCommand("/bin/cp", path, destDir); err != nil {
   return err
}
"""
which shows that it will just do the cp into the destdir, but it needs to also noramlize the filename to "vmlinuz" and "initrd.img" or booting is broken (and the space is not enough).

Revision history for this message
Michael Vogt (mvo) wrote :

Having a systematic integration test for this would be great, worth investigating why this bug was not discovered by our test machinery yet.

Michael Vogt (mvo)
Changed in snappy:
status: Triaged → In Progress
Revision history for this message
Leo Arias (elopio) wrote :

Subscribing Federico here so we discuss about it.
If this happens using the latest image and faking an update, I've confirmed that the update suite catches it.
This should also be caught by the real update tests that we don't yet have enabled in jenkins.

I've attached a branch that checks the contents of the dir. Please let me know if you find that useful.

Thanks.

Michael Vogt (mvo)
Changed in snappy:
status: In Progress → 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.