Bug 4699 - be more robust against failing to remove session directories
Summary: be more robust against failing to remove session directories
Status: CLOSED FIXED
Alias: None
Product: ThinLinc
Classification: Unclassified
Component: VSM Agent (show other bugs)
Version: trunk
Hardware: PC Unknown
: P2 Normal
Target Milestone: 4.5.0
Assignee: Pierre Ossman
URL:
Keywords: hean01_tester, relnotes
Depends on:
Blocks:
 
Reported: 2013-06-12 10:07 CEST by Pierre Ossman
Modified: 2015-09-25 14:01 CEST (History)
1 user (show)

See Also:
Acceptance Criteria:


Attachments

Description Pierre Ossman cendio 2013-06-12 10:07:22 CEST
We cannot be 100% certain that we will be able to remove an old session directory (#.ended). If we fail to remove the old one, then tl-session will in turn fail to rename the current session to #.ended.

We can avoid the breakage if we rename the #.ended directory before we start to remove it. E.g. #.cleanup.XXXXXX. It is important that there are some random characters in the name in case this happens multiple times.

Note that this still means that crud will be left on disk for the administrator to deal with. That is the case today as well though, just that we generally get more breakage in ThinLinc when we fail to move directories out of the way like expected.



At the same time, we might want to have a look at the cleanup routine to make it more robust against files that cannot be removed. E.g. it shouldn't abort on the first file that fails, but continue and remove as many as possible.

We should also log failures better/more.
Comment 1 Pierre Ossman cendio 2015-08-12 13:53:06 CEST
This won't work as the user cannot rename those directories (for security reasons).

Changing summary to something more generic.
Comment 2 Pierre Ossman cendio 2015-08-12 13:53:31 CEST
(In reply to comment #0)
> 
> At the same time, we might want to have a look at the cleanup routine to make
> it more robust against files that cannot be removed. E.g. it shouldn't abort on
> the first file that fails, but continue and remove as many as possible.
> 

This is being done on bug 5110.
Comment 3 Pierre Ossman cendio 2015-08-12 13:54:32 CEST
A different idea is to stop using the simple <display>.ended naming. We could do <display>.<time>.ended. A slightly longer and more confusing name, but the risk of conflicting names is basically zero.
Comment 4 Pierre Ossman cendio 2015-08-12 14:52:19 CEST
Fixed in r30659.

Tester should put an unremovable file/dir in a session directory and make sure the system gracefully works around that directory.
Comment 5 Henrik Andersson cendio 2015-08-14 08:50:14 CEST
(In reply to comment #4)
> Fixed in r30659.
> 
> Tester should put an unremovable file/dir in a session directory and make sure
> the system gracefully works around that directory.

Reproduced issue using ThinLinc 4.4.0, and verified that the problem is solved using build 4857.

Note You need to log in before you can comment on or make changes to this bug.