snappy fails to update snap if previous version systemd stop action failed

Bug #1452848 reported by Mark W Wenning
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Snappy
Expired
Critical
Unassigned

Bug Description

previous version of snap failed to install service due to another bug. I modified snap and changed version from 1.0.2 to 1.0.3 .
when I tried to update to the new version, I got:
----------------------------------
ubuntu@ubuntu:~/src/snappy/snappyonie$ snappy-remote --url=ssh://192.168.1.150 install ./snappyonie_1.0.3_amd64.snap
=======================================================

Installing ./snappyonie_1.0.3_amd64.snap from local environment

issues while running ssh command: Installing /tmp/snappyonie_1.0.3_amd64.snap
2015/05/07 18:05:19 Signature check failed, but installing anyway as requested
/tmp/snappyonie_1.0.3_amd64.snap failed to install: [stop snappyonie_snappyonie_1.0.2.service] failed with exit status 5: Failed to stop snappyonie_snappyonie_1.0.2.service: Unit snappyonie_snappyonie_1.0.2.service not loaded.

ubuntu@ubuntu:~/src/snappy/snappyonie$
-----------------------------------

If I log into the snappy box,

sudo snappy remove snappyonie

also fails with the same error

Michael Terry (mterry)
affects: snappy-ubuntu → snappy
Revision history for this message
Michael Vogt (mvo) wrote :

Thanks for your bugreport. This is indeed a problem, to reproduce:
- install xkcd-webserver 0.5
- rename to 0.4 on disk and in meta/packages.yaml
- run snappy update xkcd-webserver
and verify that this errors with:
# snappy update xkcd-webserver
Installing xkcd-webserver (0.5)
Starting download of xkcd-webserver
12.23 KB / 12.23 KB [====================================] 100.00 % 824.45 KB/s
Done
[stop xkcd-webserver_xkcd-webserver_0.4.service] failed with exit status 5: Failed to stop xkcd-webserver_xkcd-webserver_0.4.service: Unit xkcd-webserver_xkcd-webserver_0.4.service not loaded.

I guess similar results can be triggered with a incorrect stop line, like "Stop=false". In this case snappy should not stop uninstalling the app, just warn, we never want to be in a situation where we can not update because a old version is broken.

Changed in snappy:
importance: Undecided → Critical
status: New → Triaged
summary: - snappy-remote fails to update snap if previous version failed
+ snappy fails to update snap if previous version systemd stop action
+ failed
Revision history for this message
John Lenton (chipaca) wrote :

I can't seem to reproduce this with current 15.04 nor wily. Could you check and see if it's no longer an issue?

Changed in snappy:
status: Triaged → Incomplete
Revision history for this message
Simon Fels (morphis) wrote :

We're getting this bug too on 15.04. It seems to have some relation to https://bugs.launchpad.net/snappy/+bug/1501638 as this happens when a snap is updated and a new systemd service file is generated.

Revision history for this message
Simon Fels (morphis) wrote :

Steps to reproduce:

1. Build nm-snap

$ git clone https://git.launchpad.net/~phablet-team/+git/nm-snap-vivid -b mm-support
$ make

2. Install snap
3. Make some changes on the snap and rebuild it
4. Install the snap again

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for Snappy because there has been no activity for 60 days.]

Changed in snappy:
status: Incomplete → Expired
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.