Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

don't throw away failed snapshot #45

Open
lnussel opened this issue Oct 1, 2020 · 4 comments
Open

don't throw away failed snapshot #45

lnussel opened this issue Oct 1, 2020 · 4 comments

Comments

@lnussel
Copy link
Member

lnussel commented Oct 1, 2020

On one of my systems I repeatedly have a problem where zypper dup fails with exit code 107 when run from transactional-update dup. The snapshot is thrown away then. Running it from within transactional-update shell works though. So hard to debug, esp since zypper has to download all packages again. Would it be possible to add a config option or command line switch to not throw away the snapshot even if whatever happened failed? That way it would be possible to inspect the inside after the failure.

@lnussel
Copy link
Member Author

lnussel commented Oct 1, 2020

ha, found the reason. The error messages and the mkinitrd output at the end were misleading

update-alternatives: error: unable to create file '/var/lib/alternatives/gs.rpm-tmp': Read-only file system
warning: %post(ghostscript-9.52-2.2.x86_64) scriptlet failed, exit status 2

anyways, the request to keep also failed snapshots stays

@thkukuk
Copy link
Collaborator

thkukuk commented Oct 1, 2020

And who cleans up the failed snapshots?
For debugging, there is "transactional-update shell dup"
One of our marketing promises is, that failed updates are deleted immediately so that they cannot harm in any way, not even by eating up disk space. One of the biggest concerns in all talks with customers.

@laenion
Copy link
Collaborator

laenion commented Oct 1, 2020

Agreeing to what Thorsten said: the shell option is supposed to be used for debugging.

However from a user's perspective it may indeed be an idea to introduce a --keep option. However we'd still have to think about how to clean up such a snapshot. One idea may to to fill snapper's userdata field with a dedicated value, e.g. transactional-update-failed=yes (similarly to the current transactional-update-in-progress=yes to detect power failures) and set a cleanup algorithm for such snapshots on next run.

@lnussel
Copy link
Member Author

lnussel commented Oct 2, 2020

a failed snapshot would get cleaned up just like any other, right? So while the mechanism could be optimized for more aggressive cleanup of course it's just that, an optimization. Ie not strictly required. Since the keep option wouldn't be default the risk of having failed snapshots consume disk space would be a consciously taken one. In the situation I had I would have preferred investing disk space over time spent on manual zypper dup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants