refresh to same revision yields broken SNAP_USER_DIR

Bug #1670384 reported by Chad Miller
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd
Confirmed
Medium
Unassigned

Bug Description

I have a misbehaving snap. I want to test in devmode.

cmiller@zippy:~$ snap list
Name Version Rev Developer Notes
core 16-2 1337 canonical -
tor-middle-relay 0.2.9.10-1 156 chadmiller -

cmiller@zippy:~$ sudo snap refresh tor-middle-relay --beta --devmode --revision=156
error: cannot perform the following tasks:
- Copy snap "tor-middle-relay" data (cannot copy "/home/cmiller/snap/tor-middle-relay/156" to "/home/cmiller/snap/tor-middle-relay/156": failed to copy all: "cp: cannot stat '/home/cmiller/snap/tor-middle-relay/156': No such file or directory" (1))

cmiller@zippy:~$ ls -ld /home/cmiller/snap/tor-middle-relay/156
ls: cannot access '/home/cmiller/snap/tor-middle-relay/156': No such file or directory

cmiller@zippy:~$ ls -l /home/cmiller/snap/tor-middle-relay
total 44
drwxrwxr-x 2 cmiller cmiller 2 Jun 28 2016 148
drwxrwxr-x 2 cmiller cmiller 2 Jun 28 2016 152
drwxrwxr-x 2 cmiller cmiller 2 Jun 28 2016 156.old
drwxr-xr-x 2 cmiller cmiller 2 Feb 16 16:09 common

Revision history for this message
John Lenton (chipaca) wrote :

I'm pretty sure we have tests for exactly this. I'll dig a little.

John Lenton (chipaca)
Changed in snappy:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
John Lenton (chipaca) wrote :

To be clear, there's several things going on which need fixing:
1. It's letting you refresh to the same revision as you currently have, and having allowed it, then proceeds to try to do something other than saying "done!".
2. it's failing to do the install
3. having failed, it's not cleaning up after itself

the last one is the bigger issue of the lot

Revision history for this message
Chad Miller (cmiller) wrote : Re: [Bug 1670384] Re: refresh to same revision yields broken SNAP_USER_DIR

Thanks, John. If this is not the way to toggle devmode/jailmode, then maybe
that is a #4. The right way isn't possible or isn't more obvious.

On Mon, Mar 6, 2017 at 11:23 AM, John Lenton <email address hidden>
wrote:

> To be clear, there's several things going on which need fixing:
> 1. It's letting you refresh to the same revision as you currently have,
> and having allowed it, then proceeds to try to do something other than
> saying "done!".
> 2. it's failing to do the install
> 3. having failed, it's not cleaning up after itself
>
> the last one is the bigger issue of the lot
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1670384
>
> Title:
> refresh to same revision yields broken SNAP_USER_DIR
>
> Status in Snappy:
> Confirmed
>
> Bug description:
> I have a misbehaving snap. I want to test in devmode.
>
> cmiller@zippy:~$ snap list
> Name Version Rev Developer Notes
> core 16-2 1337 canonical -
> tor-middle-relay 0.2.9.10-1 156 chadmiller -
>
> cmiller@zippy:~$ sudo snap refresh tor-middle-relay --beta --devmode
> --revision=156
> error: cannot perform the following tasks:
> - Copy snap "tor-middle-relay" data (cannot copy "/home/cmiller/snap/tor-middle-relay/156"
> to "/home/cmiller/snap/tor-middle-relay/156": failed to copy all: "cp:
> cannot stat '/home/cmiller/snap/tor-middle-relay/156': No such file or
> directory" (1))
>
> cmiller@zippy:~$ ls -ld /home/cmiller/snap/tor-middle-relay/156
> ls: cannot access '/home/cmiller/snap/tor-middle-relay/156': No such
> file or directory
>
> cmiller@zippy:~$ ls -l /home/cmiller/snap/tor-middle-relay
> total 44
> drwxrwxr-x 2 cmiller cmiller 2 Jun 28 2016 148
> drwxrwxr-x 2 cmiller cmiller 2 Jun 28 2016 152
> drwxrwxr-x 2 cmiller cmiller 2 Jun 28 2016 156.old
> drwxr-xr-x 2 cmiller cmiller 2 Feb 16 16:09 common
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/snappy/+bug/1670384/+subscriptions
>

Michael Vogt (mvo)
affects: snappy → snapd
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.