automatic reboot fails with rc.local crash

Bug #1476129 reported by Federico Gimenez
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Snappy
Fix Released
Critical
Unassigned

Bug Description

Steps to reproduce:

Create a rolling/edge image (amd64):

$ sudo ubuntu-device-flash core rollling --channel edge -o snappy.img --developer-mode

(tested it with version 113)

Launch

$ kvm -m 768 -redir :8022::22 ./snappy.img

Update

$ ssh -p 8022 ubuntu@localhost
$ sudo snappy update

Make rc.local in the other partition provoke a crash on boot:

$ sudo mount -o remount,rw /writable/cache/system
$ printf '#!bin/sh\nprintf c > /proc/sysrq-trigger\n' | sudo tee /writable/cache/system/etc/rc.local
$ sudo chmod a+w /writable/cache/system/etc/rc.local
$ sudo grub-editenv /boot/grub/grubenv set snappy_mode=try
$ sudo grub-editenv /boot/grub/grubenv set snappy_ab=b
$ sudo reboot

Reboot. The system enters a loop trying to boot from partition b. In 15.04 (version 124 and before) this works fine, the system detects the failure and reboots to the previous partition.

Related branches

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

Critical because it appears to be a regression

Changed in snappy:
status: New → Triaged
importance: Undecided → Critical
Michael Vogt (mvo)
description: updated
Michael Vogt (mvo)
tags: added: snappy-robustness
Revision history for this message
Michael Vogt (mvo) wrote :

I can confirm this, I see a bootloop in rolling. From the timestamps of the boot it appears that
- ubuntu-snappy.boot-ok.service is run at 14:12:40
- rc.local is run at 14:12:41 which indicates that
so we need to fix the order of the ubuntu-snappy.boot-ok.service

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

@Federico, mvo: I don't get this. So mvo's branch doesn't fix the problem and the test still fails?

Revision history for this message
Federico Gimenez (fgimenez) wrote :

Leo, it's working in generic_amd64 rolling/edge #168 and generic_armhf rolling/edge #164, with previous images it was still failing.

I'll propose a branch for reenabling the test, thanks!

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

This should be fixed in 16.04 now - the integration tests for it also run now.

Changed in snappy:
status: In Progress → Fix Committed
Leo Arias (elopio)
Changed in snappy:
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.