[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
This is fixed in the latest snapd now, we use lazy umount. ** Changed in: snapd (Ubuntu) Status: Confirmed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
Status changed to 'Confirmed' because the bug affects multiple users. ** Changed in: snapd (Ubuntu) Status: New => Confirmed -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
Re: [Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
You can unmount a snap with "sudo umount /var/lib/snapd/snaps/some.snap" If the application is still running try umount -l On Thu, Jun 16, 2016 at 5:14 PM, almejowrote: > I have the same problem > > The only answer is to remove snapd, all files and start over??? > > How do I umount a snap??? > > -- > You received this bug notification because you are a member of Snappy > Developers, which is subscribed to snapd in Ubuntu. > https://bugs.launchpad.net/bugs/1585806 > > Title: > snap remove while in /snap/foo/current/... not robust > > To manage notifications about this bug go to: > https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions > -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
No, please see the discussion above. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
I have the same problem The only answer is to remove snapd, all files and start over??? How do I umount a snap??? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
Changes may be aborted via "snap abort". It doesn't always work because something may hang and render snapd unable to stop it, but otherwise it should work. We should probably map CTRL-C to an implicit abort. > In other words, after the Ctrl-C and after I left the directory, snapd did not "finish the removal". It would finish if you waited for 5 minutes, which is the default retry time at the moment. We should improve logging in those cases to make the outcome more expected. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
Ah, and we should also schedule an immediate retry when we find a conflict such as the described one. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
I didn't mind snapd refusing the operation of course-- the problem was as you mentioned that I didn't have the feedback but even more importantly, once I did Ctrl-C, there was nothing I could do to get back to a working system short of the extreme method I described (perhaps there was something else I could have done?). In other words, after the Ctrl-C and after I left the directory, snapd did not "finish the removal". -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
Ironically, the reason your CTRL-C + retry did not work is precisely because it _is_ robust. snapd was busy attempting to remove the existing snap for some reason, and it could not because something in the middle of the process was still using the old snap files. Once these files stopped being used, snapd would finish the removal. You can see the status quo via "snap changes foo", and then more details via "snap change " for the in-progress change. We need to improve the experience so that it's more clear what is going on, and make the behavior reflect what users would expect, but snapd should continue to refuse operations to be done while something conflicting is in progress, and it should continue to not let the system in a bad state just because CTRL-C was used. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
** Description changed: I was debugging a snap and I did: $ cd /snap/foo/current/path/to/some/thing $ sudo snap remove foo It hung so I Ctrl-C'd and then tried again: $ sudo snap remove foo error: cannot remove "foo": snap "foo" has changes in progress I then needed to make snapd forget about "foo" and had to stop the systemd service, umount the snap, remove files associated with the snap and perform surgery on /var/lib/snapd/state.json. I'm still working through what I need to do, but I think it will occasionally happen during debugging sessions that others will hit this. - That didn't really work. I stopped snapd, then manually umounted all the - snaps, then apt-get remove --purge snapd, then rm -rf /snap /var/snap - /var/lib/snapd, then reinstalled. This is pretty extreme-- perhaps there - was a better to get a usable snapd + UPDATE: That didn't really work. I stopped snapd, then manually umounted + all the snaps, then apt-get remove --purge snapd, then rm -rf /snap + /var/snap /var/lib/snapd, then reinstalled. This is pretty extreme-- + perhaps there was a better way to get a usable snapd -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1585806] Re: snap remove while in /snap/foo/current/... not robust
** Description changed: I was debugging a snap and I did: $ cd /snap/foo/current/path/to/some/thing $ sudo snap remove foo It hung so I Ctrl-C'd and then tried again: $ sudo snap remove foo error: cannot remove "foo": snap "foo" has changes in progress I then needed to make snapd forget about "foo" and had to stop the systemd service, umount the snap, remove files associated with the snap and perform surgery on /var/lib/snapd/state.json. I'm still working through what I need to do, but I think it will occasionally happen during debugging sessions that others will hit this. + + That didn't really work. I stopped snapd, then manually umounted all the + snaps, then apt-get remove --purge snapd, then rm -rf /snap /var/snap + /var/lib/snapd, then reinstalled. This is pretty extreme-- perhaps there + was a better to get a usable snapd -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1585806 Title: snap remove while in /snap/foo/current/... not robust To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1585806/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs