Switching back and forth between channels breaks

Bug #1590989 reported by Evan on 2016-06-09
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Snappy
High
Unassigned

Bug Description

If you `snap refresh --channel=edge foo; snap refresh --channel=stable foo`, the second command will fail, since you already have the revision from stable. John points out there are two problems here:

1. --refresh to a channel for which you already have the snap should work
2. asking to switch to a revision you have should work

Evan (ev) wrote :
Download full text (7.3 KiB)

ev@elsa:~/jenkins-snap$ ps aux | grep jenk
root 4095 0.3 13.6 4589688 551320 ? Ssl 14:49 0:46 java -DJENKINS_HOME=/var/snap/jenkins/3 -Djava.awt.headless=true -jar /snap/jenkins/3/war/jenkins.war
ev 17927 0.0 0.1 40900 7608 pts/0 S+ 15:57 0:00 vim parts/plugins/x-jenkins.py
ev 32505 0.0 0.0 14224 984 pts/2 S+ 18:05 0:00 grep --color=auto jenk
ev@elsa:~/jenkins-snap$ snap refresh --channel=edge jenkins
96.66 MB / 96.66 MB [==================================================================================================================================================================] 100.00 % 4.02 MB/s

Name Version Rev Developer
jenkins 2.9-SNAPSHOT 5 ev
ev@elsa:~/jenkins-snap$ ps aux | grep jenk
ev 17927 0.0 0.1 40900 7608 pts/0 S+ 15:57 0:00 vim parts/plugins/x-jenkins.py
root 32649 170 4.0 4526868 164392 ? Ssl 18:05 0:05 java -DJENKINS_HOME=/var/snap/jenkins/5 -Djava.awt.headless=true -jar /snap/jenkins/5/war/jenkins.war
ev 32687 0.0 0.0 14224 1028 pts/2 S+ 18:05 0:00 grep --color=auto jenk
ev@elsa:~/jenkins-snap$ grep dandrea /var/snap/jenkins/current/ -rsI
/var/snap/jenkins/current/users/ev/config.xml: <emailAddress><email address hidden></emailAddress>
ev@elsa:~/jenkins-snap$ snap refresh --channel=stable jenkins
96.67 MB / 96.67 MB [==================================================================================================================================================================] 100.00 % 3.46 MB/s

Name Version Rev Developer
jenkins 2.8 4 ev
ev@elsa:~/jenkins-snap$ ps aux | grep jenk
root 439 211 11.8 4578252 478012 ? Ssl 18:07 0:21 java -DJENKINS_HOME=/var/snap/jenkins/4 -Djava.awt.headless=true -jar /snap/jenkins/4/war/jenkins.war
ev 541 0.0 0.0 14224 936 pts/2 S+ 18:07 0:00 grep --color=auto jenk
ev 17927 0.0 0.1 40900 7608 pts/0 S+ 15:57 0:00 vim parts/plugins/x-jenkins.py
ev@elsa:~/jenkins-snap$ grep dandrea /var/snap/jenkins/current/ -rsI
/var/snap/jenkins/current/users/ev/config.xml: <emailAddress><email address hidden></emailAddress>
ev@elsa:~/jenkins-snap$ snap refresh --channel=edge jenkins

error: cannot perform the following tasks:
- Download snap "jenkins" from channel "edge" (revision 5 of snap "jenkins" already installed)
ev@elsa:~/jenkins-snap$ snap list
Name Version Rev Developer
canonical-pc-linux 4.4.0-18+20160419.13-26 24 canonical
cassandra 3.5 1 ev
jenkins 2.8 4 ev
snappy-debug 0.18 19 canonical
ubuntu-core 16.04+20160419.20-55 109 canonical
ev@elsa:~/jenkins-snap$ mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=2005932k,nr_inodes=501483,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=404656k,mode=755)
/dev/vda1 on / type ext4 (rw,relatime,erro...

Read more...

description: updated
John Lenton (chipaca) on 2016-06-09
Changed in snappy:
status: New → Confirmed
importance: Undecided → High
Evan (ev) wrote :

Here's a more concise and clear example:

ev@elsa:~/jenkins-snap$ snap install jenkins
96.67 MB / 96.67 MB [====================================================] 100.00 % 6.99 MB/s

Name Version Rev Developer
jenkins 2.8 4 ev
ev@elsa:~/jenkins-snap$ snap refresh --channel=edge jenkins
96.66 MB / 96.66 MB [====================================================] 100.00 % 6.30 MB/s

Name Version Rev Developer
jenkins 2.9-SNAPSHOT 5 ev
ev@elsa:~/jenkins-snap$ snap refresh --channel=stable jenkins

error: cannot perform the following tasks:
- Download snap "jenkins" from channel "stable" (revision 4 of snap "jenkins" already installed)

Evan (ev) on 2017-01-18
tags: added: eco-team
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers